libpthread report

Alex Dupre ale at
Thu Feb 5 07:54:56 PST 2004

I have recompiled every port (about 200, except openoffice) after the 
switch to libpthread and this is the report of what is not correctly 

1) libGL (XFree86-4-libraries) still uses libc_r. This causes libglut 
linked to libc_r and xscreensaver linked to libc_r and libpthread (plus 
some XFree86-4-client binaries GL related linked to libc_r). I think 
this can be solved modifying the XFree86 imakefile threads template 
(this is the reason for CC: x11)

2) python doesn't build (and it does with PTHREAD_LIBS=-lc_r). It fails 

ranlib libpython2.3.a
c++ -lpthread -Wl,--export-dynamic -o python  Modules/python.o 
libpython2.3.a -lutil   -lm
libpython2.3.a(posixmodule.o): In function `posix_tmpnam':
posixmodule.o(.text+0x3b31): warning: tmpnam() possibly used unsafely; 
consider using mkstemp()
libpython2.3.a(posixmodule.o): In function `posix_tempnam':
posixmodule.o(.text+0x3a80): warning: tempnam() possibly used unsafely; 
consider using mkstemp()
case $MAKEFLAGS in  *-s*)  CC='cc' LDSHARED='cc -shared -lpthread' 
OPT='-DNDEBUG -O -pipe -march=pentium3  -DTHREAD_STACK_SIZE=0x20000' 
./python -E ./ -q build;;  *)  CC='cc' LDSHARED='cc -shared 
-lpthread' OPT='-DNDEBUG -O -pipe -march=pentium3 
-DTHREAD_STACK_SIZE=0x20000' ./python -E ./ build;;  esac

Bad system call (core dumped)
*** Error code 140

(and this is the reason for CC: perky)

3) cvsync still uses libc_r, but I already created a patch that hrs 
forwarded to the author. No problem with libc_r linking anyway.

All the rest seems ok (well, on my specific ports, except OO that's 
compiling). If you like to switch to libpthread my suggestion is to 
recompile the glib/gtk ports *before* recompiling every other ports 
linked to libc_r.
That's all.

Alex Dupre

More information about the freebsd-x11 mailing list