Compiling ruby with USE=threads fails on solaris 10 with the following message: i386-pc-solaris2.10-gcc -shared -o ../../.ext/i386-solaris2.10/bigdecimal.so bigdecimal.o -L. -L../.. -L. -Wl,-E -Wl,-R -Wl,/nilfisk/home/dve/gentoo-new/usr/lib -L/nilfisk/home/dve/gentoo-new/usr/lib -lruby18 -lpthread -lrt -ldl -lcrypt -lm -lc /nilfisk/home/dve/gentoo-new/usr/lib/gcc/i386-pc-solaris2.10/4.4.3/../../../../i386-pc-solaris2.10/bin/ld: ../../libruby18.so: pthread_mutex_unlock: invalid version 2 (max 0) ../../libruby18.so: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [../../.ext/i386-solaris2.10/bigdecimal.so] Error 1 compiling with USE="-threads" works fine
can you try if manually replacing -lpthread with -pthread solves the issue?
I changed -lpthread in the Makefiles and rbconfig.rb to -pthread and then it compiles fine.
I fixed this a bit hacky in the configure script by relying on GCC's -pthread unconditionally.