This is due to GCC 4.4 and strict aliasing. You will have to define the
variable GCC_VERSION to 44 for the V8 SCons script to turn off strict
aliasing when compiling.

$ export GCC_VERSION=44
$ scons

Regards,
Søren

On Fri, May 7, 2010 at 06:55, Camilo Aguilar <[email protected]> wrote:

> the same here
>
>
> On Thu, May 6, 2010 at 11:45 PM, hap497 <[email protected]> wrote:
>
>> Hi,
>>
>> I have download v8 trunk to ubuntu 10.04. But when I try to compile
>> it, I get a 'dereferencing pointer' error.
>>
>> $ gcc --version
>> gcc-4.4.real (Ubuntu 4.4.3-4ubuntu5) 4.4.3
>> Copyright (C) 2009 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There
>> is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE.
>>
>>
>> $ scons
>> scons: Reading SConscript files ...
>> scons: done reading SConscript files.
>> scons: Building targets ...
>> gcc -o obj/release/dtoa-config.o -c -Werror -Wno-uninitialized -m32 -
>> O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -
>> DV8_TARGET_ARCH_IA32 -DENABLE_VMSTATE_TRACKING -
>> DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -Isrc src/dtoa-
>> config.c
>> g++ -o obj/release/accessors.o -c -Wall -Werror -W -Wno-unused-
>> parameter -Wnon-virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -
>> fdata-sections -ffunction-sections -ansi -fno-rtti -fno-exceptions -
>> fvisibility=hidden -Wall -Werror -W -Wno-unused-parameter -Wnon-
>> virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -fdata-sections -
>> ffunction-sections -ansi -DV8_TARGET_ARCH_IA32 -
>> DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -
>> DENABLE_DEBUGGER_SUPPORT -Isrc src/accessors.cc
>> g++ -o obj/release/allocation.o -c -Wall -Werror -W -Wno-unused-
>> parameter -Wnon-virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -
>> fdata-sections -ffunction-sections -ansi -fno-rtti -fno-exceptions -
>> fvisibility=hidden -Wall -Werror -W -Wno-unused-parameter -Wnon-
>> virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -fdata-sections -
>> ffunction-sections -ansi -DV8_TARGET_ARCH_IA32 -
>> DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -
>> DENABLE_DEBUGGER_SUPPORT -Isrc src/allocation.cc
>> g++ -o obj/release/api.o -c -Wall -Werror -W -Wno-unused-parameter -
>> Wnon-virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -fdata-
>> sections -ffunction-sections -ansi -fno-rtti -fno-exceptions -
>> fvisibility=hidden -Wall -Werror -W -Wno-unused-parameter -Wnon-
>> virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -fdata-sections -
>> ffunction-sections -ansi -DV8_TARGET_ARCH_IA32 -
>> DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -
>> DENABLE_DEBUGGER_SUPPORT -Isrc src/api.cc
>> 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:660: 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:3635: note: initialized from here
>> scons: *** [obj/release/api.o] Error 1
>> scons: building terminated because of errors.
>>
>> I appreciate if you have any idea in fixing it.
>>
>> Thank you.
>>
>> --
>> v8-users mailing list
>> [email protected]
>> http://groups.google.com/group/v8-users
>>
>
>  --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to