Hi Loic & Sergio,

On Tue, Apr 04, 2017 at 06:19:50PM +0200, Lo??c Minier wrote:
> Hi!
> 
> ...
> 
> If the runtime
> linker can't be found for some reason, create your own wrapper to launch
> your executable by calling the runtime linker directly (run
> "/lib/ld-linux.so.2" to get help output or see man page).

Thank you!

Not finding the loader was the problem.  I think this makes sense since 
classic confinement only mounts the bin directories from the snap 
packages, other directories, e.g. /lib, use the host directory.

Just for the record, the following works for me:

$ export HOSTFS=$SNAP
$ export 
LD_LIBRARY_PATH="$HOSTFS/usr/lib/i386-linux-gnu/libfakeroot:$HOSTFS/usr/local/lib:$HOSTFS/lib/i386-linux-gnu:$HOSTFS/usr/lib/i386-linux-gnu:$HOSTFS/usr/lib/i386-linux-gnu/mesa-egl:$HOSTFS/usr/lib/i386-linux-gnu/mesa:$HOSTFS/lib32:$HOSTFS/usr/lib32:$LD_LIBRARY_PATH"
$ export 
PATH="$HOSTFS/usr/local/sbin:$HOSTFS/usr/local/bin:$HOSTFS/usr/sbin:$HOSTFS/usr/bin:$HOSTFS/sbin:$HOSTFS/bin:$HOSTFS/usr/games:$HOSTFS/usr/local/games:$PATH"
$ $SNAP/lib/ld-linux.so.2 $SNAP/usr/bin/pharo-vm/pharo --version


On Tue, Apr 04, 2017 at 03:17:05PM +0000, Sergio Schvezov wrote:

> I am not sure how the low levels work here wrt to program loaders and
> 32bit versus 64bit support, if they are different, there is currently
> no support in snapcraft for this, which for classic confined snaps
> sets the program loader to a specific binary, you can of course
> override this with a combination of LDFLAGS to set the loader to
> something more appropriate (just make sure the loader comes from the
> core snap or you won't be cross distro or even cross series on
> Ubuntu).

This is what I'll try next.  pharo isn't working properly at the moment 
because it looks for files relative to the executable, and manually 
loading pharo using ld-linux.so.2 is confusing that code.  But this 
needs further investigation on my part (just setting the dynamic-linker
in LDFLAGS isn't working).


> > The project is at: https://github.com/akgrant43/pharo-snap
> > I'm just changing the confinement to classic to reproduce the problems.
> 
> You can't just switch the confinement value, you will need to rebuild.

Yep, I'm doing this.


Thanks again,
Alistair



-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to