[Kde-pim] kdepim unbuildable with kdesrc-build

Volker Krause vkrause at kde.org
Mon Aug 24 11:58:02 UTC 2015


On Monday 24 August 2015 13:34:52 Christophe Giboudeaux wrote:
> Hi,
> 
> On lundi 24 août 2015 11:42:10 CEST Volker Krause wrote:
> > Hi Martin,
> > 
> > sorry about that.
> > 
> > I'm not exactly sure what is wrong here, I use kdesrc-build myself, for
> > kdepim and everything else of KDE I use, and never had this issue with
> > kdepim. Last time I saw similar issues was in the very early KF5 days,
> > when
> > stuff was still moving a lot, and you are right, these issues are very
> > frustrating to debug.
> > 
> > I also usually have the old builds still around, both in build and install
> > locations, so that sounds similar to your setup, and my kdesrc-build
> > configuration is pretty much vanilla upstream.
> > 
> > I'm also not aware of anything non-standard we do regarding library search
> > paths etc, so without further input I unfortunately have no idea how to
> > improve the situation :-(
> > 
> > Anyone else seeing this, or similar issues with building manually? Which
> > library is picked up over which other one in the case things go wrong, for
> > which target, and what do the CMake config files say for those libraries?
> > I
> > have seen switching between debug and release builds creating duplicate
> > config files, and thus resulting in an outdated one still being around
> > after some time, something similar might be happening here.
> 
> Yes. Seen both since last week.
> 
> The first time after a kmime change and today with a change in messagecore.
> 
> The link error always seem to come from libkmailprivate, eg today:
> 
> [ 87%] Linking CXX executable kmail
> cd /kde/build/5/kdepim/kmail && /usr/bin/cmake -E cmake_link_script
> CMakeFiles/kmail.dir/link.txt --verbose=1
> /home/krop/bin/c++   -Werror=missing-include-dirs -Wall -Wextra -Wmissing-
> include-dirs -Winit-self -Wundef -Wsuggest-attribute=const -g3 -fno-inline -
> DQT_STRICT_ITERATORS  -std=c++0x -fno-exceptions -Wall -Wextra -Wcast-align
> - Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef
> - Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -g 
> -Wl,--enable- new-dtags  -Wl,--as-needed CMakeFiles/kmail.dir/main.cpp.o
> CMakeFiles/ kmail.dir/kmail_debug.cpp.o
> CMakeFiles/kmail.dir/kmail_automoc.cpp.o  -o kmail -rdynamic
> /kde/inst/5/master/lib64/libKF5KontactInterface.so.4.82.0
> libkmailprivate.so.5.0.42 ../pimcommon/libpimcommon.so.5.0.42 ../libkdepim/
> libkdepim.so.5.0.42 /kde/inst/5/master/lib64/libKF5Ldap.so.4.80.0
> /kde/inst/5/ master/lib64/libKF5GAPIDrive.so.5.40.0
> /kde/inst/5/master/lib64/
> libKF5GAPICore.so.5.40.0 /kde/inst/5/master/lib64/libKF5AkonadiContact.so.
> 5.0.41 /kde/inst/5/master/lib64/libKF5Contacts.so.4.91.0 /kde/inst/5/master/
> lib64/libKF5AkonadiWidgets.so.5.0.41 /kde/inst/5/master/lib64/
> libKF5AkonadiCore.so.5.0.41 /kde/inst/5/master/lib64/libKF5ItemModels.so.
> 5.14.0 /kde/inst/5/master/lib64/libKF5Parts.so.5.14.0 /kde/inst/5/master/
> lib64/libKF5KIOWidgets.so.5.14.0 /kde/inst/5/master/lib64/libKF5KIOCore.so.
> 5.14.0 /kde/inst/5/master/lib64/libKF5JobWidgets.so.5.14.0
> /kde/inst/5/master/ lib64/libKF5XmlGui.so.5.14.0
> /kde/inst/5/master/lib64/libKF5TextWidgets.so. 5.14.0
> /kde/inst/5/master/lib64/libKF5SonnetUi.so.5.14.0 /kde/inst/5/master/
> lib64/libKF5Service.so.5.14.0 /kde/inst/5/master/lib64/libKF5Completion.so.
> 5.14.0 /kde/inst/5/master/lib64/libKF5ConfigWidgets.so.5.14.0 /kde/inst/5/
> master/lib64/libKF5Codecs.so.5.14.0 /kde/inst/5/master/lib64/
> libKF5ConfigGui.so.5.14.0
> /kde/inst/5/master/lib64/libKF5ConfigCore.so.5.14.0
> /kde/inst/5/master/lib64/libKF5Auth.so.5.14.0 /kde/inst/5/master/lib64/
> libKF5CoreAddons.so.5.14.0 /kde/inst/5/master/lib64/libKF5WidgetsAddons.so.
> 5.14.0 /usr/lib64/libQt5DBus.so.5.5.1 /usr/lib64/libQt5Xml.so.5.5.1
> /kde/inst/ 5/master/lib64/libKF5I18n.so.5.14.0
> /usr/lib64/libQt5Widgets.so.5.5.1 /usr/ lib64/libQt5Network.so.5.5.1
> /usr/lib64/libQt5Gui.so.5.5.1 /usr/lib64/ libQt5Core.so.5.5.1
> -Wl,-rpath,/kde/build/5/kdepim/kmail:/kde/build/5/kdepim/
> pimcommon:/kde/build/5/kdepim/libkdepim:/kde/inst/5/master/lib64:
> -Wl,-rpath- link,/kde/inst/5/master/lib64
> 
> libkmailprivate.so.5.0.42: undefined reference to
> `MessageCore::StringUtil::formatQuotePrefix(QString const&, QString const&)'
> collect2: error: ld returned 1 exit status
> kmail/CMakeFiles/kmail.dir/build.make:146: recipe for target 'kmail/kmail'
> failed
> make[2]: *** [kmail/kmail] Error 1

Interesting. So this is a missing symbol from messagecore in kmailprivate, 
when building kmail (which does not directly link against messagecore).

All direct dependencies are listed with absolute paths, so there is basically 
nothing that can go wrong there, but for indirect dependencies we end up with 
whatever the linker is finding itself. And it seems like it searches the 
install location first here. That would explain the problem you are seeing.

This also explains why this problem apparently became more frequent recently, 
as Laurent and I have cleaned up the public link interfaces considerably in 
kdepim (cutting down unused dependency graph edges for KMail from ~2200 to 
~900 so far, with positive impact on startup), and I have done quite some BIC 
changes.

Does the linker evaluate R[UN]PATH? If so, I see why this would happen after 
the first install, as make install rewrites that to the install location, 
doesn't it?

regards,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 173 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20150824/58ac3491/attachment.sig>


More information about the Kde-buildsystem mailing list