rubyinstallationx86-64therubyracer

therubyracer won't compile


When trying to install therubyracer I get this error:

# gem install therubyracer -v '0.12.1'
Fetching: ref-1.0.5.gem (100%)
Successfully installed ref-1.0.5
Fetching: libv8-3.16.14.3-x86_64-linux.gem (100%)
Successfully installed libv8-3.16.14.3-x86_64-linux
Fetching: therubyracer-0.12.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
checking for main() in -lpthread... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling accessor.cc
compiling array.cc
compiling backref.cc
compiling constants.cc
compiling constraints.cc
compiling context.cc
compiling date.cc
compiling exception.cc
compiling external.cc
compiling function.cc
compiling gc.cc
compiling handles.cc
compiling heap.cc
compiling init.cc
compiling invocation.cc
compiling locker.cc
compiling message.cc
compiling object.cc
compiling primitive.cc
compiling rr.cc
compiling script.cc
compiling signature.cc
compiling stack.cc
compiling string.cc
compiling template.cc
compiling trycatch.cc
compiling v8.cc
compiling value.cc
linking shared-object v8/init.so
g++: error: /usr/local/rvm/gems/ruby-2.1.2@watu/gems/libv8-3.16.14.3-x86_64-linux/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a: No such file or directory
g++: error: /usr/local/rvm/gems/ruby-2.1.2@watu/gems/libv8-3.16.14.3-x86_64-linux/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_snapshot.a: No such file or directory
make: *** [init.so] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.2@watu/gems/therubyracer-0.12.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.2@watu/extensions/x86_64-linux/2.1.0/therubyracer-0.12.1/gem_make.out

This is on an 64 bit server:

# uname -a
Linux einstein 3.14.1-x86_64-linode39 #1 SMP Fri Apr 25 13:07:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux

On another x86_64 server it installs without problems. Any ideas what's going on here?


Solution

  • This is a Linode virtual server that was upgraded from a 32 bit kernel to 64 one. Downgraded the Linux kernel to 32bit solved the problem.