On 17 April 2017 at 11:33, Luke Gorrie <[email protected]> wrote:

> Fighting the VM build in another window. Just now I am able to build the
> 32-bit VM from master and run both the Pharo 5 and Pharo 6 images. The next
> problem is the issue of accessing $HOME. The actual error is
> ExternalLibraryFunction>>invokeWithArguments: failing to call getenv()
> from libc. Simplest way that I can reproduce it here is Smalltalk os
> environment at: 'HOME'.
>

I have resolved this now.

The problem was the VM primitive ioLoadModule() not being able to find
libc. It has some heuristics for where to look but they don't work on
NixOS. I added the relevant folder into $LD_LIBRARY_PATH in my wrapper
script and now it is happy.

There will be a lot of this in my future... finding hard-coded paths for
things like shared libraries and un-hard-coding them. I am not sure what to
do in cases where the paths are in Smalltalk code inside an image, that's
harder to patch than the VM sources or ELF headers etc.

Reply via email to