naming convention for pharo-vm/lib/pharo/* directory?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

naming convention for pharo-vm/lib/pharo/* directory?

Dale Henrichs-3
I am in the process of porting the GemStone-GCI[1] project to Pharo6.1
(32 bit) and Pharo7.0 (64 bit) and I'm curious what the naming
convention for the library directories are.

For Pharo5.0 and earlier, I copied my 32 bit gemstone gci library files
(.so on linux) into the pharo-vm directory.

For Pharo6.1 I just figured out that I need to copy the gci library
files into the pharo-vm/lib/pharo/5.0-201806281256 directory ... at list
the libraries are found when I do so?

I would like to be able to write a bash script that copies the gci
library files into the proper directory, but the directory for the
Pharo6.1 vm looks like some kind of magic number and I assume that
different builds of the 6.1 vm could have different names and possibly
even multiple directories under pharo-vm/lib/pharo/?

I haven't looked at Pharo7.0 yet to see what it's pharo-vm directory
structure looks like...

A pointer to where the naming conventions for these directories is
described for Pharo6.x, Pharo7.x and Pharo8.x would be greatly
appreciated ... would also be nice if the error message for the "module
not found" error could be a bit more descriptive as well ...

Thanks,

Dale

[1] https://github.com/GsDevKit/GemStone-GCI


Reply | Threaded
Open this post in threaded view
|

Re: naming convention for pharo-vm/lib/pharo/* directory?

Nicolas Cellier
I'm afraid it also depends on the overly complex rules burried deep inside the VM...
It would be a good thing to try and document it.
And if we can't reasonably document it, then we might want to open an issue on opensmalltalk.

Le ven. 25 janv. 2019 à 01:51, Dale Henrichs <[hidden email]> a écrit :
I am in the process of porting the GemStone-GCI[1] project to Pharo6.1
(32 bit) and Pharo7.0 (64 bit) and I'm curious what the naming
convention for the library directories are.

For Pharo5.0 and earlier, I copied my 32 bit gemstone gci library files
(.so on linux) into the pharo-vm directory.

For Pharo6.1 I just figured out that I need to copy the gci library
files into the pharo-vm/lib/pharo/5.0-201806281256 directory ... at list
the libraries are found when I do so?

I would like to be able to write a bash script that copies the gci
library files into the proper directory, but the directory for the
Pharo6.1 vm looks like some kind of magic number and I assume that
different builds of the 6.1 vm could have different names and possibly
even multiple directories under pharo-vm/lib/pharo/?

I haven't looked at Pharo7.0 yet to see what it's pharo-vm directory
structure looks like...

A pointer to where the naming conventions for these directories is
described for Pharo6.x, Pharo7.x and Pharo8.x would be greatly
appreciated ... would also be nice if the error message for the "module
not found" error could be a bit more descriptive as well ...

Thanks,

Dale

[1] https://github.com/GsDevKit/GemStone-GCI


Reply | Threaded
Open this post in threaded view
|

Re: naming convention for pharo-vm/lib/pharo/* directory?

Dale Henrichs-3

Thanks Nicolas,

Is it as simple as pharo/*, or could there be multiple directories created and I need to pick the right one?

Dale

On 1/25/19 12:48 AM, Nicolas Cellier wrote:
I'm afraid it also depends on the overly complex rules burried deep inside the VM...
It would be a good thing to try and document it.
And if we can't reasonably document it, then we might want to open an issue on opensmalltalk.

Le ven. 25 janv. 2019 à 01:51, Dale Henrichs <[hidden email]> a écrit :
I am in the process of porting the GemStone-GCI[1] project to Pharo6.1
(32 bit) and Pharo7.0 (64 bit) and I'm curious what the naming
convention for the library directories are.

For Pharo5.0 and earlier, I copied my 32 bit gemstone gci library files
(.so on linux) into the pharo-vm directory.

For Pharo6.1 I just figured out that I need to copy the gci library
files into the pharo-vm/lib/pharo/5.0-201806281256 directory ... at list
the libraries are found when I do so?

I would like to be able to write a bash script that copies the gci
library files into the proper directory, but the directory for the
Pharo6.1 vm looks like some kind of magic number and I assume that
different builds of the 6.1 vm could have different names and possibly
even multiple directories under pharo-vm/lib/pharo/?

I haven't looked at Pharo7.0 yet to see what it's pharo-vm directory
structure looks like...

A pointer to where the naming conventions for these directories is
described for Pharo6.x, Pharo7.x and Pharo8.x would be greatly
appreciated ... would also be nice if the error message for the "module
not found" error could be a bit more descriptive as well ...

Thanks,

Dale

[1] https://github.com/GsDevKit/GemStone-GCI


Reply | Threaded
Open this post in threaded view
|

Re: naming convention for pharo-vm/lib/pharo/* directory?

Sven Van Caekenberghe-2
Maybe FileLocator can help ?

on macOS

FileLocator vmDirectory pathString.
"'/Users/sven/Develop/Pharo/Pharo-Daily/2019-01-24/pharo-vm'"

FileLocator vmBinary pathString.
"'/Users/sven/Develop/Pharo/Pharo-Daily/2019-01-24/pharo-vm/Pharo.app/Contents/MacOS/Pharo'"

on Linux

$ ../bin/pharo Pharo.image eval 'FileLocator vmDirectory pathString'
'/home/t3/pharo/bin/pharo-vm'

$ ../bin/pharo Pharo.image eval 'FileLocator vmBinary pathString'
'/home/t3/pharo/bin/pharo-vm/pharo'

> On 25 Jan 2019, at 18:25, Dale Henrichs <[hidden email]> wrote:
>
> Thanks Nicolas,
>
> Is it as simple as pharo/*, or could there be multiple directories created and I need to pick the right one?
>
> Dale
>
> On 1/25/19 12:48 AM, Nicolas Cellier wrote:
>> I'm afraid it also depends on the overly complex rules burried deep inside the VM...
>> It would be a good thing to try and document it.
>> And if we can't reasonably document it, then we might want to open an issue on opensmalltalk.
>>
>> Le ven. 25 janv. 2019 à 01:51, Dale Henrichs <[hidden email]> a écrit :
>> I am in the process of porting the GemStone-GCI[1] project to Pharo6.1
>> (32 bit) and Pharo7.0 (64 bit) and I'm curious what the naming
>> convention for the library directories are.
>>
>> For Pharo5.0 and earlier, I copied my 32 bit gemstone gci library files
>> (.so on linux) into the pharo-vm directory.
>>
>> For Pharo6.1 I just figured out that I need to copy the gci library
>> files into the pharo-vm/lib/pharo/5.0-201806281256 directory ... at list
>> the libraries are found when I do so?
>>
>> I would like to be able to write a bash script that copies the gci
>> library files into the proper directory, but the directory for the
>> Pharo6.1 vm looks like some kind of magic number and I assume that
>> different builds of the 6.1 vm could have different names and possibly
>> even multiple directories under pharo-vm/lib/pharo/?
>>
>> I haven't looked at Pharo7.0 yet to see what it's pharo-vm directory
>> structure looks like...
>>
>> A pointer to where the naming conventions for these directories is
>> described for Pharo6.x, Pharo7.x and Pharo8.x would be greatly
>> appreciated ... would also be nice if the error message for the "module
>> not found" error could be a bit more descriptive as well ...
>>
>> Thanks,
>>
>> Dale
>>
>> [1] https://github.com/GsDevKit/GemStone-GCI
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: naming convention for pharo-vm/lib/pharo/* directory?

Nicolas Cellier
Oh, maybe you're after PharoLauncher conventions?
I was talking of underlying VM search path.
I remember that the library loading happens in ioLoadModule() both for FFI and external plugins.

Le ven. 25 janv. 2019 à 18:45, Sven Van Caekenberghe <[hidden email]> a écrit :
Maybe FileLocator can help ?

on macOS

FileLocator vmDirectory pathString.
"'/Users/sven/Develop/Pharo/Pharo-Daily/2019-01-24/pharo-vm'"

FileLocator vmBinary pathString.
"'/Users/sven/Develop/Pharo/Pharo-Daily/2019-01-24/pharo-vm/Pharo.app/Contents/MacOS/Pharo'"

on Linux

$ ../bin/pharo Pharo.image eval 'FileLocator vmDirectory pathString'
'/home/t3/pharo/bin/pharo-vm'

$ ../bin/pharo Pharo.image eval 'FileLocator vmBinary pathString'
'/home/t3/pharo/bin/pharo-vm/pharo'

> On 25 Jan 2019, at 18:25, Dale Henrichs <[hidden email]> wrote:
>
> Thanks Nicolas,
>
> Is it as simple as pharo/*, or could there be multiple directories created and I need to pick the right one?
>
> Dale
>
> On 1/25/19 12:48 AM, Nicolas Cellier wrote:
>> I'm afraid it also depends on the overly complex rules burried deep inside the VM...
>> It would be a good thing to try and document it.
>> And if we can't reasonably document it, then we might want to open an issue on opensmalltalk.
>>
>> Le ven. 25 janv. 2019 à 01:51, Dale Henrichs <[hidden email]> a écrit :
>> I am in the process of porting the GemStone-GCI[1] project to Pharo6.1
>> (32 bit) and Pharo7.0 (64 bit) and I'm curious what the naming
>> convention for the library directories are.
>>
>> For Pharo5.0 and earlier, I copied my 32 bit gemstone gci library files
>> (.so on linux) into the pharo-vm directory.
>>
>> For Pharo6.1 I just figured out that I need to copy the gci library
>> files into the pharo-vm/lib/pharo/5.0-201806281256 directory ... at list
>> the libraries are found when I do so?
>>
>> I would like to be able to write a bash script that copies the gci
>> library files into the proper directory, but the directory for the
>> Pharo6.1 vm looks like some kind of magic number and I assume that
>> different builds of the 6.1 vm could have different names and possibly
>> even multiple directories under pharo-vm/lib/pharo/?
>>
>> I haven't looked at Pharo7.0 yet to see what it's pharo-vm directory
>> structure looks like...
>>
>> A pointer to where the naming conventions for these directories is
>> described for Pharo6.x, Pharo7.x and Pharo8.x would be greatly
>> appreciated ... would also be nice if the error message for the "module
>> not found" error could be a bit more descriptive as well ...
>>
>> Thanks,
>>
>> Dale
>>
>> [1] https://github.com/GsDevKit/GemStone-GCI
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: naming convention for pharo-vm/lib/pharo/* directory?

Dale Henrichs-3

Thanks, Nicolas (and Sven),

VM search path is what I am looking for (UFFI external modules) and I am curious whether or not this path `pharo-vm/lib/pharo/5.0-201806281256` is constant or variable for the various Pharo versions or does it vary based on the vm version/build number ... pharo6.0 and pharo.1 appear to have the same path ... haven't looked at Pharo7.0 ... and hopefully the path is the same for mac and unix or does it vary ... I don't have a mac to readily test on:)

The bash script that copies my unix/mac .so/.dylib files will be run immediately after the image and vm have been downloaded so I won't be running the image itself (unless I have to). Currently, the download, installation and build of the pharo client for GemStone is built by a bash script...

I'm going to assume for now that the gci libraries will be shoveled into the pharo-vm/lib/5.0-* directory until someone gives me a more definitive answer...

Dale

On 1/25/19 12:27 PM, Nicolas Cellier wrote:
Oh, maybe you're after PharoLauncher conventions?
I was talking of underlying VM search path.
I remember that the library loading happens in ioLoadModule() both for FFI and external plugins.

Le ven. 25 janv. 2019 à 18:45, Sven Van Caekenberghe <[hidden email]> a écrit :
Maybe FileLocator can help ?

on macOS

FileLocator vmDirectory pathString.
"'/Users/sven/Develop/Pharo/Pharo-Daily/2019-01-24/pharo-vm'"

FileLocator vmBinary pathString.
"'/Users/sven/Develop/Pharo/Pharo-Daily/2019-01-24/pharo-vm/Pharo.app/Contents/MacOS/Pharo'"

on Linux

$ ../bin/pharo Pharo.image eval 'FileLocator vmDirectory pathString'
'/home/t3/pharo/bin/pharo-vm'

$ ../bin/pharo Pharo.image eval 'FileLocator vmBinary pathString'
'/home/t3/pharo/bin/pharo-vm/pharo'

> On 25 Jan 2019, at 18:25, Dale Henrichs <[hidden email]> wrote:
>
> Thanks Nicolas,
>
> Is it as simple as pharo/*, or could there be multiple directories created and I need to pick the right one?
>
> Dale
>
> On 1/25/19 12:48 AM, Nicolas Cellier wrote:
>> I'm afraid it also depends on the overly complex rules burried deep inside the VM...
>> It would be a good thing to try and document it.
>> And if we can't reasonably document it, then we might want to open an issue on opensmalltalk.
>>
>> Le ven. 25 janv. 2019 à 01:51, Dale Henrichs <[hidden email]> a écrit :
>> I am in the process of porting the GemStone-GCI[1] project to Pharo6.1
>> (32 bit) and Pharo7.0 (64 bit) and I'm curious what the naming
>> convention for the library directories are.
>>
>> For Pharo5.0 and earlier, I copied my 32 bit gemstone gci library files
>> (.so on linux) into the pharo-vm directory.
>>
>> For Pharo6.1 I just figured out that I need to copy the gci library
>> files into the pharo-vm/lib/pharo/5.0-201806281256 directory ... at list
>> the libraries are found when I do so?
>>
>> I would like to be able to write a bash script that copies the gci
>> library files into the proper directory, but the directory for the
>> Pharo6.1 vm looks like some kind of magic number and I assume that
>> different builds of the 6.1 vm could have different names and possibly
>> even multiple directories under pharo-vm/lib/pharo/?
>>
>> I haven't looked at Pharo7.0 yet to see what it's pharo-vm directory
>> structure looks like...
>>
>> A pointer to where the naming conventions for these directories is
>> described for Pharo6.x, Pharo7.x and Pharo8.x would be greatly
>> appreciated ... would also be nice if the error message for the "module
>> not found" error could be a bit more descriptive as well ...
>>
>> Thanks,
>>
>> Dale
>>
>> [1] https://github.com/GsDevKit/GemStone-GCI
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: naming convention for pharo-vm/lib/pharo/* directory?

alistairgrant
Hi Dale,

On Fri, 25 Jan 2019 at 22:10, Dale Henrichs
<[hidden email]> wrote:
>
> Thanks, Nicolas (and Sven),
>
> VM search path is what I am looking for (UFFI external modules) and I am curious whether or not this path `pharo-vm/lib/pharo/5.0-201806281256` is constant or variable for the various Pharo versions or does it vary based on the vm version/build number ... pharo6.0 and pharo.1 appear to have the same path ... haven't looked at Pharo7.0 ... and hopefully the path is the same for mac and unix or does it vary ... I don't have a mac to readily test on:)
>
> The bash script that copies my unix/mac .so/.dylib files will be run immediately after the image and vm have been downloaded so I won't be running the image itself (unless I have to). Currently, the download, installation and build of the pharo client for GemStone is built by a bash script...
>
> I'm going to assume for now that the gci libraries will be shoveled into the pharo-vm/lib/5.0-* directory until someone gives me a more definitive answer...

pharo-vm/lib/5.0-* will probably work for any VM that is distributed
through files.pharo.org, but may not be true for custom built VMs,
e.g.:

Installed via zero-conf:

$ vm/pharo --version | grep plugin
plugin path: /home/alistair/pharo7/pharo64.36/vm/pharo-vm/lib/pharo/5.0-201901051900
[default: /home/alistair/pharo7/pharo64.36/vm/pharo-vm/lib/pharo/5.0-201901051900/]

vs built locally:

$ vm.01/pharo --version | grep plugin
plugin path: vm.01/lib/pharo/5.0-201901040101 [default:
/home/alistair/pharo7/pharo64.36/vm.01/lib/pharo/5.0-201901040101/]

Parsing the output of pharo --version is probably the best bet.

HTH,
Alistair