[Top][All Lists]

[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: Tue, 21 Nov 2006 22:27:37 +0100
User-agent: KMail/1.9.1

Alain Guibert wrote:
> When I do this exactly as you, gettext 0.16 builds properly. The problem
> trigger seems to be in pth.h when "#define PTH_SYSCALL_SOFT 1".
> When PTH_SYSCALL_SOFT is manually edited to 1, or pth 2.0.7 is built
> explicitly with --enable-syscall-soft, or syscall-soft is implicitly
> forced by --enable-pthread, then gettext build fails.

That is to be expected. If you read the pth.3 manual page, there is this

       Soft System Call Mapping

       This variant is available on all platforms and can always
       be enabled by building Pth with "--enable-syscall-soft".
       This then triggers some "#define"'s in the "pth.h" header
       which map for instance read(3) to pth_read(3), etc. Cur-
       rently the following functions are mapped: fork(2),
       nanosleep(3), usleep(3), sleep(3), sigwait(3), waitpid(2),
       system(3), select(2), poll(2), connect(2), accept(2),
       read(2), write(2), recv(2), send(2), recvfrom(2),

       The drawback of this approach is just that really all
       source files of the application where these function calls
       occur have to include "pth.h", of course. And this also
       means that existing libraries, including the vendor's
       stdio, usually will still block the whole process if one
       of its I/O functions block.

You didn't change the source code of gettext so that every file includes
"pth.h", did you?

> while with --enable-threads=pth:
> | ../intl/.libs/libintl.so: undefined reference to `pth_read'

You should not only show the error message, but also the command that leads
to it:

gcc -DINSTALLDIR=\".\" -g -O2 -o .libs/tstgettext tstgettext-tstgettext.o 
tstgettext-setlocale.o  -L/prefix-pthsoft/lib 
../gnulib-lib/.libs/libgettextlib.so ../intl/.libs/libgnuintl.so -lc 
-Wl,--rpath -Wl,/prefix-pthsoft/lib
../intl/.libs/libgnuintl.so: undefined reference to `pth_read'

What you see here is that no -lpth is on the link command line. On purpose:
gettext uses weak references so that libintl does not need to depend on
libpth. But when you have a
   #define read pth_read
a weak reference will not be enough.

In summary, --enable-syscall-soft is usable only in specific situations.


reply via email to

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