[kde-linux] Error compiling kdelibs, libnepomuk.so.4.2.0 not found

Duncan 1i5t5.duncan at cox.net
Tue Jul 28 15:42:22 UTC 2009


Altair Linux <altairlinux at gmail.com> posted
c4c7a8c40907272318s36690781y95fca5795c584455 at mail.gmail.com, excerpted
below, on  Tue, 28 Jul 2009 08:18:46 +0200:

> I am compiling KDE-4.2.4 from stable source code in my Debian Lenny, and
> in one step of "make", I have this:
> 
> [ 97%] Built target nepomuk-rcgen
> Linking CXX shared library ../../lib/libnepomuk.so
> CMakeFiles/nepomuk.dir/resourcedata.o: In function `QHash<QUrl,
> Nepomuk::Variant>::findNode(QUrl const&, un signed int*) const':
> resourcedata.cpp:
(.text._ZNK5QHashI4QUrlN7Nepomuk7VariantEE8findNodeERKS0_Pj[QHash<QUrl,
> Nepomuk::Variant>:
> :findNode(QUrl const&, unsigned int*) const]+0x1b): undefined reference
> to `qHash(QUrl const&)'

> make[2]: *** [lib/libnepomuk.so.4.2.0] Error 1
> make[1]: *** [nepomuk/core/CMakeFiles/nepomuk.dir/all] Error 2

Hi.  I run Gentoo so compile from source, and am on kde-4.2.4 here.  In 
general, "Undefined reference" errors like the above often seem to be due 
to not including the appropriate header files.  I can't get too specific 
however as I don't have nepomuk installed.  See below...

> I search the file "libnepomuk" in rpmfind.net and I see is part of the
> KDE core.
> 
> I go to the nepomuk directory, and I make:
> 
> Hades:/usr/src/KDE-4.2.4/kdelibs/kdelibs-4.2.4/build/nepomuk# make -f
> Makefile
> [  0%] Built target nepomuk-rcgen
> [ 35%] Built target kdecore
> [ 94%] Built target kdeui
> Linking CXX shared library ../../lib/libnepomuk.so
> CMakeFiles/nepomuk.dir/resourcedata.o: In function `QHash<QUrl,
> Nepomuk::Variant>::findNode(QUrl const&, unsigned int*) const':
> resourcedata.cpp:
(.text._ZNK5QHashI4QUrlN7Nepomuk7VariantEE8findNodeERKS0_Pj[QHash<QUrl,
> Nepomuk::Variant>::findNode(QUrl const&, unsigned int*) const]+0x1b):
> undefined reference to `qHash(QUrl const&)'

> make[2]: *** [lib/libnepomuk.so.4.2.0] Error 1
> make[1]: *** [nepomuk/core/CMakeFiles/nepomuk.dir/all] Error 2

Same undefined reference.

> I try:
> 
> # find /usr/src/KDE-4.2.4/kdelibs/kdelibs-4.2.4 -name libnepomuk*.*
> 
> File not found
> 
> My last try, by the moment, search any lib with apt-get, with this name.
> Not found. In this moment, I am reading some threads in Google about
> libnepomuk, but by the moment not solve the problem.

nepomuk is an optional component of kde4, not necessary for the base 
kdelibs/kdebase install, at least, but part of the optional "semantic 
desktop" stuff.  Here, on Gentoo, I decided I didn't need all that stuff, 
and Gentoo makes it easy to turn off, so I did.

But attempting an emerge --pretend nepomuk says I have to turn on 
semantic-desktop for kdelibs, and recompile it first.  Which probably 
means you have to recompile kdelibs with the appropriate support as well.

grepping for semantic-desktop in the kdelibs ebuild reveals that turning 
on semantic-desktop turns on a dependency on Soprano.  So that's gotta be 
installed if you don't have it yet, then recompile kdelibs.

So, you need soprano.  Soprano of course pulls in its own dependencies...

Once you get the dependencies straight, hopefully, it'll build without 
issue.

Meanwhile, back to that semantic desktop stuff.  You may wish to do a bit 
of reading and see what it actually does before you decide whether you 
want it or not.  Basically, it builds a database that allows easy search 
for files containing <whatever>, allowing tagging, etc, some of which is 
automatic, as well.  In general, it's my opinion that fairly logically 
organized folks, those who are already fairly well adapted to working 
with computers and seldom lose stuff as they tend to store stuff in 
highly organized directory structures and remember where it is already, 
as well as know how to use grep and such effectively, may well find the 
whole semantic desktop thing not worth the trouble.  For them, the 
additional overhead of tracking all that extra data in some database just 
takes space and slows things down, as well as being a hassle to build and 
maintain (as you're finding out).  Since they're already reasonably well 
organized, don't lose stuff that often, and already work well enough with 
computers to seldom have trouble finding what they saved even if they 
don't remember /exactly/ where, the benefits are dubious anyway.

OTOH, there's a lot of users that tend to just dump a whole bunch of 
stuff unsorted in $home or My Documents or on the desktop or wherever -- 
if they're lucky and don't end up saving it to some obscure subdir they 
haven't the foggiest how to get back to when they want to use the file 
again.  This type of user also often fails to remember keywords or enough 
else about the data (possibly date, what else it was with, etc) to look 
it up easily, and has little idea how to use existing tools to do so if 
they did.  They remember a few isolated bits about the data, maybe a 
single word and that they got it on a Monday, perhaps a month or two ago, 
but don't know which one.  It's this type of user that the semantic 
desktop really enables, because it's just that sort of factoids that it's 
designed to lookup in its database reasonably fast.  For these users, 
it's an invaluable help they really don't know how they'd do without, 
once they discover it, and it really /can/ make them MUCH more efficient 
at retrieving things that would otherwise end up "somewhere", perhaps 
never to be seen again.

So decide which kind of user you are, and thus whether the semantic 
desktop is worth the hassle of dealing with all those extra dependencies, 
plus all the extra CPU cycles and disk space indexing and storing that 
data is going to require, for you.  For me, it clearly wasn't, and Gentoo 
makes it easy to turn off the bloat.  But I'm not you, and I'm using a 
distribution that makes it easy to setup such choices.  For you, it might 
simply be easier to go thru the dependencies in order and just install 
what it needs, rather than trying to figure out how to turn of the 
feature, even if you'd otherwise not use it enough to be worth it.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




More information about the kde-linux mailing list