bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build problems on old Linux libc5


From: Bruno Haible
Subject: Re: build problems on old Linux libc5
Date: Wed, 25 Oct 2006 14:08:54 +0200
User-agent: KMail/1.9.1

Hello,

Alain Guibert wrote:
> On my old Linux box (Intel Pentium 200 MMX, Debian bo, kernel 2.0.40,
> gcc 2.7.2.1, libc 5.4.33, GNU ld cygnus-2.7.1, libiconv 1.11, pth 2.0.7,
> i586-pc-linux-gnulibc1) during gettext 0.15 build, make fails:
> 
> | /tmp/gettext-0.15>$ ./configure ; make
> | [...]
> | checking pthread.h usability... yes
> | checking pthread.h presence... yes
> | checking for pthread.h... yes
> | checking for pthread_kill in -lpthread... yes
> | checking for pthread_rwlock_t... yes
> | checking for multithread API to use... posix
> | [...]
> | gcc -g -O2 -o .libs/gettext gettext-gettext.o  ../lib/libgrt.a 
> ../intl/.libs/libintl.so -L/usr/local/lib -lc /usr/local/lib/libiconv.so 
> -Wl,--rpath -Wl,/usr/local/lib
> | ../intl/.libs/libintl.so: undefined reference to `__pthread_read'
> | make[3]: *** [gettext] Error 1
> | make[3]: Leaving directory `/tmp/gettext-0.15/gettext-runtime/src'
> | make[2]: *** [all-recursive] Error 1
> | make[2]: Leaving directory `/tmp/gettext-0.15/gettext-runtime'
> | make[1]: *** [all] Error 2
> | make[1]: Leaving directory `/tmp/gettext-0.15/gettext-runtime'
> | make: *** [all-recursive] Error 1
> 
> Note that I built pth 2.0.7 with the --enable-pthread option, so there
> is a pthread.h and a libpthread in /usr/local/{include,lib}. This error
> is absent in gettext 0.14.4.
> 
> To get past this error, I added the --disable-threads option to gettext.

Yes, the --disable-threads option is provided so you can get around weird
problems with older multithread implementations. I don't have time to dig
into the details; Linux libc5 is not a relevant platform nowadays.

> But make still failed later:
> 
> | /tmp/gettext-0.15>$ ./configure --disable-threads ; make
> | [...]
> | gcc -g -O2 -o .libs/msggrep msggrep-msggrep.o  ../libgrep/libgrep.a 
> ./.libs/libgettextsrc.so 
> /tmp/gettext-0.15/gettext-tools/lib/.libs/libgettextlib.so -L/usr/local/lib 
> /tmp/gettext-0.15/gettext-tools/intl/.libs/libintl.so 
> /usr/local/lib/libiconv.so -lc
> | ../libgrep/libgrep.a(dfa.o): In function `match_mb_charset':
> | /tmp/gettext-0.15/gettext-tools/libgrep/dfa.c:2531: undefined reference to 
> `wcscoll'
> | /tmp/gettext-0.15/gettext-tools/libgrep/dfa.c:2531: undefined reference to 
> `wcscoll'
> | make[4]: *** [msggrep] Error 1
> | make[4]: Leaving directory `/tmp/gettext-0.15/gettext-tools/src'
> | make[3]: *** [all] Error 2
> | make[3]: Leaving directory `/tmp/gettext-0.15/gettext-tools/src'
> | make[2]: *** [all-recursive] Error 1
> | make[2]: Leaving directory `/tmp/gettext-0.15/gettext-tools'
> | make[1]: *** [all] Error 2
> | make[1]: Leaving directory `/tmp/gettext-0.15/gettext-tools'
> | make: *** [all-recursive] Error 1
> 
> This error is absent in gettext 0.14.1, present in gettext 0.14.3,
> 0.14.4, and 0.15.

Thanks for reporting this. I'm adding this.

*** gettext-cvs/gettext-tools/m4/libgrep.m4     2005-01-19 15:21:00.000000000 
+0100
--- gettext-6/gettext-tools/m4/libgrep.m4       2006-10-25 03:53:35.000000000 
+0200
***************
*** 1,5 ****
! # libgrep.m4 serial 1 (gettext-0.14.2)
! dnl Copyright (C) 2005 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
  dnl with or without modifications, as long as this notice is preserved.
--- 1,5 ----
! # libgrep.m4 serial 2 (gettext-0.16)
! dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
  dnl with or without modifications, as long as this notice is preserved.
***************
*** 8,13 ****
--- 8,16 ----
  [
    AC_REQUIRE([AM_STDBOOL_H])
    AC_REQUIRE([gl_FUNC_MBRTOWC])
+   AC_CHECK_FUNC([wcscoll], ,
+     [AC_DEFINE([wcscoll], [wcscmp],
+        [Define to wcscmp if the function wcscoll does not exist.])])
    m4_pushdef([AC_LIBOBJ], m4_defn([gt_LIBGREP_OBJ]))
    m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gt_LIBGREP_REPLACE_FUNCS]))
    gl_HARD_LOCALE

> Last one: The old GNU sed 2.05 does not properly execute the script
> gettext-{runtime,tools}/po/insert-header.sin: It inserts HEADER *below*
> msgstr "" (instead of above msgid ""), breaking the po pseudo header.
> I tried to tweak the script to suit such old sed, but did not succeed,
> sorry: It seems "r" prints the file only *after* printing the current
> pattern space, just before the next cycle of normal line input ("N" not
> counting as normal). Noticed that while building GnuPG trunk from SVN:
> 
> | make address@hidden
> | make[3]: Entering directory `/tmp/gnupg20/po'
> | sed -e '/^#/d' -e 's/HEADER/address@hidden/g' ./insert-header.sin > 
> address@hidden
> | address@hidden:
> | msgconv: <stdin>: warning: Charset missing in header.
> |                            Message conversion to user's charset will not 
> work.
> | <stdin>:30:45: parse error
> | msgconv: found 1 fatal error
> | address@hidden:
> | msgmerge address@hidden gnupg2.pot -o address@hidden
> | 
> ..........................................................................................................................................................
>  done.
> | make[3]: Leaving directory `/tmp/gnupg20/po'
> | make[2]: Leaving directory `/tmp/gnupg20/po'
> | rm -f address@hidden && /usr/local/bin/msgfmt -c --statistics -o 
> address@hidden address@hidden
> | /usr/local/bin/msgfmt: address@hidden: warning: PO file header missing or 
> invalid
> |                                    warning: charset conversion will not work
> | /usr/local/bin/msgfmt: found 1 fatal error
> | make[1]: *** address@hidden Error 1
> | make[1]: Leaving directory `/tmp/gnupg20/po'
> | make: *** [stamp-po] Error 2
> 
> In fact the charset indication is there, but the misplaced insertion
> broke the header parsing.

The current version of GNU sed is 4.1.5. You can install it on an older
machine without risk. There's no point in trying to work around bugs in
sed 2.x.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]