rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 193 forks source link

Build fails on SmartOS #286

Closed timothyklim closed 9 years ago

timothyklim commented 10 years ago

Hi!

I'm trying to install the latest version of therubyracer but I'm getting an error.

$ gem install therubyracer
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
        ERROR: Failed to build gem native extension.

    /home/deploy/.rbenv/versions/2.0.0-p353/bin/ruby extconf.rb
checking for main() in -lpthread... yes
creating Makefile

make "DESTDIR="
compiling locker.cc
compiling v8.cc
compiling backref.cc
compiling primitive.cc
compiling function.cc
compiling init.cc
compiling value.cc
compiling script.cc
compiling handles.cc
compiling external.cc
compiling stack.cc
compiling date.cc
compiling string.cc
compiling rr.cc
compiling signature.cc
compiling context.cc
compiling heap.cc
compiling constraints.cc
compiling accessor.cc
compiling invocation.cc
compiling message.cc
compiling exception.cc
compiling gc.cc
compiling constants.cc
compiling template.cc
compiling trycatch.cc
compiling object.cc
compiling array.cc
linking shared-object v8/init.so
Text relocation remains                         referenced
    against symbol                  offset      in file
.text (section)                     0x18a       /home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.3/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a(api.o)
.rodata (section)                   0x34b       /home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.3/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a(api.o)
.rodata (section)
# ...
# more at https://www.dropbox.com/s/d2kcram01u9qiay/gem_make.out
# ...
__popcountsi2                       0x3e5c      /home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.3/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a(frames.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: error: ld returned 1 exit status
Makefile:231: recipe for target 'init.so' failed
make: *** [init.so] Error 1

Debug info:

$ uname -a
SunOS nodejs 5.11 joyent_20130822T211238Z i86pc i386 i86pc Solaris
$ ruby -v
ruby 2.0.0p353 (2013-11-22 revision 43784) [i386-solaris2.11]
$ ld -V
ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1745 (illumos)
$ gcc -v
Using built-in specs.
COLLECT_GCC=/opt/local/gcc47/bin/gcc
COLLECT_LTO_WRAPPER=/opt/local/gcc47/libexec/gcc/i386-sun-solaris2.11/4.7.3/lto-wrapper
Target: i386-sun-solaris2.11
Configured with: ../gcc-4.7.3/configure --enable-languages='c obj-c++ objc go fortran c++' --enable-shared --enable-long-long --with-local-prefix=/opt/local --enable-libssp --enable-threads=posix --with-boot-ldflags='-static-libstdc++ -static-libgcc -Wl,-R/opt/local/lib ' --disable-nls --enable-__cxa_atexit --with-gxx-include-dir=/opt/local/gcc47/include/c++/ --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/opt/local/bin/gas --prefix=/opt/local/gcc47 --build=i386-sun-solaris2.11 --host=i386-sun-solaris2.11 --infodir=/opt/local/gcc47/info --mandir=/opt/local/gcc47/man
Thread model: posix
gcc version 4.7.3 (GCC)
timothyklim commented 10 years ago

Ruby built with these flags:

RUBY_CFLAGS="-R -fPIC -std=gnu99" RUBY_CONFIGURE_OPTS="rb_cv_have_signbit=yes --disable-install-doc" rbenv install 2.0.0-p353
ignisf commented 9 years ago

@walterdavis, your issue does not seem related to this one, please open a new one. And it also seems that the error is inside of a Ruby header file and not in libv8.