[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Always static link in OpenLDAP 2.1?
>>>>> "Kurt" == Kurt D Zeilenga <Kurt@OpenLDAP.org> writes:
> At 10:02 PM 2002-11-11, Ganesan R wrote:
>> This effectively makes all executables static. Is this intentional?
> Yes. The executables have always statically linked -lldap -llber.
Hmm, that's already the case _without_ the -static to cc. cc -static links
all external libraries statically. I am sure this can't be intentional (and
this is certainly not the case with OpenLDAP 2.0). Let's see what
happens when I do "make ldapdelete" in the clients/tools directory.
--
/bin/sh /home/rganesan/builds/openldap-cvs/libtool --mode=link cc -static -g -O2 -o ldapdelete ldapdelete.o lddversion.o ../../libraries/libldif/libldif.a ../../libraries/liblutil/liblutil.a ../../libraries/libldif/libldif.a ../../libraries/libldap/libldap.la ../../libraries/liblber/liblber.la -lsasl -lssl -lcrypto -lresolv -ldl
cc -g -O2 -o ldapdelete ldapdelete.o lddversion.o ../../libraries/libldif/libldif.a ../../libraries/liblutil/liblutil.a ../../libraries/libldif/libldif.a ../../libraries/libldap/.libs/libldap.a /var/tmp/builds/openldap-cvs/libraries/liblber/.libs/liblber.a ../../libraries/liblber/.libs/liblber.a /usr/lib/libsasl.a -ldb -lcrypt -lpam -lssl -lcrypto -lresolv -ldl
--
ldapdelete is explicitly passed libldap and liblber statically, so you don't
need -static. Funnily, libtool appears to eat the -static flag, so even
though -static is passed it the binary is actually linked dynamically! In
my case, I have a /usr/lib/libsasl.la file; somehow libtool decides to
substitute -lsasl with /usr/lib/libsasl.a. Definitely something funny going
on; but I am convinced cc -static is a mistake.
>> Is it okay if I move redo the build using the latest automake
>> too.
> Personally, I have little desire to move to automake.
I take it you wouldn't accept patches moving the build to automake ;-). I'll
update the build with autoconf 2.5x and libtool 1.4.3 when I find time and
send a patch. Upgrading shtool, config.guess and config.sub can be done
independently.
--
Ganesan R