[cairo-bugs] [Bug 35122] QNX 6 configure diff

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Mar 9 08:05:06 PST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=35122

--- Comment #5 from M Joonas Pihlaja <jpihlaja at cc.helsinki.fi> 2011-03-09 08:05:01 PST ---
(In reply to comment #4)
> The issue is this section:
> 
> configure:33670: checking whether cairo's cairo-trace feature could be enabled
> configure:33674: result: no (requires dynamic linker and zlib and real
> pthreads)

Right, you did say that it was to get the trace feature working. Okay, so
here's what I think is happening:  cairo-trace needs real pthreads for
pthread_once() and friends, but our configure test doesn't think libc provides
for real pthreads. This is because many other platforms have weakly linked stub
implementations of the pthread primitives for efficiency reasons in case the
application isn't actually multithreaded.  A pure link test against libc
doesn't work on those platforms as it will give a false positive signal for
pthreads being available in libc when in reality the libc implementation will
error out when it comes time to do something actually thready.  This makes it
impossible to test for real pthread support in libc without actually running
some code and seeing if it fails.

Your patch works around the configuring logic by making it believe that the
user set PTHREAD_LIBS. Our basic bug there is that we consider
PTHREAD_LIBS/CFLAGS=""
in the environment to be unset, even though the user has explicitly told us not
to use any flags or libs at all.  Our deeper bug is that we don't trust libc to
implement pthreads properly, but I'm not sure we can fix that without some old
fashioned "if <your OS>" conditionals.

The reason cairo-trace utility needs to use real pthreads because it would be a
disaster if the application were actually threaded, but cairo trace used libc
stubs (this may be an issue due to cairo-trace LD_PRELOADING the interposer
libcairo-tracer.so.)  On the other hand, using cairo-trace on a threaded
application seems to be a disaster anyway right now, so changing the
cairo-trace requirement from real pthreads might not make a practical
difference. :)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list