rubyjs / therubyracer

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

Building on SmartOS (Illumos kernel) #256

Closed ghost closed 11 years ago

ghost commented 11 years ago

Whilst building graylog2-webinterface:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /opt/local/bin/ruby193 extconf.rb

creating Makefile

make compiling v8_v8.cpp compiling v8_message.cpp In file included from v8_message.cpp:2:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Message; VALUE = long unsigned int]': v8_message.cpp:10:38: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] compiling v8_external.cpp In file included from v8_external.cpp:4:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::External; VALUE = long unsigned int]': v8_external.cpp:51:60: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] v8_external.cpp:10:9: warning: '{anonymous}::references' defined but not used [-Wunused-variable] compiling v8_function.cpp In file included from v8_function.cpp:5:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Function; VALUE = long unsigned int]': v8_function.cpp:13:40: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Array; VALUE = long unsigned int]': v8_function.cpp:23:55: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::String; VALUE = long unsigned int]': v8_function.cpp:49:51: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] compiling v8_callbacks.cpp compiling rr.cpp rr.cpp: In function 'VALUE rr_definefinalizer(VALUE, void, VALUE)': rr.cpp:48:1: warning: no return statement in function returning non-void [-Wreturn-type] In file included from rr.cpp:3:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Value; VALUE = long unsigned int]': rr.cpp:159:37: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] compiling v8_handle.cpp compiling v8_date.cpp In file included from v8_date.cpp:4:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Date; VALUE = long unsigned int]': v8_date.cpp:21:52: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] compiling v8_debug.cpp compiling v8_template.cpp In file included from v8_template.cpp:2:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Template; VALUE = long unsigned int]': v8_template.cpp:42:39: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::ObjectTemplate; VALUE = long unsigned int]': v8_template.cpp:45:45: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::FunctionTemplate; VALUE = long unsigned int]': v8_template.cpp:48:47: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Data; VALUE = long unsigned int]': v8_template.cpp:54:53: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] compiling v8_array.cpp In file included from v8_array.cpp:1:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Array; VALUE = long unsigned int]': v8_array.cpp:13:36: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] compiling v8_try_catch.cpp v8_trycatch.cpp: In function 'v8::TryCatch {anonymous}::unwrap(VALUE)': v8_trycatch.cpp:15:14: warning: converting 'false' to pointer type 'v8::TryCatch' [-Wconversion-null] compiling v8_exception.cpp In file included from v8_exception.cpp:3:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::StackTrace; VALUE = long unsigned int]': v8_exception.cpp:48:44: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::StackFrame; VALUE = long unsigned int]': v8_exception.cpp:68:43: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] v8_exception.cpp:10:16: warning: '{anonymous}::stack' defined but not used [-Wunused-variable] compiling v8_context.cpp In file included from v8_context.cpp:2:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Context; VALUE = long unsigned int]': v8_context.cpp:15:39: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::ObjectTemplate; VALUE = long unsigned int]': v8_context.cpp:22:143: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Value; VALUE = long unsigned int]': v8_context.cpp:23:110: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] compiling v8_string.cpp In file included from v8_string.cpp:3:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::String; VALUE = long unsigned int]': v8_string.cpp:13:38: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] compiling v8.cpp compiling v8_weakref.cpp compiling v8_locker.cpp v8_locker.cpp: In function 'VALUE {anonymous}::Lock::Delete(VALUE)': v8_locker.cpp:45:5: warning: no return statement in function returning non-void [-Wreturn-type] v8_locker.cpp: In function 'VALUE {anonymous}::Unlock::Delete(VALUE)': v8_locker.cpp:85:5: warning: no return statement in function returning non-void [-Wreturn-type] compiling v8_value.cpp In file included from v8_value.cpp:1:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Value; VALUE = long unsigned int]': v8_value.cpp:10:37: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] compiling v8_object.cpp In file included from v8_object.cpp:1:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Object; VALUE = long unsigned int]': v8_object.cpp:17:39: required from here v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] compiling v8_script.cpp In file included from v8_script.cpp:2:0: v8_handle.h: In instantiation of 'v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Script; VALUE = long unsigned int]': v8_script.cpp:25:56: required from here v8handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] linking shared-object v8.so g++: error: /opt/local/lib/ruby/gems/1.9.3/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a: No such file or directory make: ** [v8.so] Error 1

Gem files will remain installed in /opt/local/lib/ruby/gems/1.9.3/gems/therubyracer-0.10.2 for inspection. Results logged to /opt/local/lib/ruby/gems/1.9.3/gems/therubyracer-0.10.2/ext/v8/gem_make.out

An error occurred while installing therubyracer (0.10.2), and Bundler cannot continue. Make sure that gem install therubyracer -v '0.10.2' succeeds before bundling.

ignisf commented 11 years ago

therubyracer 0.10.2 depends on "libv8", "~> 3.3.10". There is no support for Illumos in the libv8 gem until https://github.com/cowboyd/libv8/commit/9ccf0b7376e00ed059ffbaaf87f4d76dfc94f81b. Please try using an up to date version. Also libv8 has no SPARC support whatsoever.

cowboyd commented 11 years ago

You may have better luck with the just-released 0.12.0