<html><head></head><body><div>Yes, I misunderstood you. I thought you said there were still relative paths in those variables...<br><br></div>
<div><!-- tmjah_g_1299s -->-- <!-- tmjah_g_1299e --><br><!-- tmjah_g_1299s -->From my phone<!-- tmjah_g_1299e --></div>
<div  style="font-size:10.0pt;font-family:"Tahoma","sans-serif";padding:3.0pt 0in 0in 0in">
<hr style="border:none;border-top:solid #E1E1E1 1.0pt">
<b>From:</b> Anton Lundin <glance@acc.umu.se><br>
<b>Sent:</b> Sat Jan 14 12:23:43 PST 2017<br>
<b>To:</b> Dirk Hohndel <dirk@hohndel.org><br>
<b>Cc:</b> Subsurface Mailing List <subsurface@subsurface-divelog.org><br>
<b>Subject:</b> Re: Appimage chdir'ing so relative paths doesn't work<br>
</subsurface@subsurface-divelog.org></dirk@hohndel.org></glance@acc.umu.se></div>
<br>
<pre class="blue">On 14 January, 2017 - Dirk Hohndel wrote:<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> On 14 January, 2017 - Dirk Hohndel wrote:<br> <br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> On Sat, Jan 14, 2017 at 06:56:35PM +0100, Anton Lundin wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"> On 13 January, 2017 - Dirk Hohndel wrote:<br> <br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"> On Thu, Jan 12, 2017 at 09:49:18PM -0800, Dirk Hohndel wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> On Tue, Jan 10, 2017 at 07:17:06PM +0100, probono wrote:<br><blockquote class="gmail_quote"
style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 2017-01-08 19:30 GMT+01:00 Dirk Hohndel <dirk@hohndel.org>:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> On Jan 8, 2017, at 09:38, Anton Lundin <glance@acc.umu.se> wrote:<br> Hi.<br><br> I was about to test some stuff with the appimage-build and noted:<br><br> strace -e chdir,open ./Subsurface-4.6-Beta-2-x86_64.AppImage testdata/ostc4.xml |& grep -E 'ostc|chdir'<br> chdir("/tmp/.mount_xyn3Tx")             = 0<br> chdir("usr")                            = 0<br> open("testdata/ostc4.xml", O_RDONLY) = -1 ENOENT (No such file or directory)<br><br><br> The chdir'ing might make sense in some case, but in this case it really<br> doesn't.<br></blockquote><br> I think it needs to chdir in order to find its
libraries, but I haven't looked<br> at this in enough detail.<br></blockquote> <br> The chdir is required only in cases in which binaries are not<br> relocatable at runtime (i.e., "/usr" is hardcoded at compile time, for<br> example for loading resources). If this is not the case (e.g., in the<br> case of Subsurface), then we should get away without chdir'ing.<br></blockquote> <br> I've played around with this for a bit and it's actually quite a bit more<br> complicated than that. All the paths in AppRun.c are currently relative<br> paths - so this needs a bit of work that goes beyond "just don't do that<br> chdir".<br></blockquote> <br> OK, that took a LOT longer than I expected, but over lunch I finally think<br> I made it work...<br> <br> Anton, can you try the latest AppImage from downloads/daily? That should<br> now avoid the chdir and work with relative paths as well.<br> <br></blockquote> <br> Worked like a charm. I still see quite a bit of relative paths in the<br> trace
prints, and there was quite a bit of them but it worked as<br> expected.<br></blockquote> <br> Not sure where you see them, though. I didn't bother fixing the Python and<br> PERL paths in the AppRun.c that I started from (and as we heard from<br> Simon, I'm clearly on an outdated version), but for LD_LIBRARY_PATH and<br> QT_PLUGIN_PATH we should no longer be using relative paths.<br> <br> Can you show some examples, just to make sure that it works as expected?<br></blockquote> <br> ...<br>   using LD_LIBRARY_PATH=/tmp/.mount_z1TDNY/usr/lib/:/tmp/.mount_z1TDNY/usr/lib/i386-linux-gnu/:/tmp/.mount_z1TDNY/usr/lib/x86_64-linux-gnu/:/tmp/.mount_z1TDNY/usr/lib32/:/tmp/.mount_z1TDNY/usr/lib64/:/tmp/.mount_z1TDNY/lib/:/tmp/.mount_z1TDNY/lib/i386-linux-gnu/:/tmp/.mount_z1TDNY/lib/x86_64-linux-gnu/:/tmp/.mount_z1TDNY/lib32/:/tmp/.mount_z1TDNY/lib64/:<br> ...<br>   using
QT_PLUGIN_PATH=/tmp/.mount_z1TDNY/usr/lib/qt4/plugins/:/tmp/.mount_z1TDNY/usr/lib/i386-linux-gnu/qt4/plugins/:/tmp/.mount_z1TDNY/usr/lib/x86_64-linux-gnu/qt4/plugins/:/tmp/.mount_z1TDNY/usr/lib32/qt4/plugins/:/tmp/.mount_z1TDNY/usr/lib64/qt4/plugins/:/tmp/.mount_z1TDNY/usr/lib/qt5/plugins/:/tmp/.mount_z1TDNY/usr/lib/i386-linux-gnu/qt5/plugins/:/tmp/.mount_z1TDNY/usr/lib/x86_64-linux-gnu/qt5/plugins/:/tmp/.mount_z1TDNY/usr/lib32/qt5/plugins/:/tmp/.mount_z1TDNY/usr/lib64/qt5/plugins/:<br> ...<br> <br></blockquote><br>Wasn't that what you asked for? To verify that they where as expected?<br><br>The relative paths I see are all in variables that are probably<br>irellvant, like XDG_DATA_DIRS, PYTHONPATH and so on, which you said you<br>ignored.<br><br><br>//Anton<br><br></pre></body></html>