Subject: FreeBSD and "Spinlock called when not threaded" and arts and glib2
To: None <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 05/03/2005 23:17:50
audio/arts build failed on FreeBSD 5.3-RELEASE with:

 gmake[3]: Entering directory
 ../mcopidl/mcopidl -t ../flow/artsflow.idl
 Fatal error 'Spinlock called when not threaded.' at line 83 in file
 /usr/src/lib/libpthread/thread/thr_spinlock.c (errno = 0)
 gmake[3]: *** [] Abort trap (core dumped)
 gmake[3]: Leaving directory

If I understand correctly, this is caused by some offending library
that links with libc_r instead of libpthread.

I think I tracked it down to /usr/pkg/lib/

But the pkgsrc/glib2/Makefile says:

# FreeBSD fix for libgthread:
# Be sure libgthread is linked to the threaded library (libc_r), otherwise
# -pthread is added and this won't work with libraries, only executable
# binaries.

Any ideas about this?

Is the above FreeBSD fix applicable for FreeBSD 5.3 or is it for FreeBSD
-current or FreeBSD 4.x??

 Jeremy C. Reed

p.s. By the way, I use pkgsrc under FreeBSD, because a few times I have
found that FreeBSD ports are way out of date for the software I need.