[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils-4.5.1 and gettext-0.11.5 incompatibility on DEC Alpha
From: |
Bruno Haible |
Subject: |
Re: coreutils-4.5.1 and gettext-0.11.5 incompatibility on DEC Alpha GNU/Linux (Red Hat 6.2) |
Date: |
Tue, 17 Sep 2002 15:46:10 +0200 (CEST) |
Nelson H. F. Beebe writes:
> A build of coreutils-4.5.1 on DEC Alpha GNU/Linux (Red Hat 6.2)
> exposes an apparent incompatibility with gettext-0.11.x:
>
> gcc -g -O2 -o uptime uptime.o ../lib/libfetish.a
> ../lib/libfetish.a
> uptime.o: In function `print_uptime':
> /local/build/coreutils-4.5.1/src/uptime.c:142: undefined reference to
> `ngettext'
> /local/build/coreutils-4.5.1/src/uptime.c:142: undefined reference to
> `ngettext'
> /local/build/coreutils-4.5.1/src/uptime.c:144: undefined reference to
> `ngettext'
> /local/build/coreutils-4.5.1/src/uptime.c:144: undefined reference to
> `ngettext'
> collect2: ld returned 1 exit status
This patch to coreutils should fix it. The explanation is that since
coreutils doesn't specify its need for ngettext, during
autoconfiguration the libc and /usr/include/libintl.h is picked, which
contains 'gettext' but not 'ngettext'. (RedHat 6.2 uses a glibc 2.1.x
I think.)
2002-09-07 Bruno Haible <address@hidden>
* configure.ac: Add need-ngettext to AM_GNU_GETTEXT invocation.
*** configure.ac.bak Fri Aug 9 11:59:57 2002
--- configure.ac Sat Sep 7 15:23:43 2002
***************
*** 244,250 ****
jm_LIB_CHECK
! AM_GNU_GETTEXT([external])
AC_CONFIG_FILES(
Makefile
--- 244,250 ----
jm_LIB_CHECK
! AM_GNU_GETTEXT([external], [need-ngettext])
AC_CONFIG_FILES(
Makefile
> Trapping the preprocessor output shows that there are two colliding
> definitions of ngettext:
> ...
> The result is that uptime.c gets expanded to
>
> ...
> extern char *ngettext (const char *__msgid1,
> const char *__msgid2,
> unsigned long int __n)
> __asm__ ("" "libintl_ngettext" ) ;
> ...
This analysis looks fishy: it doesn't explain why you get a link error
for 'ngettext', not for 'libintl_gettext' and 'libintl_ngettext'.
Bruno