[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettext: -lacl needed for libgettextlib.la
From: |
Bruno Haible |
Subject: |
Re: gettext: -lacl needed for libgettextlib.la |
Date: |
Thu, 1 Feb 2007 03:10:39 +0100 |
User-agent: |
KMail/1.5.4 |
Ralf Wildenhues wrote:
> On Debian GNU/Linux, this happens with CVS gettext:
>
> $ /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -o test-names
> test-names.o libuniname.a ../gnulib-lib/libgettextlib.la
> | gcc -g -O2 -o .libs/test-names test-names.o libuniname.a
> ../gnulib-lib/.libs/libgettextlib.so -lc -lncurses -Wl,--rpath
> -Wl,/home/ralf/local/lib
> | ../gnulib-lib/.libs/libgettextlib.so: undefined reference to `acl_entries'
> | ../gnulib-lib/.libs/libgettextlib.so: undefined reference to `acl_get_file'
> | ../gnulib-lib/.libs/libgettextlib.so: undefined reference to `acl_set_file'
> | ../gnulib-lib/.libs/libgettextlib.so: undefined reference to
> `acl_delete_def_file'
> | ../gnulib-lib/.libs/libgettextlib.so: undefined reference to `acl_get_fd'
> | ../gnulib-lib/.libs/libgettextlib.so: undefined reference to `acl_set_fd'
> | ../gnulib-lib/.libs/libgettextlib.so: undefined reference to `acl_free'
> | ../gnulib-lib/.libs/libgettextlib.so: undefined reference to `acl_from_mode'
> | ../gnulib-lib/.libs/libgettextlib.so: undefined reference to
> `acl_extended_file'
> | collect2: ld returned 1 exit status
>
> The patch below fixes the issue for me
Thanks for the report and patch. Since the link dependencies of libgettextsrc
are contained in gnulib-local/modules/gettext-tools-misc, I'm adding the
additional flags there:
--- gnulib-local/modules/gettext-tools-misc 22 Dec 2006 12:12:07 -0000
1.10
+++ gnulib-local/modules/gettext-tools-misc 1 Feb 2007 02:00:30 -0000
@@ -17,9 +17,10 @@
# Need @LTLIBINTL@ because many source files use gettext().
# Need @LTLIBICONV@ because linebreak.c and striconv.c use iconv().
+# Need @LIB_ACL@ because copy-file.c uses acl.h.
lib_LDFLAGS += \
-release @VERSION@ \
- @LTLIBINTL@ @LTLIBICONV@ -lc @LTNOUNDEF@
+ @LTLIBINTL@ @LTLIBICONV@ @LIBACL@ -lc @LTNOUNDEF@
# Tell the mingw or Cygwin linker which symbols to export.
if WOE32DLL
> While looking into this, I noticed a couple of tests that weren't using
> $LIBS, but where adding that would help for a
> make LIBS=...
>
> workaround; see the second part of the patch.
This is on purpose. The tests attempt to be as strict as possible. Once
libgettextlib.la has been built with -lacl, the link command in the tests
libtool ... --mode=link ${CC} ... ../gnulib-lib/libgettextlib.la ...
should ensure that -lacl is passed to the resulting program if libgettextlib
is linked statically or if the platform requires the dependent libs to be
mentioned when linking programs. If someone gets a failure here, it's a
libtool bug.
Bruno