[Bug 114] New: configure strips -ldl -lrt for static linking but doesn' t add back with dynamic linking
https://bugzilla.balabit.com/show_bug.cgi?id=114 Summary: configure strips -ldl -lrt for static linking but doesn't add back with dynamic linking Product: syslog-ng Version: 3.2.x Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: unspecified Component: syslog-ng AssignedTo: bazsi@balabit.hu ReportedBy: arekm@maven.pl Type of the Report: --- Estimated Hours: 0.0 configure.in when detecting glib strips -ldl and -lrt to prevent static linking with these libraries. # strip out -ldl & -lrt as it cannot be linked statically GLIB_LIBS=`echo $GLIB_LIBS | tr ' ' '\n' | egrep -v "^(-ldld?)|(-lrt)$" | tr '\n' ' '` This is fine. Unfortunately it doesn't add -ldl and -lrt back with dynamic linking and that causes newer glib detection to fail: configure:14223: checking for g_hash_table_new configure:14223: x86_64-pld-linux-gcc -std=gnu99 -o conftest -O2 -fno-strict-aliasing -fwrapv -march=x86-64 -gdwarf-3 -g2 -Wall -D_FORTIFY_SOURCE=2 -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc conftest.c -Wl,-Bstatic -Wl,--export-dynamic -pthread -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -Wl,-Bdynamic >&5 /usr/lib64/gcc/x86_64-pld-linux/4.5.2/../../../../lib64/libglib-2.0.a(gmain.o): In function `g_get_monotonic_time': (.text+0x2e12): undefined reference to `clock_gettime' collect2: ld returned 1 exit status -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=114 --- Comment #1 from Balazs Scheidler <bazsi@balabit.hu> 2011-02-23 10:44:28 --- thanks for the report. does this patch help for you? diff --git a/configure.in b/configure.in index 89c7cd6..48dfee8 100644 --- a/configure.in +++ b/configure.in @@ -479,7 +479,7 @@ if test "$linking_mode" != "dynamic"; then GLIB_LIBS=`echo $GLIB_LIBS | tr ' ' '\n' | egrep -v "^(-ldld?)|(-lrt)$" | tr '\n' ' '` old_LIBS=$LIBS - LIBS="$LD_START_STATIC $GLIB_LIBS $LD_END_STATIC" + LIBS="$LD_START_STATIC $GLIB_LIBS $LD_END_STATIC $BASE_LIBS" AC_CHECK_FUNC(g_hash_table_new, blb_cv_static_glib=yes, blb_cv_static_glib=no) LIBS=$old_LIBS fi I'll commit it if it does. -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=114 --- Comment #2 from Arkadiusz Miśkiewicz <arekm@maven.pl> 2011-02-23 10:50:33 --- It helps, thanks. -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=114 Balazs Scheidler <bazsi@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution| |FIXED Status|NEW |RESOLVED --- Comment #3 from Balazs Scheidler <bazsi@balabit.hu> 2011-10-23 09:23:12 --- this patch was committed, closing this bugreport. commit 0c17271d47cd70ae50cb292a2fe13f3a7b476f32 Author: Balazs Scheidler <bazsi@balabit.hu> Date: Sun Sep 12 08:28:34 2010 +0200 configure.in: fix mixed linking and cleaned up configure.in contents This patch overhauls configure.in a little to make it more readable and also fixes mixed linking while completely wiping out static linking (which wouldn't work together with plugins, right?) -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla@bugzilla.balabit.com