lunes, marzo 22, 2010

Google JavaScript V8 Engine compilation error

If you get this error while compiling V8 JavaScript Engine with scons:

//++++++++++++++++++++++++++++++++++++++++++++++++++
cc1plus: warnings being treated as errors
src/handles-inl.h: In static member function 'static void
v8::V8::RemoveMessageListeners(void (*)(v8::Handle<v8::Message>,
v8::Handle<v8::Value>))':
src/handles-inl.h:50: error: dereferencing pointer '<anonymous>' does
break strict-aliasing rules
src/handles-inl.h:50: error: dereferencing pointer '<anonymous>' does
break strict-aliasing rules
src/utils.h:636: note: initialized from here
cc1plus: error: dereferencing pointer 'dest' does break strict-aliasing rules
cc1plus: error: dereferencing pointer 'dest' does break strict-aliasing rules
cc1plus: error: dereferencing pointer 'dest' does break strict-aliasing rules
src/api.cc:3457: note: initialized from here
scons: *** [obj/release/api.o] Error 1
//++++++++++++++++++++++++++++++++++++++++++++++++++

You have to edit the file named "SConstruct" and modify these
variables in this manner:

//++++++++++++++++++++++++++++++++++++++++++++++++++
GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp', '-fno-strict-aliasing']
GCC_DTOA_EXTRA_CCFLAGS = ['-fno-strict-aliasing']
//++++++++++++++++++++++++++++++++++++++++++++++++++

You should delete the "if" structure and leave these variables alone.
Note that maybe you have to use "scons -c" to clean the old compilation files.

No hay comentarios: