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

Re: xpdf



Samuel Thibault wrote:
> Samuel Thibault, le Sat 05 Jan 2008 02:43:59 +0000, a écrit :
>> Aurelien Jarno, le Thu 03 Jan 2008 07:38:02 +0100, a écrit :
>> > >>> I was wondering: since we had to set _dl_dynamic_weak to 1; in
>> > >>> order to get the X11 stubs working properly anyway, maybe we could add
>> > >>> to the debian glibc package a temporary patch that implements the few
>> > >>> stubs, instead of erroneously asking packages to add -lpthread?
>> > 
>> > You can make the patch Hurd specific by using the series.hurd-i386
>> > patch. This way you are sure it won't break other architectures.
>> 
>> Well, I've just put a forward.c in hurd/, so no problem for that:)
>> 
>> However, I've got problems with symbol versions.
> 
> To sum it up in a less detailed way: I couldn't find a solution
> that wouldn't require us to keep a patch in glibc until we rebuild
> every thread-safe library when libpthread eventually gets integrated
> into glibc.  The alternatives I found, however, is on the kind
> of patch: either we just patch the Versions file, or we build a
> libpthread_stubs.so, or we build a libpthread_stubs.a.

Just a note: libpthread-stubs already exists, and has a package in Debian.
See <http://packages.debian.org/libpthread-stubs0> and
<http://packages.debian.org/libpthread-stubs0-dev>.  It uses autoconf to
detect which pthread stubs the native libc provides, and provides stubs
for all other pthread functions.  If no stubs need to exist, the library
itself does not exist, but the package still exists.  pthread-stubs also
provides a pkg-config file, so you can use pkg-config to get the
appropriate linker flags to link in the library (or to not link in the
library if not needed).

All of the stubs exist as weak symbols, so linking to pthread will
override the stubs in libpthread-stubs just like the ones in glibc.
libpthread-stubs always provides exactly those stubs which glibc does not.
Thus, linking to both will give you exactly one stub for each pthread
function.

The impetus for pthread-stubs originally came from testing libxcb on
GNU/Hurd, and talking to people in the Debian GNU/Hurd community.  We also
found that the same problem exists on some variants of BSD (which only have
some of the pthread stubs) and on some proprietary UNIX systems.  If
pthread-stubs does not do what you need, please let us know, and we can
help.

- Josh Triplett

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: