Appimage chdir'ing so relative paths doesn't work

Anton Lundin glance at acc.umu.se
Sun Jan 8 11:15:24 PST 2017


On 08 January, 2017 - Dirk Hohndel wrote:

> 
> 
> > On Jan 8, 2017, at 09:38, Anton Lundin <glance at acc.umu.se> wrote:
> > 
> > Hi.
> > 
> > I was about to test some stuff with the appimage-build and noted:
> > 
> > strace -e chdir,open ./Subsurface-4.6-Beta-2-x86_64.AppImage testdata/ostc4.xml |& grep -E 'ostc|chdir'
> > chdir("/tmp/.mount_xyn3Tx")             = 0
> > chdir("usr")                            = 0
> > open("testdata/ostc4.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
> > 
> > 
> > The chdir'ing might make sense in some case, but in this case it really
> > doesn't.
> 
> I think it needs to chdir in order to find its libraries, but I haven't looked
> at this in enough detail.
> 
> Simon, any comment on that?

There's no RPATH in the binary, so is controlled by LD_LIBRARY_PATH and
then there is as far as I see it no reason to chdir anywhere.


If there's a reason for the chdir which I can't find in the source, it
could probably be solved with RPATH and $ORIGIN.


//Anton


-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list