<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-05-06 15:57 GMT+02:00 Jürgen E. <span dir="ltr"><<a href="mailto:jef@norbit.de" target="_blank">jef@norbit.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Alessandro,<br>
<span class=""><br>
On Wed, 06. May 2015 at 10:54:19 +0200, Alessandro Pasotti wrote:<br>
> This runs fine from the build directory:<br>
> LD_LIBRARY_PATH=output/lib/ output/bin/qgis<br>
><br>
> It seems like the install process (make install) removes the runtime path<br>
> from the .so and this causes the problem: running ldd in output/lib/<br>
> doesn't show any Qt 4 lib while running ldd on the installed libqgis_gui.so<br>
> shows libQtCore.so.4 libQtGui.so.4 etc.<br>
<br>
</span>hm, why would a libqgis_gui.so suddenly start to point at libQtCore.so when the<br>
Qt5 version it's linked against is named libQt5Core.so?  Are you sure the<br>
libqgis_gui.so is the shared library you installed and not a previous ony built<br>
with Qt4?<br clear="all"></blockquote><div><br><br></div><div>Yes 100% sure, this was driving me mad, the library built in build tree output directory is the same exact size and time as the installed one but has different md5, this led me to inspect what "make install" does, and to discover that it strips RPATH by default.<br><br></div><div>So, the library in output find the right libraries (Qt5) while the same  RPATH-stripped library in the install directory doesn't, or to be precise, it finds Qt5 but also loads Qt4 (don't ask me why...). <br><br></div><div>Look at this (notice the Qt(4) libs in the installed version, missing from the built output):<br><br><br>ll output/lib/libqgis_gui.so.2.9.0 <br>-rwxrwxr-x 1 ale ale 98778227 mag  6 10:39 output/lib/libqgis_gui.so.2.9.0*<br>md5sum output/lib/libqgis_gui.so.2.9.0<br>5a1070065a2bab8d3d55e973d680a449  output/lib/libqgis_gui.so.2.9.0<br><br> ~/dev/QGIS/build-local-qt5: ll ../../../apps-qt5/lib/libqgis_gui.so.2.9.0<br>-rw-r--r-- 1 ale ale 98778227 mag  6 10:39 ../../../apps-qt5/lib/libqgis_gui.so.2.9.0<br>md5sum ../../../apps-qt5/lib/libqgis_gui.so.2.9.0<br>881453e5b5d087e8d1029af49d1f4026  ../../../apps-qt5/lib/libqgis_gui.so.2.9.0<br><br><br>~/dev/QGIS/build-local-qt5: ldd output/lib/libqgis_gui.so.2.9.0|grep Qt | grep -v Qt5<br>        libQt5Xml.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Xml.so.5 (0x00007fb7925c1000)<br>        libQt5Svg.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5 (0x00007fb792374000)       <br>        libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007fb78ecab000)<br>        libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fb78e34b000)<br></div><div>       ... some more Qt5 and NO Qt (4) ...<br></div><div><br></div></div>~/dev/QGIS/build-local-qt5: ldd ../../../apps-qt5/lib/libqgis_gui.so.2.9.0|grep Qt<br>        libQt5Xml.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Xml.so.5 (0x00007f7779050000)<br>        libQt5Svg.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5 (0x00007f7778e04000)       <br>        libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f777573a000)<br>        libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f7774dda000)<br>        libQtSvg.so.4 => /usr/lib/x86_64-linux-gnu/libQtSvg.so.4 (0x00007f7773f9d000)<br>        libQtGui.so.4 => /usr/lib/x86_64-linux-gnu/libQtGui.so.4 (0x00007f77732e9000)<br>        libQtCore.so.4 => /usr/lib/x86_64-linux-gnu/libQtCore.so.4 (0x00007f7772e04000)<br>       ... ^^^^^^^^^^^^<br></div><div class="gmail_extra">       ... some more Qt5 ....<br></div><div class="gmail_extra"><br><br></div><div class="gmail_extra">Running the installed one with LD_LIBRARY_PATH pointing to the installed libs segfaults immediately.<br></div><div class="gmail_extra">Running the build tree one  with LD_LIBRARY_PATH  pointing to the build tree output works.<br><br></div><div class="gmail_extra">Still investigating...<br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</div></div>