Fwd: kdelibs compilation error

Alexander Neundorf neundorf at kde.org
Sun Oct 3 21:42:51 CEST 2010


On Friday 01 October 2010, David Faure wrote:
> On Friday 01 October 2010, Tomas Vavra wrote:
> > I have problem with building kdelibs it always finishes with this error:
> > * [while linking kded4]
> > /backup/devel/kde4/build/kdelibs/lib/libnepomuk.so.4: undefined reference
> > to `Soprano::Vocabulary::NAO::userVisible()'

It says "undefined reference", not that it couldn't find libsoprano ?

Stupid question: might the be multiple versions of libsoprano on the system, 
and a wrong one is used here ?

> Alex, can you look into this?

I'll be on a business trip until Wednesday, so no time before that.
I'll have a look afterwards, but I'm always confused by Soprano and friends.

> I spent some time on IRC with Tomas, and I have no idea why he gets this
> error. Well, nepomuk and soprano are both missing on the link line, but
> why, and why not for others... (they are both present on my machine, when
> linking kded4).
>
> kio links to nepomuk and soprano just fine,
> then other things link ok, but then kded4 doesn't link because it links to
> kio, which links to nepomuk, and when this happens it fails as above, due
> to a missing -lsoprano. In fact -lnepomuk is missing too, but apparently it
> finds it as a direct dependency of libkio?

Maybe some RPATH is missing somewhere ?
Somewhere I had a similar problem not too long ago...

> So, what is it that puts dependent libs on the link line? The _LIB_DEPENDS
> things?
> From CMakeCache.txt they look fine (i.e. similar to mine)
> nepomuk_LIB_DEPENDS:STATIC=general;/opt/kde4/lib/libsoprano.so;general;/opt
>/kde4/lib/libsopranoclient.so;general;Qt4::QtCore;general;lpthread;general;Q
>t4::QtGui;general;Qt4::QtDBus;general;kdecore;general;kdeui;
> kio_LIB_DEPENDS:STATIC=general;nepomuk;general;nepomukquery;general;nepomuk
>utils[...]
>
> I thought I understood the idea of "kio links to nepomuk for implementation
> reasons, so it doesn't export it in its LINK_INTERFACE".
> But then why does linking kded4 fail, when kded4 does NOT use
> nepomuk/soprano, unless we add -lsoprano to the link line?
> I'm confused by whether all dependent libs must be listed on the link line
> or not  [btw he uses GNU ld, not gold]. Well, I guess they must be, since
> they are for me.
>
> He tried http://www.davidfaure.fr/2010/kio.diff and this helped link kded4,
> but compilation failed again with the same error when linking
> kutils/kemoticons/tests/kemoticonstest. I think that's because this one
> doesn't use kio directly... It links kemoticons, which links kio, which....
> you get the point. It's indirect.
>
> He's using cmake-2.8.2, just like me, almost (I use the git version).

Alex




More information about the Kde-buildsystem mailing list