[syslog-ng]syslog-ng 1.9.2/1.6.5 static linking

Roberto Nibali syslog-ng@lists.balabit.hu
Wed, 02 Feb 2005 10:07:40 +0100


Hello Jos=E9,

>> I wonder however why you need this, as it's perfectly ok (at least for=
=20
>> me) to statically link syslog-ng and its components setting the=20
>> LDFLAGS when calling make:
>>
>> # ./configure ...
>> # make LDFLAGS=3D-static
>> # ldd src/src/syslog-ng
>>         not a dynamic executable
>>
>> What am I missing?
> =20
> Using the "-static" option you static linking *every* library,
> including the ones installed in /lib (eg: libc).

Interesting, the abyss of GNU make ...

> With the patch you are only static linking libraries that
> have been installed under the /usr directory (/usr/lib,
> /usr/local/lib, ...).  You probably don't need to static
> link libc and other /lib libraries.

We do, but that's a different story.

> Result (with the patched configure):
> $ ldd syslog-ng
>         libnsl.so.1 =3D> /lib/libnsl.so.1 (0x043ee000)
>         libresolv.so.2 =3D> /lib/libresolv.so.2 (0x00614000)
>         libc.so.6 =3D> /lib/tls/libc.so.6 (0x002b5000)
>         /lib/ld-linux.so.2 (0x0029c000)

Thanks for the explanation. I'll check if the newest syslog-ng source cod=
e still
works with our toolchain and static linking including glibc and uclibc.

Best regards,
Roberto Nibali, ratz
--=20
-------------------------------------------------------------
addr://Rathausgasse 31, CH-5001 Aarau  tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
terreActive AG                       Wir sichern Ihren Erfolg
-------------------------------------------------------------