[Interest] Qt 5.12 official build on Ubuntu 14.04
thiago.macieira at intel.com
Fri Mar 15 03:32:49 CET 2019
On Thursday, 14 March 2019 07:31:45 PDT René J. V. Bertin wrote:
> Thiago Macieira wrote:
> > more likely, a *library* difference: something may be calling
> > QCoreApplication::setLibraryPaths(). instead of
> > QCoreApplication::addLibraryPath().
> I thought about that too, but can now say that I can indeed switch between
> the 2 behaviours simply by including the KDECompilerSettings ECM module or
> This is probably determining: without that module, LD_LIBRARY_PATH has no
> %> /opt/Qt/5/5.12.1/thisQt.sh ldd qstyle-demo/build/bin/qstyle-demo | & head
> linux-vdso.so.1 => (0x00007ffdfe9e6000)
> libQt5Widgets.so.5 => /opt/local/libexec/qt5/lib/libQt5Widgets.so.5
> But when I include the module ldd shows that LD_LIBRARY_PATH does have
> effect: %> /opt/Qt/5/5.12.1/thisQt.sh ldd qstyle-demo/build/bin/qstyle-demo
> | & head linux-vdso.so.1 => (0x00007fff851a0000)
> libQt5Widgets.so.5 => /opt/Qt/5/5.12.1/gcc_64/lib/libQt5Widgets.so.5
Use eu-readelf -d on one of your binaries or libraries and see if they have
RUNPATH and RPATH entries. If it has RPATH without RUNPATH, then those take
effect before RUNPATH. That ELF dynamic tag entry has been deprecated for
years, so if your distribution is still creating them, you should complain to
them. (They won't listen, but you should complain)
> Could --enable-new-dtags be the linker option that makes the difference?
Indeed it is. ECM is probably enabling passing that option, which enables
RUNPATH, which means LD_LIBRARY_PATH now works.
Note that LD_LIBRARY_PATH has nothing to do with how QtCore finds plugins, but
it does change *which* QtCore gets loaded and which Qt libraries are attempted
to be loaded for each plugin.
> QLibraryPrivate::loadPlugin failed on
> "/opt/local/share/qt5/plugins/platforms/libqxcb.so" : "Cannot load library
> (/opt/local/libexec/qt5/lib/libQt5Core.so.5: version `Qt_5.12' not found
> (required by /opt/Qt/5/5.12.1/gcc_64/lib/libQt5XcbQpa.so.5))"
The LD_LIBRARY_PATH makes this difference.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel System Software Products
More information about the Interest