Package: libtool Version: 2.2.6a-1 Severity: minor
When using LTDL_INIT in configure, it causes -ldl to be added to LIBS, thus later causing all the programs in a package (that uses ltdl) to be linked with dl, even if not all would need it, see below. I think it would be better if LIBLTDL would contain -ldl, and thus only programs that actually use ltdl get linked with dl, and not all. This happens because the LT_DLLOADERS macro uses AC_SEARCH_LIBS that sets LIBS, and LIBS is not saved/restored before/after: LIBADD_DLOPEN= AC_SEARCH_LIBS([dlopen], [dl], ... LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])]) if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes then lt_save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" AC_CHECK_FUNCS([dlerror]) LIBS="$lt_save_LIBS" fi Here is a snippet from the output of 'sh -x ./configure': + LIBS= + printf '%s\n' 'configure:11758: result: -ldl' + printf '%s\n' -ldl + ac_res=-ldl + test -ldl '!=' no + test -ldl = 'none required' + LIBS='-ldl ' + cat + test -ldl '!=' 'none required' + LIBADD_DLOPEN=-ldl + libltdl_cv_lib_dl_dlopen=yes + LT_DLLOADERS=' dlopen.la' + test x = xyes + test xyes = xyes + lt_save_LIBS='-ldl ' Also configure snippet: if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF if test "$ac_cv_search_dlopen" != "none required" ; then LIBADD_DLOPEN="-ldl" fi ... if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes then lt_save_LIBS="$LIBS" -- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.28.7 (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages libtool depends on: ii autotools-dev 20080123.2 Update infrastructure for config.{ ii bcc [c-compiler] 0.16.17-3 16-bit x86 C compiler ii cpp 4:4.3.3-2 The GNU C preprocessor (cpp) ii file 4.26-2 Determines file type using "magic" ii gcc [c-compiler] 4:4.3.3-2 The GNU C compiler ii gcc-3.4 [c-compiler] 3.4.6-9 The GNU C compiler ii gcc-4.1 [c-compiler] 4.1.2-25 The GNU C compiler ii gcc-4.2 [c-compiler] 4.2.4-6 The GNU C compiler ii gcc-4.3 [c-compiler] 4.3.3-5 The GNU C compiler ii libc6-dev [libc-dev] 2.9-4 GNU C Library: Development Librari Versions of packages libtool recommends: ii libltdl7-dev 2.2.6a-1 A system independent dlopen wrappe Versions of packages libtool suggests: ii autoconf 2.63-3 automatic configure script builder ii automake [automaken] 1:1.10.1-3 A tool for generating GNU Standard ii automake1.7 [automaken] 1.7.9-9 A tool for generating GNU Standard pn gcj <none> (no description available) pn gfortran | fortran95-compiler <none> (no description available) pn libtool-doc <none> (no description available) -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org