Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 60008 - Cannot emerge kdevelop 3.0.4 becasue of missing symbols from db4
Summary: Cannot emerge kdevelop 3.0.4 becasue of missing symbols from db4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High major
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-10 17:28 UTC by Calin Culianu
Modified: 2004-08-12 06:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Calin Culianu 2004-08-10 17:28:27 UTC
emerge kdevelop eventually dies with a link-error related to db-4.

See bug 51298.

I suspect the problem is that -ldb-4 or -ldb is missing form the link.  Perhaps this is a KDevelop bug and not a gentoo issue, but I don't know.  There is a previous bug (51298) that was closed after someone reported that doing "emerge prune db" fixed the problem.

This is *not* a fix!  As this may remove a db library that is needed by other programs.  For instance, for me this would remove db4, which is needed by subversion on my system.

The proper way to fix this is to _not_ use prune, but rather, to figure out a way to tell kdevelop that it should -ldb-4 in the compile/link.

Should this be done as an LD_FLAG?  Maybe.  Should the kdevelop/configure scripts be fixed? Maybe.

I don't know.. but I do know that emerge -P db is *not* the way to fix this and so this is why I am re-reporting bug 51298 here.

Thanks...


Reproducible: Always
Steps to Reproduce:
1. emerge kdevelop
2. Wait
3. Weep

Actual Results:  

/bin/sh ../../libtool --silent --mode=link --tag=CXX g++ -DAST_DEBUG
-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W
-Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3
-pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions
-fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL
-DQT_NO_COMPAT -DQT_NO_TRANSLATION    -o r++ -L/usr/X11R6/lib -L/usr/qt/3/lib
-L/usr/kde/3.2/lib  main.o libkdevcppsupport.la
../../lib/catalog/libkdevcatalog.la ../../lib/cppparser/libkdevcppparser.la

*** Warning: Linking the executable r++ against the loadable module
*** libkdevcppsupport.so is not portable!
main.o(.gnu.linkonce.t._ZN8GCatalogI3TagE4openERK7QString+0x43): In function
`GCatalog<Tag>::open(QString const&)':
: undefined reference to `db_create_4000'
main.o(.gnu.linkonce.t._ZN8GCatalogI3TagE4openERK7QString+0x4f): In function
`GCatalog<Tag>::open(QString const&)':
: undefined reference to `db_strerror_4000'
main.o(.gnu.linkonce.t._ZN8GCatalogI3TagE4openERK7QString+0x142): In function
`GCatalog<Tag>::open(QString const&)':
: undefined reference to `db_strerror_4000'
main.o(.gnu.linkonce.t._ZN8GCatalogI3TagE4openERK7QString+0x14f): In function
`GCatalog<Tag>::open(QString const&)':
: undefined reference to `db_strerror_4000'
main.o(.gnu.linkonce.t._ZN8GCatalogI3TagE8addIndexERK8QCString+0xa4): In
function `GCatalog<Tag>::addIndex(QCString const&)':
: undefined reference to `db_create_4000'
main.o(.gnu.linkonce.t._ZN8GCatalogI3TagE8addIndexERK8QCString+0xb0): In
function `GCatalog<Tag>::addIndex(QCString const&)':
: undefined reference to `db_strerror_4000'
main.o(.gnu.linkonce.t._ZN8GCatalogI3TagE8addIndexERK8QCString+0x42a): In
function `GCatalog<Tag>::addIndex(QCString const&)':
: undefined reference to `db_strerror_4000'
main.o(.gnu.linkonce.t._ZN8GCatalogI3TagE8addIndexERK8QCString+0x497): In
function `GCatalog<Tag>::addIndex(QCString const&)':
: undefined reference to `db_strerror_4000'
collect2: ld returned 1 exit status



Expected Results:  
Finish compilin.

My USE flags are:

USE="3dnow aalib acpi alsa apache2 apm arts avi bonobo berkdb cdr crypt cups cur
l dedicated dga directfb doc dvd emacs encode esd ethereal evo fbcon foomaticdb
gd gdbm ggi gif gnome gphoto2 gpm gtk guile imap imlib java jikes joystick jpeg
kde ladcca lcms leim libwww mad maildir mbox mmx motif mozilla mpeg mysql nas nc
urses odbc oggvorbis opengl oss pam pda ppds pdflib perl plotutils png python qt
 quicktime readline samba sasl scanner sdl spell sse ssl svga tcltk tcpd tetex t
iff truetype usb wmf wxwindows X Xaw3d xinerama xml xml2 xmms xv zlib x86"

additionally, I have the following db libraries installed:

db-1.85-r1 
db-3.2.9-r9 
db-4.1.25_p1-r3
db-4.0.14-r2
Comment 1 Calin Culianu 2004-08-10 17:34:26 UTC
By manually running:

/bin/sh ../../libtool --silent --mode=link --tag=CXX g++ -DAST_DEBUG -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION    -o r++ -ldb-4.0 -L/usr/X11R6/lib -L/usr/qt/3/lib -L/usr/kde/3.2/lib  main.o libkdevcppsupport.la ../../lib/catalog/libkdevcatalog.la ../../lib/cppparser/libkdevcppparser.la

In the kdevelop-3.0.4 portage workdir in languages/cpp, I can get it to compile.

I added the option: '-ldb-4.0' in order to force kdevelop to use exactly db-4.0.

Somehow.. the ebuilds need to be this smart.. how can we get them to be?
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2004-08-11 05:28:23 UTC
What versions of db do you have installed currently?  It looks like kdevelop wants version 4.0, which should be slotted to install alongside others.
Comment 3 Calin Culianu 2004-08-11 09:32:34 UTC
epm -qa | grep -E ^db yields:
db-1.85-r1
db-3.2.9-r9
db-4.1.25_p1-r3
db-4.0.14-r2

You are right in that kdevelop wants db-4000 (well, it #includes <db.h> which is a symlink to db4.0/db.h in /usr/include). I noticed on my other gentoo box, db.h points to db4.1/db.h in /usr/include, and this meant that I didn't have the link errors, as the default -ldb pointed to the *correct* libdb-4.1.

However, on the box where the error happens, -ldb points to libdb-4.1, but db.h is a symlink to db-4.0 (not 4.1).

Perhaps this is the root of the problem.  This inconsistency with what db.h points to and what the default -ldb is.

Perhaps this is a bug for the berkely db packages and not the kdevelop packagers?

BTW, Caleb, nice work on your Comedi article in the recent Linux Journal!
Comment 4 Caleb Tennis (RETIRED) gentoo-dev 2004-08-11 17:29:39 UTC
Thanks, Calin!

maybe paul can help us.  ccing him.
Comment 5 Paul de Vrieze (RETIRED) gentoo-dev 2004-08-12 02:37:07 UTC
Hmm. it seems that in someway your db setup got screwed. Try adjusting manually by making /usr/include/db.h link to /usr/include/db4.1/db.h . Alternatively remerging db should fix this for you. (the discrepancy between the header and lib is indeed the problem). If it doesn't fix it, please attach the full build log
Comment 6 Calin Culianu 2004-08-12 06:13:04 UTC
Paul,

That did it.  KDevelop now emerges after re-installing db-4.1.

I guess since I am one of the few people that got this problem we can just assume it must have been something I did and not an inherent gentoo or kdevelop issue.  

I have no idea how this could have happened as I never really explicitly did anything to my berkeley db's.  They all pretty much got installed implicitly as a dependency to other software I was interested in.  Strange...

Thanks for your help.