Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Build process fails on Debian Squeeze #135

Closed
jmacdonald opened this issue Jan 5, 2012 · 39 comments
Closed

Build process fails on Debian Squeeze #135

jmacdonald opened this issue Jan 5, 2012 · 39 comments

Comments

@jmacdonald
Copy link

When trying to install v0.9.9 of therubyracer gem, I get the following build errors:

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

    /home/prg04itd/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb 

creating Makefile

make
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_script.o -c v8_script.cpp
In file included from v8_script.cpp:2:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Script]’:
v8_script.cpp:25: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_exception.o -c v8_exception.cpp
In file included from v8_exception.cpp:3:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::StackTrace]’:
v8_exception.cpp:48: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::StackFrame]’:
v8_exception.cpp:68: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_exception.cpp: At global scope:
v8_exception.cpp:10: warning: ‘::stack’ defined but not used
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_message.o -c v8_message.cpp
In file included from v8_message.cpp:2:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Message]’:
v8_message.cpp:10: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_callbacks.o -c v8_callbacks.cpp
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_date.o -c v8_date.cpp
In file included from v8_date.cpp:4:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Date]’:
v8_date.cpp:21: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_object.o -c v8_object.cpp
In file included from v8_object.cpp:1:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Object]’:
v8_object.cpp:17: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_array.o -c v8_array.cpp
In file included from v8_array.cpp:1:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Array]’:
v8_array.cpp:13: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_function.o -c v8_function.cpp
In file included from v8_function.cpp:5:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Function]’:
v8_function.cpp:13: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Array]’:
v8_function.cpp:23: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::String]’:
v8_function.cpp:49: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_weakref.o -c v8_weakref.cpp
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_locker.o -c v8_locker.cpp
v8_locker.cpp: In function ‘VALUE::Lock::Delete(VALUE)’:
v8_locker.cpp:45: warning: no return statement in function returning non-void
v8_locker.cpp: In function ‘VALUE::Unlock::Delete(VALUE)’:
v8_locker.cpp:85: warning: no return statement in function returning non-void
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o rr.o -c rr.cpp
rr.cpp: In function ‘VALUE rr_define_finalizer(VALUE, void_, VALUE)’:
rr.cpp:48: warning: no return statement in function returning non-void
In file included from rr.cpp:3:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Value]’:
rr.cpp:159: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_external.o -c v8_external.cpp
In file included from v8_external.cpp:4:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::External]’:
v8_external.cpp:51: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_external.cpp: At global scope:
v8_external.cpp:10: warning: ‘::references’ defined but not used
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_v8.o -c v8_v8.cpp
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_context.o -c v8_context.cpp
In file included from v8_context.cpp:2:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Context]’:
v8_context.cpp:15: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::ObjectTemplate]’:
v8_context.cpp:22: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Value]’:
v8_context.cpp:23: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versiong++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_value.o -c v8_value.cpp
In file included from v8_value.cpp:1:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Value]’:
v8_value.cpp:10: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_debug.o -c v8_debug.cpp
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_try_catch.o -c v8_try_catch.cpp
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_template.o -c v8_template.cpp
In file included from v8_template.cpp:2:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Template]’:
v8_template.cpp:42: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::ObjectTemplate]’:
v8_template.cpp:45: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::FunctionTemplate]’:
v8_template.cpp:48: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::Data]’:
v8_template.cpp:54: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_string.o -c v8_string.cpp
In file included from v8_string.cpp:3:
v8_handle.h: In function ‘v8::Persistent& rr_v8_handle(VALUE) [with T = v8::String]’:
v8_string.cpp:13: instantiated from here
v8_handle.h:43: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -I. -I/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/v8/include -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/prg04itd/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/home/prg04itd/.rbenv/versions/1.9.2-p290/include' -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o v8_handle.o -c v8_handle.cpp
g++ -shared -o v8.so v8_script.o v8_exception.o v8_message.o v8_callbacks.o v8_date.o v8_object.o v8_array.o v8_function.o v8_weakref.o v8_locker.o rr.o v8_external.o v8_v8.o v8_context.o v8.o v8_value.o v8_debug.o v8_try_catch.o v8_template.o v8_string.o v8_handle.o -L/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/build/v8 -Wl,-R/home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/build/v8 -L. -L/home/prg04itd/.rbenv/versions/1.9.2-p290/lib -Wl,-R/home/prg04itd/.rbenv/versions/1.9.2-p290/lib -L. -L'/home/prg04itd/.rbenv/versions/1.9.2-p290/lib' -rdynamic -Wl,-export-dynamic -lpthread -lrt -ldl -lcrypt -lm -lc -lv8 -lpthread
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.a(functexcept.o): relocation R_X86_64_32 against `std::bad_typeid::~bad_typeid()' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *_* [v8.so] Error 1

Gem files will remain installed in /home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/therubyracer-0.9.9 for inspection.
Results logged to /home/prg04itd/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/therubyracer-0.9.9/ext/v8/gem_make.out

This doesn't occur with v0.9.8 of the gem.

@cowboyd
Copy link
Collaborator

cowboyd commented Jan 5, 2012

what happens if you manually insert -fPIC flag? Which we should do...

@jmacdonald
Copy link
Author

Let me give that a shot; I'll get back to you.

@jmacdonald
Copy link
Author

How would I go about compiling this gem with that flag? I found the gem contents and tried running rake in that directory, but was getting the following error:

c.rb ./spec/ext/string_spec.rb ./spec/v8/portal/proxies_spec.rb ./spec/v8/error_spec.rb ./spec/redjs/jsapi_spec.rb
/home/prg04itd/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/therubyracer-0.9.9/lib/v8.rb:6:in `require': cannot load such file -- v8/v8 (LoadError)

