[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Reasons for Statically linking to Bekely DB?
At 08:16 PM 4/4/2004, Edward Rudd wrote:
>I am compiling my own RPMS for my server, and have noted that several of
>the existing RPMS of Openldap, mostly 2.0.x series, are compiled in such
>a way that the Berkeley DB is statically linked to the server binary as
>opposed to dynamically linked to the system DB library. Is there any
>reason to do this? And will I run into problems if my system ships with
>DB 4.1.25, and I compile OpenLDAP with DB version 4.2.52?
OpenLDAP, by default, links its executables using
libtool --mode=link -static
which means "do not link it [the executable] against any
uninstalled shared libtool libraries" (libtool manual).
Unforunately, with -static, libtool actually won't link
any shared libtool library.
So, you have three choices. Remove libdb.la from your lib
directory. Or don't use -static (edit config.status,
remove -static from LTSTATIC, execute config.status,
make depend, make, ...). Hack libtool so it behaves as
documented.