[cairo] Recent pthread mutexes addition in cairo
Albert Chin
cairo at mlists.thewrittenword.com
Fri Jul 8 17:14:14 PDT 2005
On Fri, Jul 08, 2005 at 07:55:58PM -0400, Jason Dorje Short wrote:
> Albert Chin wrote:
> > We have access to a diverse set of systems so I tried to determine
> > what platforms would require -lpthread because of the recent addition
> > of the pthread_mutex_* functions for cache locking:
>
> I don't see what the purpose of this is. Simply add an
>
> AC_CHECK_LIB([pthread], [pthread_mutex_init], [LIBS="-lpthread"], [])
>
> to configure.ac and everything should be taken care of.
We ran into a problem on IRIX yesterday building AbiWord. Aspell has
the same usage of posix_mutex_* as Cairo now does. The Enchant spell
checking library is used by AbiWord to perform spell checking. Enchant
uses the Aspell library as a loadable module. Because IRIX doesn't
have usable posix_mutex_* stub functions in libc, -lpthread was used
when creating the Aspell shared library. Enchant was built without
-lpthread, but it needed to load a library built with -lpthread. When
running the Enchant program to list the available backend loadable
modules, the program SEGV'd in the dlclose() routine. While Enchant
was able to use g_module_open() to load the Aspell shared library,
dlclose() would SEGV only because a binary linked without -lpthread
tried to load a library with -lpthread.
Based on my previous email, AIX, Tru64 UNIX, and IRIX are the systems
without posix_mutex_* stubs in libc. Yet, for Enchant anyway, IRIX was
the only platform SEGV'ing while loading a library built with
-lpthread. Because Cairo now requires -lpthread on these platforms,
I'm simply trying to point out possible problems of this new
requirement.
--
albert chin (china at thewrittenword.com)
More information about the cairo
mailing list