force gem to compile 64-bit libraries
I am trying to install fastthread gem on solaris with sun studio compiler and 64-bit ruby, but it is trying to build a 32-bit fastthread.so. How can I force it to build a 64-bit library? Here is what I get:
# gem install fastthread-1.0.7.gem
Building native extensions. This could take a while...
ERROR: Error installing fastthread-1.0.7.gem:
ERROR: Failed to build gem native extension.
/opt/pkg/bin/ruby18 extconf.rb
creating Makefile
make
cc -I. -I/opt/pkg/lib/ruby/1.8/i386-solaris2 -I/opt/pkg/lib/ruby/1.8/i386-solaris2 -I. -D_REENTRANT -I/usr/include -I/opt/pkg/include/db4 -I/opt/pkg/include -KPIC -O -features=extensions -D_REENTRANT -I/usr/include -I/opt/pkg/include/db4 -I/opt/pkg/include -KPIC -c fastthread.c
cc -G -o fastthread.so fastthread.o -L. -L/opt/pkg/lib -R/opt/pkg/lib -L. -L/opt/SUNWspro/lib -Wl,-R/opt/SUNWspro/lib -L/usr/lib -Wl,-R/usr/lib -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -R /opt/pkg/lib -L/opt/pkg/lib -lruby18 -lpthread -lrt -ldl -lcrypt -lm -B static -lsunmath -B dynamic -lm -lpthread -lrt -lc
ld: fatal: file /opt/pkg/lib/libruby18.so: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to fastthread.so
*** Error code 2
make: Fatal error: Command failed for target `fastthread.so'
Thanks
Support Staff 2 Posted by Nick Quaranto on 04 Aug, 2012 06:46 PM
Sorry, this comment was buried in our spam inbox.
Is this still happening?