2015-05-06 14:29 GMT+02:00 Matthias Kuhn <[email protected]>:
>
> On 05/06/2015 10:54 AM, Alessandro Pasotti wrote:
> > 2015-05-04 20:09 GMT+02:00 Matthias Kuhn <[email protected]
> > <mailto:[email protected]>>:
> >
> >
> > >
> > > QScintilla was ok but I forgot to change the links for QWT. Now I
> > > downloaded and built QWT using Qt5 version of qmake, then set the
> > > right path but still no luck... I cannot figure out why it is still
> > > linking to libQtCore.so.4
> > >
> >
> >
> >
> > Just discovered that QGIS built with QT5 runs fine from the build
> > directory but segfaults from the install directory.
> >
> > This runs fine from the build directory:
> > LD_LIBRARY_PATH=output/lib/ output/bin/qgis
> >
> > It seems like the install process (make install) removes the runtime
> > path from the .so and this causes the problem: running ldd in
> > output/lib/ doesn't show any Qt 4 lib while running ldd on the
> > installed libqgis_gui.so shows libQtCore.so.4 libQtGui.so.4 etc.
> >
> > Any idea how to fix this?
> Maybe you find something here:
> http://www.cmake.org/Wiki/CMake_RPATH_handling
>
>
Thanks Mathias and Juergen,
that did the trick:
objdump -x output/lib/libqgis_gui.so.2.9.0|grep RPATH
RPATH
/home/ale/dev/QGIS/build-local-qt5/src/core:/home/ale/dev/QGIS/build-local-qt5/src/gui:/home/ale/dev/QGIS/build-local-qt5/output/lib:/usr/local/qwt-6.1.2/lib:
the problem was /usr/local/qwt-6.1.2/lib that I built against Qt5 and
installed in /usr/local but the system installed Qt4 version was loaded
instead:
ldd ../../../apps-qt5/lib/libqgis_gui.so.2.9.0|grep qwt
libqwt.so.6 => /usr/lib/libqwt.so.6 (0x00007fd0d1da7000)
while:
LD_LIBRARY_PATH=/usr/local/qwt-6.1.2/lib ldd
../../../apps-qt5/lib/libqgis_gui.so.2.9.0|grep qwt
libqwt.so.6 => /usr/local/qwt-6.1.2/lib/libqwt.so.6
(0x00007f291095a000)
this now works:
LD_LIBRARY_PATH=/usr/local/qwt-6.1.2/lib:/home/ale/apps-qt5/lib/
/home/ale/apps-qt5/bin/qgis
I just hope this email thread can be useful to others.
--
Alessandro Pasotti
w3: www.itopen.it
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer