Bug 340361 - build links wrong libdb on 64-bit systems
Summary: build links wrong libdb on 64-bit systems
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Directory Server
Version: 1.1.0beta
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 240316 FDS1.1.0
TreeView+ depends on / blocked
 
Reported: 2007-10-19 19:38 UTC by Rich Megginson
Modified: 2015-12-07 17:14 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 17:14:08 UTC
Embargoed:


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

Description Rich Megginson 2007-10-19 19:38:17 UTC
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 19:49:46 UTC
Created attachment 233041 [details]
diffs

Comment 2 Rich Megginson 2007-10-19 20:05:37 UTC
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 22:10:37 UTC
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.