I have the v8 development headers installed, so I'm not sure why I'm getting that error.

@cowboyd
Copy link
Collaborator

cowboyd commented Jan 25, 2012

it cannot find v8/v8 because that is the native extension module that is not compiling for you. The ruby racer should not use your system v8 development headers as they are probably from a different version of v8 and will cause problems.

Can you uninstall the v8 dev headers, and try recompiling therubyracer?

@jmacdonald
Copy link
Author

Done; got the same error.

@cowboyd
Copy link
Collaborator

cowboyd commented Jan 25, 2012

from the gem source directory, try adding

$CPPFLAGS += " -fPIC"

to ext/extconf.rb

@jmacdonald
Copy link
Author

That worked.

@bennyzr
Copy link

bennyzr commented Jan 25, 2012

Hi,

I added the -fPIC flag to the extconf.rb file as instructed above. After creating the make file I am getting an error when running make:
benny@work:~/.rvm/gems/ruby-1.9.3-p0@test/gems/therubyracer-0.9.9/ext/v8$ make
linking shared-object v8.so
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.a(functexcept.o): relocation R_X86_64_32 against `std::bad_typeid::~bad_typeid()' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [v8.so] Error 1

Any ideas?
Thanks,
Benny

@jmacdonald
Copy link
Author

Run rake, not make; that's what the Rakefile is for. ;)

@bennyzr
Copy link

bennyzr commented Jan 26, 2012

Thanks for your response. I must be missing something here though. I am trying to compile therubyracer manually since gem install therubyracer bombs with a similar issue to the one you started the thread with. gem install also overwrites the additional flag "$CPPFLAGS += " -fPIC"" I insert into the extconf.rb file. Therefore I added the flag and executed 'ruby extconf.rb' which creates a makefile. At this point running make does not work as mentioned above and I do not see a rakefile in the folder either. There is a rakefile in the therubyracer gem folder which bombs with the error: "fatal: Not a git repository (or any parent up to mount parent )" when executing rake.

Please help.
Thanks,
Benny

@jmacdonald
Copy link
Author

I had to manually build the gem (gem build therubyracer.gemspec) to get things to work the first time.

@bennyzr
Copy link

bennyzr commented Jan 26, 2012

I was able to install therubyracer by manually building and installing the gem. However I am still getting this error:

.rvm/gems/ruby-1.9.3-p0@test/gems/execjs-1.3.0/lib/execjs/runtimes.rb:50:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

I thought that therubyracer was a JavaScript runtime.

Benny

@cowboyd
Copy link
Collaborator

cowboyd commented Jan 26, 2012

Are you sure you're installing it from a place where bundler can find it?

On Jan 26, 2012, at 2:16 PM, bennyzr wrote:

I was able to install therubyracer by manually building and installing the gem. However I am still getting this error:

/home/bennyr/.rvm/gems/ruby-1.9.3-p0@depot/gems/execjs-1.3.0/lib/execjs/runtimes.rb:50:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

I thought that therubyracer was a JavaScript runtime.

Benny


Reply to this email directly or view it on GitHub:
#135 (comment)

@bennyzr
Copy link

bennyzr commented Jan 26, 2012

'bundle install' runs fine with therubyracer (0.9.9) shown in the list of installed gems. I get the error above when using rails generate scaffold.

@cowboyd
Copy link
Collaborator

cowboyd commented Jan 26, 2012

what happens if you just run

bundle exec ruby -e "require 'v8'"

Charles Lowell

On Thursday, January 26, 2012 at 3:37 PM, bennyzr wrote:

'bundle install' runs fine with therubyracer (0.9.9) shown in the list of installed gems. I get the error above when using rails generate scaffold.


Reply to this email directly or view it on GitHub:
#135 (comment)

@bennyzr
Copy link

bennyzr commented Jan 26, 2012

-e:1:in `require': cannot load such file -- v8 (LoadError)
from -e:1:in '<main>'

