Compiling arts in -CURRENT without -pthread

Arjan van Leeuwen avleeuwen at piwebs.com
Sat Sep 20 03:56:20 PDT 2003


Hi,

I'm trying to compile arts (audio/arts) in -CURRENT. I replaced -lpthread with 
${PTHREAD_LIBS} in the ports' configure script. This makes it recognize -lc_r 
correctly, and it also uses that when building the port.

However, after some time, the port will fail with these error messages:

---***start***---
/bin/sh ../libtool --silent --mode=link --tag=CXX c++  -Wnon-virtual-dtor 
-Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG 
-DNO_DEBUG -O2 -pipe -mfpmath=sse -march=athlon-xp -fmemoize-lookups 
-fsave-memoized -fno-exceptions -fno-check-new  -ftemplate-depth-99    -o 
libmcop_mt.la.closure libmcop_mt_la_closure.lo -no-undefined -version-info 
1:0   threads_posix.lo ../mcop/libmcop.la -lc_r  -Wl,-export-dynamic -L/usr/
local/lib -L/usr/X11R6/lib -ljpeg  -L/usr/X11R6/lib
libtool: link: warning: `-version-info' is ignored for programs
.libs/threads_posix.o: In function 
`Arts::PosixThreads::pth_rec_cond_wait_timed(Arts::PosixThreads::_GslCond*, 
Arts::PosixThreads::_GslMutex*, unsigned long, unsigned long)':
.libs/threads_posix.o(.text+0xad): undefined reference to 
`pthread_cond_timedwait'
.libs/threads_posix.o: In function 
`Arts::PosixThreads::PosixThreads::isMainThread()':
.libs/
threads_posix.o(.gnu.linkonce.t._ZN4Arts12PosixThreads12PosixThreads12isMainThreadEv
+0x19): undefined reference to `pthread_equal'
.libs/threads_posix.o: In function 
`Arts::PosixThreads::Thread_impl::setPriority(int)':
.libs/
threads_posix.o(.gnu.linkonce.t._ZN4Arts12PosixThreads11Thread_impl11setPriorityEi
+0x25): undefined reference to `pthread_setschedparam'
.libs/threads_posix.o: In function `Arts::PosixThreads::Thread_impl::start()':
.libs/
threads_posix.o(.gnu.linkonce.t._ZN4Arts12PosixThreads11Thread_impl5startEv
+0x24): undefined reference to `pthread_create'
.libs/threads_posix.o: In function 
`Arts::PosixThreads::Thread_impl::waitDone()':
.libs/
threads_posix.o(.gnu.linkonce.t._ZN4Arts12PosixThreads11Thread_impl8waitDoneEv
+0x17): undefined reference to `pthread_join'
gmake[2]: *** [libmcop_mt.la.closure] Error 1
gmake[2]: Leaving directory `/usr/ports/audio/arts/work/arts-1.1.4/mcop_mt'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/audio/arts/work/arts-1.1.4'
gmake: *** [all] Error 2
*** Error code 2
---***end***---

How can all these pthread_* functions be undefined when it is linking against 
-lc_r?

Arjan



More information about the freebsd-threads mailing list