Bug 340361 - build links wrong libdb on 64-bit systems
build links wrong libdb on 64-bit systems
Product: 389
Classification: Community
Component: Directory Server (Show other bugs)
x86_64 Linux
urgent Severity urgent
: ---
: ---
Assigned To: Rich Megginson
Viktor Ashirov
Depends On:
Blocks: 240316 FDS1.1.0
  Show dependency treegraph
Reported: 2007-10-19 15:38 EDT by Rich Megginson
Modified: 2015-12-07 12:14 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-07 12:14:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
diffs (1.47 KB, patch)
2007-10-19 15:49 EDT, Rich Megginson
no flags Details | Diff
cvs commit log (1.31 KB, text/plain)
2007-10-19 16:05 EDT, Rich Megginson
no flags Details

  None (edit)
Description Rich Megginson 2007-10-19 15:38:17 EDT
If you have both db4-devel.x86_64 and db4-devel.i386 installed on an x86_64
system, and you have /usr/lib/libdb-4.x.la, the build (libtool) will attempt to
link with /usr/lib/libdb-4.x.so instead of /usr/lib64/libdb-4.x.so.
Comment 1 Rich Megginson 2007-10-19 15:49:46 EDT
Created attachment 233041 [details]
Comment 2 Rich Megginson 2007-10-19 16:05:37 EDT
Created attachment 233071 [details]
cvs commit log

Reviewed by: nhosoi (Thanks!)
Fix Description: Once again, libtool attempts to be helpful but is instead
harmful.  If you have both db4-devel.i386 and db4-devel.x86_64 installed, this
will install /usr/lib/libdb-4.N.la.  If you use libtool to link with -ldb-4.N,
and you do not specify a search path, libtool will attempt to find this library
in it's default search path, which is something like
/usr/lib/gcc/x86_64/blahblahblah/../../../lib.	This will find
/usr/lib/libdb-4.N.la and will use the information in that file and link the
object with /usr/lib/libdb-4.N.so, instead of just passing -ldb-4.N through to
the linker which is what it ought to do (darn libtool).  In order to make
libtool do the right thing, we must pass in -L$libdir -ldb-4.N to libtool so
that it will use $libdir first in its search path.
Platforms tested: RHEL5 x86_64, RHEL4 x86_64
Flag Day: yes - autotool file changes
Doc impact: no
Comment 3 Rich Megginson 2008-01-02 17:10:37 EST
Verified.  DS builds fine on RHEL5 x86_64 if both db4-devel.i386 and
db4-devel.x86_64 are installed.

Note You need to log in before you can comment on or make changes to this bug.