thread mixups in kde/qt

Doug White dwhite at gumbysoft.com
Fri Feb 6 12:37:08 PST 2004


This is a blind post, mostly for the benefit of the archives (and krion
:-) ) since I ran across it in the past couple of days.

If you're getting the "Spinlock called when not threaded." message, its
definitely mixed libraries, usually libc_r and pthread.  What may not be
obvious is where they're coming from in the case of kde & qt.  The qt port
uses it own form of libtool called qmake.  Qmake contains library link
instructions for the platform. If you haven't rebuilt qmake since the
pthread change, it is probably still offering -lc_r to qt, and this causes
the duplicate dependency when qt gets built.

For me, the kdelibs3 port trips over the dependency when it tries to run
an intermediary build tool that links against qt, called dcopidl. Running
it without arguments will trigger the assertion. I was able to build it
with debugging last night, and looking at the backtrace tipped me off that
a library dependency was to blame.

In general, I've found something like this to help find where libc_r
dependencies are coming from:

objdump -x `ldd /path/to/bad/program | awk ' { print $3 }'` | less

Look for occurances of 'libc_r', then see what library they're coming
from, then rebuild the offenders.

As mentioned previously, you can hack around it with libmap until you can
get the older stuff rebuilt.

-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite at gumbysoft.com          |  www.FreeBSD.org


More information about the freebsd-threads mailing list