@cowboyd
Copy link
Collaborator

cowboyd commented Jan 26, 2012

I've never seen this particular issue before. What do you see if you run a bundle open Can you see the contents of the gem? Otherwise, I'm not quite sure how to diagnose the problem without seeing the source.

@bennyzr
Copy link

bennyzr commented Jan 26, 2012

Very odd. When I tried to 'bundle open therubyracer' I discovered that the gem folder was practically empty. I then uninstalled therubyracer and tried installing again. Below are the steps I am taking (commands executed from my application directory):

  1. 'gem install therubyracer'. This results in the error: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.a(functexcept.o): relocation R_X86_64_32 against `std::bad_typeid::~bad_typeid()' can not be used when making a shared object; recompile with -fPIC

  2. I add the flag to the v8/extconf.rb file and run 'gem build ~/.rvm/gems/ruby-1.9.3-p0@test/gems/therubyracer-0.9.9/therubyracer.gemspec' This results with the error: ERROR: While executing gem ... (Gem::InvalidSpecificationException) ["ext/v8/extconf.rb"] are not files.

However running 'gem build therubyracer.gemspec' from the gems/therubyracer-0.9.9 directory results with therubyracer.gem file. When installing this gem the folder gets wiped out and I get could not detect a JavaScript runtime error.

Since the code I am using is coming directly from the downloaded source why would looking at the code on my machine be helpful?

@openscript
Copy link

Absolutely the same problem as bennyzr has and jmacdonald had! 0.9.8 worked well.

@bennyzr
Copy link

bennyzr commented Jan 30, 2012

I just modified my Gemfile to use 0.9.8 and all my problems disappeared.

@cowboyd
Copy link
Collaborator

cowboyd commented Jan 30, 2012

Makes sense. I could have sworn we used to add -fPIC for debian users. In any case, I'll look at what changed and release a new version with this rolled in.

On Jan 30, 2012, at 10:28 AM, bennyzr wrote:

I just modified my Gemfile to use 0.9.8 and all my problems disappeared.


Reply to this email directly or view it on GitHub:
#135 (comment)

@donapieppo
Copy link

If you have a 686 debian distribution on amd64 kernel try

gem uninstall libv8
wget http://rubygems.org/downloads/libv8-3.3.10.4.gem
ARCHFLAG='-arch i386' gem install ./libv8-3.3.10.4.gem
gem install therubyracer

@fabn
Copy link

fabn commented May 22, 2012

@donapieppo is there any way to get you hint working when using capistrano which in turn invokes bundle install --deployment? I've found out that your hint is working on my server, but I can't still deploy because of bunder.

@cowboyd
Copy link
Collaborator

cowboyd commented May 22, 2012

@fabn there are actually several hints on this page. Which is the one that worked for you?

@fabn
Copy link

fabn commented May 22, 2012

@cowboyd yes, you're right. I'm referring to the last one i.e.

gem uninstall libv8
wget http://rubygems.org/downloads/libv8-3.3.10.4.gem
ARCHFLAG='-arch i386' gem install ./libv8-3.3.10.4.gem
gem install therubyracer

Also mentioned here: http://stackoverflow.com/a/10301175/518204. On my system (Linux 2.6.26-2-amd64 #1 SMP Sat Jun 11 15:07:09 UTC 2011 x86_64 GNU/Linux) this command I've found in another issue description gives

$ ruby -rubygems -e 'puts Gem::Platform.new(RUBY_PLATFORM)'
x86_64-linux

So the platform is clearly 64bit but every gem which needs native extensions (including therubyracer) are compiled in i386 mode. In fact I can't install this gem normally because when I install it libv8 x86_64 is installed and RR can't be linked with 64bit v8 library. The relevant output I obtain is

fabio@idra:~$ gem install therubyracer
Fetching: libv8-3.3.10.4-x86_64-linux.gem (100%)
...
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/local/rvm/gems/ruby-1.9.3-p125/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/build/v8/libv8.a(ic.o)' is incompatible with i386 output

@donapieppo
Copy link

You should take a look at

 /var/lib/apt/lists/

if you have *amd64_Packages files you are on a real x86_64-linux. Otherwise you are on a i386 debian distribution
with a amd64 kernel (x86_64). In this case you have to tell ruby that the correct ARCHFLAG is i686.

@fabn
Copy link

fabn commented May 23, 2012

@donapieppo ok, I need the ARCHFLAG set since it's a i386 distribution. But the command ARCHFLAG='-arch i386' gem install libv8 installs libv8 x86_64 binary so I need to fetch the gem and install it from the .gem file as in your hint.

Is there any way to tell bundler to do the same? Should I report this as a libv8 issue? Otherwise I cannot deploy with capistrano on that server since it invokes bundle install --deployment

@wzrdtales
Copy link

I finished the installation of Gitlab with the same problems. I know that isn't a gitlab issue, but it should help for other bundle installations too. This is what I've done:
I did the whole installation process out of the wiki and also execute:
$sudo -u gitlab -H bundle install --without development test --deployment

When bundle install fails @therubyracer, because of the false libv8 I executed this:
$gem uninstall libv8
$wget http://rubygems.org/downloads/libv8-3.3.10.4.gem
$gem install ./libv8-3.3.10.4.gem
$gem install therubyracer
Thanks @ this point for this solution!
The libv8 should be builded, you just have to copy it. Just lookup where your build location is. Mine you will see next:
$cp /usr/local/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/libv8-3.3.10.4-x86_64-linux/lib/libv8/build/v8/libv8.a

Next just run again:
$sudo -u gitlab -H bundle install --without development test --deployment

And you will finish the build process!

Update path as you need to!

Thanks to all for your help!

@cowboyd cowboyd closed this as completed Jun 16, 2012
@dcaliri
Copy link

dcaliri commented Oct 10, 2012

@fabn did u solved that issue with bundler and capistrano? I'm having the exact same problem you had

@fabn
Copy link

fabn commented Oct 10, 2012

@dcaliri No, I haven't. I quit because I'm having this issue when deploying on a staging server and I needed it only for a quick demo, so I've precompiled assets in me dev machine and deployed them manually.

@dcaliri
Copy link

dcaliri commented Oct 10, 2012

@fabn I see... I cannot give up on this thou as it's not a demo. I'm thinking anyway on your option. I've configured capistrano to precompile assets locally and upload them before the update_code tasks. My problem is that I cannot figure out yet how to tell bundler to skip installing the assets group defined in my Gemfile on production.

@cowboyd
Copy link
Collaborator

cowboyd commented Oct 10, 2012

@dcaliri and you have not been able to install with the pre release version?

@dcaliri
Copy link

dcaliri commented Oct 10, 2012

nope :(

@cowboyd
Copy link
Collaborator

cowboyd commented Oct 10, 2012

what is the error that you see when trying to use therubyracer pre-release? 0.11.x allows you to use a system version of v8 (installed via apt or compiled manually) in order to circumvent issues just like these

@dcaliri
Copy link

dcaliri commented Oct 10, 2012

my bad, I thought you were talking about the bundler pre-release version as my problem is that I get the error when deploying with capistrano and bundler tries to install the gems. If I install the gems manually on the production server I have no problems.

This is the end of the error:

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

@fabn
Copy link

fabn commented Oct 11, 2012

@dcaliri it's pretty easy to exclude the assets group from capistrano with these lines in deploy.rb

# default value is [:development, :test]
set :bundle_without,  [:development, :test, :assets]
# capistrano bundler task
require "bundler/capistrano"

@jackli0855
Copy link

Amazon Linux AMI
ruby2.0
gem install unf_ext -v '0.0.6'

  Building native extensions.  This could take a while...
  /usr/bin/ruby2.0 extconf.rb
   mkmf.rb can't find header files for ruby at /usr/share/ruby/include/ruby.h
    ERROR:  Error installing unf_ext:
    ERROR: Failed to build gem native extension.

Building has failed. See above output for more information on the failure.

   Gem files will remain installed in /home/wasabi/.gem/ruby/2.0/gems/unf_ext-0.0.6 for inspection.
   Results logged to /home/wasabi/.gem/ruby/2.0/gems/unf_ext-0.0.6/ext/unf_ext/gem_make.out

what happened?

@ignisf
Copy link
Collaborator

ignisf commented Nov 25, 2014

First, I don't see how this is related to therubyracer but I can tell you what happened -- you don't have the ruby2.0-dev package installed and you are missing Ruby's header files needed for building native extensions.

@jackli0855
Copy link

Thank you for your answer, I have fixed it.
by the way there is no relationship to therubyracer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants