Я хочу обновить до rails 3.2, но процесс сборки therubyracer (0.9.9) завершается неудачно.Я понятия не имею, что мне делать.
Мое окружение: Debian Squeeze (2.6.32-5-amd64)
make
compiling v8_external.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_external.cpp:4:
v8_handle.h: In function ‘v8::Persistent<T>& 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: ‘<unnamed>::references’ defined but not used
compiling v8_context.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_context.cpp:2:
v8_handle.h: In function ‘v8::Persistent<T>& 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<T>& 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<T>& 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
compiling v8_value.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_value.cpp:1:
v8_handle.h: In function ‘v8::Persistent<T>& 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
compiling v8_message.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_message.cpp:2:
v8_handle.h: In function ‘v8::Persistent<T>& 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
compiling v8_date.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_date.cpp:4:
v8_handle.h: In function ‘v8::Persistent<T>& 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
compiling v8_handle.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
compiling v8_v8.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
compiling v8_callbacks.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
compiling v8_array.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_array.cpp:1:
v8_handle.h: In function ‘v8::Persistent<T>& 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
compiling v8_exception.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_exception.cpp:3:
v8_handle.h: In function ‘v8::Persistent<T>& 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<T>& 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: ‘<unnamed>::stack’ defined but not used
compiling v8_weakref.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
compiling v8_debug.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
compiling v8_function.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_function.cpp:5:
v8_handle.h: In function ‘v8::Persistent<T>& 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<T>& 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<T>& 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
compiling v8_object.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_object.cpp:1:
v8_handle.h: In function ‘v8::Persistent<T>& 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
compiling v8_locker.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
v8_locker.cpp: In function ‘VALUE<unnamed>::Lock::Delete(VALUE)’:
v8_locker.cpp:45: warning: no return statement in function returning non-void
v8_locker.cpp: In function ‘VALUE<unnamed>::Unlock::Delete(VALUE)’:
v8_locker.cpp:85: warning: no return statement in function returning non-void
compiling v8_script.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_script.cpp:2:
v8_handle.h: In function ‘v8::Persistent<T>& 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
compiling v8_string.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_string.cpp:3:
v8_handle.h: In function ‘v8::Persistent<T>& 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
compiling v8.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
compiling rr.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
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<T>& 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
compiling v8_template.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_template.cpp:2:
v8_handle.h: In function ‘v8::Persistent<T>& 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<T>& 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<T>& 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<T>& 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
compiling v8_try_catch.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
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
ОБНОВЛЕНИЕ
Я 'мы попробовали следующее:
- Загрузил копию источника
git clone https://github.com/cowboyd/therubyracer.git
- Добавлен
$CPPFLAGS += " -fPIC"
в ext/v8/extconf.rb
- Встроенный камень с
gem build therubyracer.gemspec
- Установленный гем с
gem install therubyracer-0.9.9.gem
Та же ошибка была показана мне!Выпуск: https://github.com/cowboyd/therubyracer/issues/135