cowboyd/therubyracer — Issue #145: Install Fails on FreeBSD 9
Author: thexcoder
Created: 2012-03-03 09:44:16+00:00
State: open

Hi, I'm trying to get therubyracer gem installed on FreeBSD 9 under Ruby 1.9.

I was having issues getting the libv8.a generated when adding the libv8 gem, removing 'lang/v8' and installing 'www/node' then running 'gmake' in 'gems/libv8-3.3.10.4/lib/libv8' has generated libv8.a.

Now when adding therubyracer gem I get the following error:

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

/usr/local/bin/ruby19 extconf.rb
creating Makefile

make
compiling rr.cpp
rr.cpp: In function 'VALUE rr_define_finalizer(VALUE, void*, VALUE)':
rr.cpp:48: warning: control reaches end of non-void function
compiling v8.cpp
In file included from v8.cpp:16:
v8_locker.h:6:7: warning: no newline at end of file
In file included from v8.cpp:17:
v8_debug.h:6:7: warning: no newline at end of file
In file included from v8.cpp:18:
v8_v8.h:6:7: warning: no newline at end of file
compiling v8_array.cpp
v8_array.cpp:48:2: warning: no newline at end of file
compiling v8_callbacks.cpp
compiling v8_context.cpp
compiling v8_date.cpp
v8_date.cpp:34:2: warning: no newline at end of file
compiling v8_debug.cpp
In file included from v8_debug.cpp:2:
v8_debug.h:6:7: warning: no newline at end of file
compiling v8_exception.cpp
v8_exception.cpp:10: warning: '::stack' defined but not used
compiling v8_external.cpp
v8_external.cpp:10: warning: '::references' defined but not used
compiling v8_function.cpp
compiling v8_handle.cpp
compiling v8_locker.cpp
In file included from v8_locker.cpp:2:
v8_locker.h:6:7: warning: no newline at end of file
v8_locker.cpp: In function 'VALUE::Unlock::Delete(VALUE)':
v8_locker.cpp:85: warning: control reaches end of non-void function
v8_locker.cpp: In function 'VALUE::Lock::Delete(VALUE)':
v8_locker.cpp:45: warning: control reaches end of non-void function
compiling v8_message.cpp
compiling v8_object.cpp
compiling v8_script.cpp
compiling v8_string.cpp
compiling v8_template.cpp
compiling v8_try_catch.cpp
compiling v8_v8.cpp
compiling v8_value.cpp
v8_value.cpp:175:2: warning: no newline at end of file
compiling v8_weakref.cpp
linking shared-object v8.so
/usr/bin/ld: /usr/local/lib/ruby/gems/1.9/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a(api.o): relocation R_X86_64_32S against `_ZTVN2v89ExtensionE' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/ruby/gems/1.9/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a: could not read symbols: Bad value
*** Error code 1

Stop in /usr/local/lib/ruby/gems/1.9/gems/therubyracer-0.9.10/ext/v8.

Gem files will remain installed in /usr/local/lib/ruby/gems/1.9/gems/therubyracer-0.9.10 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9/gems/therubyracer-0.9.10/ext/v8/gem_make.out

Any help would be great, Thanks.