syslog-ng 1.9.2/eventlog 0.2.2: packaging notes
Balazs, I have a couple of requests to make regarding the packaging of the above packages (for Red Hat/Fedora systems). 1) copyright information I believe both packages are being distributed under the GPL license. Could you mention this in the README files and maybe include the COPYING file in the tarballs? 2) the CFLAGS aren't being inherited The CFLAGS generated by the configure files don't honour the environment CFLAGS variable. Small patches are attached to this email. 3) eventlog static lib Would it be possible to also generate the eventlog static library by default? 4) syslog-ng 1.9.2 Would it be possible to also generate a static linked syslog-ng? Right know it only uses dynamic libraries (glib2.so and libevtlog.so). It would be nice to avoid any dynamic libraries located under /usr as the content of this directory can not yet be available (mounted) at the time the daemon syslog-ng is loaded. Best regards, jpo -- José Pedro Oliveira diff -ruN syslog-ng-1.9.2+20050112+1424-orig/configure.in syslog-ng-1.9.2+20050112+1424/configure.in --- syslog-ng-1.9.2+20050112+1424-orig/configure.in 2005-01-05 12:00:11.000000000 +0000 +++ syslog-ng-1.9.2+20050112+1424/configure.in 2005-01-15 03:22:25.989658032 +0000 @@ -71,7 +71,7 @@ PKG_CHECK_MODULES(GLIB, glib-2.0) PKG_CHECK_MODULES(EVTLOG, eventlog) -CFLAGS="-Wall -g" +CFLAGS="$CFLAGS -Wall -g" DEPS_CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS $EVTLOG_CFLAGS" CPPFLAGS="$DEPS_CPPFLAGS -D_GNU_SOURCE" DEPS_LIBS="$LIBS $GLIB_LIBS $EVTLOG_LIBS" diff -ruN eventlog-0.2.2-orig/configure.in eventlog-0.2.2/configure.in --- eventlog-0.2.2-orig/configure.in 2005-01-05 12:02:18.000000000 +0000 +++ eventlog-0.2.2/configure.in 2005-01-15 03:21:00.591640504 +0000 @@ -5,7 +5,7 @@ AM_CONFIG_HEADER(config.h) AM_DISABLE_STATIC -CFLAGS="-Wall -g" +CFLAGS="$CFLAGS -Wall -g" CPPFLAGS="-D_GNU_SOURCE" AC_ARG_ENABLE(dlsym-wrapper,
Hi Jose, First of all thanks for the feedback, I really appreciate it. I've released new snapshots from eventlog and syslog-ng, hopefully fixing these problems. Fixed versions: eventlog-0.2.3+20050116+1856.tar.gz syslog-ng-1.9.2+20050116+1849.tar.gz On Sat, 2005-01-15 at 03:35 +0000, Jose Pedro Oliveira wrote:
Balazs,
I have a couple of requests to make regarding the packaging of the above packages (for Red Hat/Fedora systems).
1) copyright information
I believe both packages are being distributed under the GPL license. Could you mention this in the README files and maybe include the COPYING file in the tarballs?
eventlog is distributed under a BSD style license, on the other hand syslog-ng is of course GPLd.
2) the CFLAGS aren't being inherited
fixed.
3) eventlog static lib
fixed.
4) syslog-ng 1.9.2
Would it be possible to also generate a static linked syslog-ng? Right know it only uses dynamic libraries (glib2.so and libevtlog.so).
syslog-ng now links statically against glib and eventlog while keeping libc and related libs dynamic. -- Bazsi
Balazs, Thanks. Both packages build without problems. In a couple of days I think will have specfiles for redhat/fedora systems ready (the specfile for eventlog is ready; still have to finish and test the syslog-ng configuration files). Regarding the static linked syslog-ng: would it be possible to do the same for syslog-ng 1.6.5 and the tcp_wrappers library? Please see: https://lists.balabit.hu/pipermail/syslog-ng/2004-October/006559.html Thanks in advance, jpo
First of all thanks for the feedback, I really appreciate it. I've released new snapshots from eventlog and syslog-ng, hopefully fixing these problems.
Fixed versions: eventlog-0.2.3+20050116+1856.tar.gz syslog-ng-1.9.2+20050116+1849.tar.gz
On Sat, 2005-01-15 at 03:35 +0000, Jose Pedro Oliveira wrote:
Balazs,
I have a couple of requests to make regarding the packaging of the above packages (for Red Hat/Fedora systems).
1) copyright information
I believe both packages are being distributed under the GPL license. Could you mention this in the README files and maybe include the COPYING file in the tarballs?
eventlog is distributed under a BSD style license, on the other hand syslog-ng is of course GPLd.
2) the CFLAGS aren't being inherited
fixed.
3) eventlog static lib
fixed.
4) syslog-ng 1.9.2
Would it be possible to also generate a static linked syslog-ng? Right know it only uses dynamic libraries (glib2.so and libevtlog.so).
syslog-ng now links statically against glib and eventlog while keeping libc and related libs dynamic.
-- José Pedro Oliveira * mailto: jpo@di.uminho.pt * http://gsd.di.uminho.pt/~jpo * * gpg fingerprint = F9B6 8D87 859D 1C94 48F0 84C0 9749 9EB5 91BD 851B *
On Mon, 2005-01-17 at 15:27 +0000, José Pedro Oliveira wrote:
Balazs,
Thanks. Both packages build without problems.
In a couple of days I think will have specfiles for redhat/fedora systems ready (the specfile for eventlog is ready; still have to finish and test the syslog-ng configuration files).
Regarding the static linked syslog-ng: would it be possible to do the same for syslog-ng 1.6.5 and the tcp_wrappers library? Please see: https://lists.balabit.hu/pipermail/syslog-ng/2004-October/006559.html
the patch there is not correct as you were patching the generated configure script, not the original in configure.in. the solution should be similar to the solution in syslog-ng 1.9, e.g. add a -Wl,-static in front of -lwrap and a -Wl,-call_shared afterwards. -- Bazsi
Balazs,
the solution should be similar to the solution in syslog-ng 1.9, e.g. add a -Wl,-static in front of -lwrap and a -Wl,-call_shared afterwards.
I will try to submit a new patch (although I am only at beginner's level with autotools). Best regards, jpo -- José Pedro Oliveira * mailto: jpo@di.uminho.pt * http://gsd.di.uminho.pt/~jpo * * gpg fingerprint = F9B6 8D87 859D 1C94 48F0 84C0 9749 9EB5 91BD 851B *
Balazs, The attachment is a new patch against syslog-1.6.5 configure.in. It will static link the flex, the tcpwrappers and libnet libraries. Regards, jpo
Regarding the static linked syslog-ng: would it be possible to do the same for syslog-ng 1.6.5 and the tcp_wrappers library? Please see: https://lists.balabit.hu/pipermail/syslog-ng/2004-October/006559.html
the patch there is not correct as you were patching the generated configure script, not the original in configure.in.
the solution should be similar to the solution in syslog-ng 1.9, e.g. add a -Wl,-static in front of -lwrap and a -Wl,-call_shared afterwards.
-- José Pedro Oliveira * mailto: jpo@di.uminho.pt * http://gsd.di.uminho.pt/~jpo * * gpg fingerprint = F9B6 8D87 859D 1C94 48F0 84C0 9749 9EB5 91BD 851B *
José Pedro Oliveira wrote:
Balazs,
The attachment is a new patch against syslog-1.6.5 configure.in. It will static link the flex, the tcpwrappers and libnet libraries.
I'm not sure I understand your patch but to me the essential part seems to be:
-LIBS="$LIBS $LEXLIB $LIBOL_LIBS" +LIBS="$LIBS -Wl,-static $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS -Wl,-call_shared $LIBOL_LIBS" AC_SUBST(YFLAGS)
AC_SUBST(MAKE_CLASS)
I wonder however why you need this, as it's perfectly ok (at least for me) to statically link syslog-ng and its components setting the LDFLAGS when calling make: # ./configure ... # make LDFLAGS=-static # ldd src/src/syslog-ng not a dynamic executable What am I missing? Another thing I'd like to have fixed when you already fiddling with configure.in :), is the sysconfdir stuff. src/config.h which is generated does not contain the correct PATH_SYSCONFDIR when configure is invoked with --sysconfdir. We have to manually patch it like so (excerpt from our Makefile): # ./configure --prefix=/usr --sysconfdir=/etc # echo "#undef PATH_SYSCONFDIR" >> src/config.h # echo "#define PATH_SYSCONFDIR \"/etc/\"" >> src/config.h Anyone with the same problem? Cheers, Roberto Nibali, ratz -- ------------------------------------------------------------- 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 -------------------------------------------------------------
Roberto,
The attachment is a new patch against syslog-1.6.5 configure.in. It will static link the flex, the tcpwrappers and libnet libraries.
I'm not sure I understand your patch but to me the essential part seems to be:
-LIBS="$LIBS $LEXLIB $LIBOL_LIBS" +LIBS="$LIBS -Wl,-static $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS -Wl,-call_shared $LIBOL_LIBS" AC_SUBST(YFLAGS)
AC_SUBST(MAKE_CLASS)
I wonder however why you need this, as it's perfectly ok (at least for me) to statically link syslog-ng and its components setting the LDFLAGS when calling make:
# ./configure ... # make LDFLAGS=-static # ldd src/src/syslog-ng not a dynamic executable
What am I missing?
Using the "-static" option you static linking *every* library, including the ones installed in /lib (eg: libc). 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. Result (with the patched configure): $ ldd syslog-ng libnsl.so.1 => /lib/libnsl.so.1 (0x043ee000) libresolv.so.2 => /lib/libresolv.so.2 (0x00614000) libc.so.6 => /lib/tls/libc.so.6 (0x002b5000) /lib/ld-linux.so.2 (0x0029c000) Regards, jpo -- José Pedro Oliveira
Hello José,
I wonder however why you need this, as it's perfectly ok (at least for me) to statically link syslog-ng and its components setting the LDFLAGS when calling make:
# ./configure ... # make LDFLAGS=-static # ldd src/src/syslog-ng not a dynamic executable
What am I missing?
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 => /lib/libnsl.so.1 (0x043ee000) libresolv.so.2 => /lib/libresolv.so.2 (0x00614000) libc.so.6 => /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 code still works with our toolchain and static linking including glibc and uclibc. Best regards, Roberto Nibali, ratz -- ------------------------------------------------------------- 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 -------------------------------------------------------------
On Wed, 2005-02-02 at 10:07 +0100, Roberto Nibali wrote:
Hello José,
I wonder however why you need this, as it's perfectly ok (at least for me) to statically link syslog-ng and its components setting the LDFLAGS when calling make:
# ./configure ... # make LDFLAGS=-static # ldd src/src/syslog-ng not a dynamic executable
What am I missing?
Using the "-static" option you static linking *every* library, including the ones installed in /lib (eg: libc).
Interesting, the abyss of GNU make ...
It is not GNU make but GCC which interprets -static and -shared and calls the linker accordingly. I have added a configure option called --enable-full-static which links everything statically: AC_ARG_ENABLE(full-statuc, [ --enable-full-static Link everything in statically],, enable_full_static=no) -- Bazsi
Hello,
It is not GNU make but GCC which interprets -static and -shared and calls the linker accordingly.
Of course.
I have added a configure option called --enable-full-static which links everything statically:
AC_ARG_ENABLE(full-statuc, [ --enable-full-static Link everything in statically],, enable_full_static=no)
I see, will test shortly. I first have to forward patch our internal patches to syslog-ng and check what we can drop ... Thanks, Roberto Nibali, ratz -- ------------------------------------------------------------- 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 -------------------------------------------------------------
Hello,
It is not GNU make but GCC which interprets -static and -shared and calls the linker accordingly.
I have added a configure option called --enable-full-static which links everything statically:
AC_ARG_ENABLE(full-statuc, [ --enable-full-static Link everything in statically],, enable_full_static=no)
I'm sorry, but José's patch broke the full static build. With syslog-ng-1.6.5, and following command set ($BUILD_DIR is the current syslog-ng top directory) : config: cd $(BUILD_DIR); ./configure \ --prefix=/usr \ --sysconfdir=/etc echo "#undef PATH_SYSCONFDIR" >> ${BUILD_DIR}/src/config.h echo "#define PATH_SYSCONFDIR \"/etc/\"" >> ${BUILD_DIR}/src/config.h compile: ${MAKE} -C ${BUILD_DIR} LDFLAGS=-static The resulting linking of syslog-ng will be: $ gcc -g -O2 -Wall -I/usr/include/libol -D_GNU_SOURCE -static -o syslog-ng main.o sources.o center.o filters.o destinations.o log.o cfgfile.o cfg-grammar.o cfg-lex.o affile.o afsocket.o afunix.o afinet.o afinter.o afuser.o afstreams.o afprogram.o afremctrl.o nscache.o utils.o syslog-names.o macros.o -lnsl -lresolv -lfl /usr/lib/libol.a -lnsl $ ldd ${BUILD_DIR}/src/syslog-ng not a dynamic executable The same command set with syslog-ng-1.6.6 (with or without --enable-full-static) yields: $ gcc -g -O2 -Wall -I/usr/include/libol -D_GNU_SOURCE -static -o syslog-ng main.o sources.o center.o filters.o destinations.o log.o cfgfile.o cfg-grammar.o cfg-lex.o affile.o afsocket.o afunix.o afinet.o afinter.o afuser.o afstreams.o afprogram.o afremctrl.o nscache.o utils.o syslog-names.o macros.o -lnsl -lresolv -Wl,-static -lfl -lwrap /usr/lib/libol.a -lnsl -Wl,-call_shared $ ldd src/src/syslog-ng /usr/bin/ldd: src/src/syslog-ng: No such file or directory $ ls -al src/src/syslog-ng -rwxrwxr-x 1 ratz users 412669 Feb 2 12:29 src/src/syslog-ng A typical linker error when full static linking is involved. Please revert the patch or help me find an appropriate fix. Thanks and best regards, Roberto Nibali, ratz -- ------------------------------------------------------------- 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 -------------------------------------------------------------
Hi Bazsi,
I have added a configure option called --enable-full-static which links everything statically:
AC_ARG_ENABLE(full-statuc, ^^^ you need a break ;)
[ --enable-full-static Link everything in statically],, enable_full_static=no)
This patch fixes the typo plus finishes what you maybe wanted to say: --- syslog-ng-1.6.5+20050202/configure.in 2005-01-21 17:50:49.000000000 +0100 +++ syslog-ng-1.6.5+20050202-fixed/configure.in 2005-02-02 16:15:58.000000000 +0100 @@ -59,8 +59,8 @@ [ --enable-spoof-source enable spoof_source feature],, enable_spoof_source=no) -AC_ARG_ENABLE(full-statuc, - [ --enable-full-static Link everything in statically],, +AC_ARG_ENABLE(full-static, + [ --enable-full-static Link everything in /usr statically],, enable_full_static=no) sysconfdir="${sysconfdir}/syslog-ng" Please include before releasing and sorry to José for blaming him, my apologies. Take care, Roberto Nibali, ratz -- ------------------------------------------------------------- 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 -------------------------------------------------------------
On Wed, 2005-02-02 at 16:19 +0100, Roberto Nibali wrote:
Hi Bazsi,
I have added a configure option called --enable-full-static which links everything statically:
AC_ARG_ENABLE(full-statuc, ^^^ you need a break ;)
[ --enable-full-static Link everything in statically],, enable_full_static=no)
This patch fixes the typo plus finishes what you maybe wanted to say:
Thanks ;)
--- syslog-ng-1.6.5+20050202/configure.in 2005-01-21 17:50:49.000000000 +0100 +++ syslog-ng-1.6.5+20050202-fixed/configure.in 2005-02-02 16:15:58.000000000 +0100 @@ -59,8 +59,8 @@ [ --enable-spoof-source enable spoof_source feature],, enable_spoof_source=no)
-AC_ARG_ENABLE(full-statuc, - [ --enable-full-static Link everything in statically],, +AC_ARG_ENABLE(full-static, + [ --enable-full-static Link everything in /usr statically],, enable_full_static=no)
sysconfdir="${sysconfdir}/syslog-ng"
This is not correct. With --enable-full-static everything becomes static, thus it is not needed to set LDFLAGS in any way. /usr libraries are linked in statically by default: if test "$enable_full_static" = "yes"; then LIBS="-static $LIBS $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS $LIBOL_LIBS" else LIBS="$LIBS -Wl,-static $LEXLIB $LIBWRAP_LIBS $LIBNET_LIBS $LIBOL_LIBS -Wl,-call_shared" fi -- Bazsi
This is not correct. With --enable-full-static everything becomes static, thus it is not needed to set LDFLAGS in any way.
Correct, maybe I need a break as well ... So long, Roberto Nibali, ratz -- echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc
participants (5)
-
Balazs Scheidler
-
Jose Pedro Oliveira
-
José Pedro Oliveira
-
Roberto Nibali
-
Roberto Nibali