force gem to compile 64-bit libraries

JL's Avatar

JL

08 Nov, 2011 02:14 PM

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

  1. Support Staff 1 Posted by Nick Quaranto on 04 Aug, 2012 06:46 PM

    Nick Quaranto's Avatar

    Sorry, this comment was buried in our spam inbox.

    Is this still happening?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

30 Oct, 2014 02:46 PM
28 Oct, 2014 09:51 AM
23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM
18 Oct, 2014 08:39 PM