On 2012/07/04 04:00, Benjamin wrote:
> Hi ports@,
> 
> While testing Redmine I experienced a crash with ruby-rmagick. Turns
> out it came from a dependency (ImageMagick) linking to
> /usr/X11R6/lib/libpthread-stubs.so.1.0, which doesn't have the symbol
> pthread_mutexattr_init defined:
> 
> ruby18:/usr/local/lib/libMagickCore.so.3.0: undefined symbol
> 'pthread_mutexattr_init'
> lazy binding failed!
> /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.so:
> [BUG] Segmentation fault
> ruby 1.8.7 (2012-02-08 patchlevel 358) [i386-openbsd]
> 
> Workaround is to use the system libpthread:
> env LD_PRELOAD=/usr/lib/libpthread.so.16.0
> 
> I don't really know how to fix it properly, it makes sense to link
> ImageMagick to the pthread lib in X11R6, and I don't know if there
> will be any problem linking to /usr/lib/libpthread.so.16.0 instead. I
> figured someone here can think of a solution.
> 
> I ran current (from today) and all the packages are up to date. I
> tried to install ImageMagick from ports and from the packaging
> system, both had the same problem.
> 
> Hope it helps,
> Bye,
> 
> Benjamin
> 

ruby18 isn't linked with -pthread, your LD_PRELOAD workaround is ok,
or you could use ruby19 if this works with all the modules you need
as this is linked with -pthread.

linking the library or module with -lpthread is wrong and can cause
problems.

Reply via email to