[Kde-pim] Building kdepimlibs from source error
Daniel Vrátil
dvratil at kde.org
Wed Mar 9 14:43:35 GMT 2016
On Wednesday, March 9, 2016 8:06:48 PM CET Nilesh Kokane wrote:
> While building kdepimlibs throws the following error[1], I've Qt-5.5.0
> installed in /opt and that conflicts with the system Qt5.4.2 in
> /usr/lib/i386(I suspect the cause of error). Input switch to cmake is
> as follows:-
>
>
> $export KF5_PREFIX=/opt/kf5;cmake -DCMAKE_INSTALL_PREFIX=$KF5_PREFIX
> -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/opt/qt-5.5.0/lib/cmake
> ..
>
> cmake thows warning though:
>
> runtime library [libQt5Widgets.so.5] in /usr/lib/i386-linux-gnu may
> be hidden by files in:/opt/qt-5.5.0/lib
This is correct (you want to build against the Qt in prefix, right?)
> [...]
>
> [1] $make
> /opt/qt-5.5.0/lib/libQt5Widgets.so.5: undefined reference to
> `QOpenGLExtensions::flushShared()'
> /opt/qt-5.5.0/lib/libQt5Widgets.so.5: undefined reference to
> `QFontDatabase::isPrivateFamily(QString const&) const'
> [snip]
>
> $make VERBOSE=1
> /usr/bin/c++ -std=c++0x -fno-exceptions -Wall -Wextra -Wcast-align -
> [..]
> gnu/libKF5CoreAddons.so.5.19.0
> /usr/lib/i386-linux-gnu/libQt5Gui.so.5.4.1
> /usr/lib/i386-linux-gnu/libQt5Core.so.5.4.1
> -Wl,-rpath,/home/nilesh/development/kdepimlibs/kdepimlibs/build/akonadi-mime
> /src:/usr/local/lib/i386-linux-gnu:/opt/kf5/lib/i386-linux-gnu:/opt/qt-5.5.0
> /lib
> -Wl,-rpath-link,/usr/local/lib/i386-linux-gnu:/opt/kf5/lib/i386-linux-gnu:/
> opt/qt-5.5.0/lib
>
> It tries to link to the system Qt-5.4.1. I tried setting
> CMAKE_PREFIX_PATH but it didn't help.
CMAKE_PREFIX_PATH only affects where CMake looks for FooConfig.cmake files.
The error above is because linker is trying to resolve symbols against system
Qt instead of the one from /opt.
Looks like you forgot to set LD_LIBRARY_PATH?
>
> -rpath-link orders /usr precedence over /opt. Is that the problem ?
> If so how can I change the sequence ?
Prepending /opt/kf5/lib/i186-linux-gnu to LD_LIBRARY_PATH should make it
preferrential in -rpath-link as well.
Dan
>
> Any clues.?
>
>
> Nilesh Kokane
> _______________________________________________
> KDE PIM mailing list kde-pim at kde.org
> https://mail.kde.org/mailman/listinfo/kde-pim
> KDE PIM home page at http://pim.kde.org/
--
Daniel Vrátil
www.dvratil.cz | dvratil at kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20160309/f5ec6b60/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list