use this command:
GCC_VERSION="44" scons mode=release library=shared arch=x64 -i snapshot=on
create this file as a patch and use it (if necessary):
=====PATCH-START===================================================
commit 0d031fcbcf519b43a0db49c83c208b0b9c93a422
Author: Cedric Vivier <[email protected]>
Date: Sat Oct 10 13:07:09 2009 +0800
Fix compilation with GCC 4.4.x when environment variable
GCC_VERSION="44"
Error was: dereferencing pointer '<anonymous>' does break
strict-aliasing rules
---
SConstruct | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/SConstruct b/SConstruct
index 9208a76..8dbaa97 100755
--- a/SConstruct
+++ b/SConstruct
@@ -47,7 +47,7 @@ if ANDROID_TOP is None:
# on linux we need these compiler flags to avoid crashes in the v8
test suite
# and avoid dtoa.c strict aliasing issues
if os.environ.get('GCC_VERSION') == '44':
- GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp']
+ GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp', '-fno-strict-aliasing']
GCC_DTOA_EXTRA_CCFLAGS = ['-fno-strict-aliasing']
else:
GCC_EXTRA_CCFLAGS = []
======PATCH-END===================================================
how to use the patch?
patch -i patchfile
On 08/11/2010 03:03 PM, Daedalus wrote:
Hi guys,
I've checkout the latest version of Node.js from Github which include
V8 Version 2.3.6, and am getting a
build error during libv8.a compilation, and was wondering if anyone
could help.
Oddly enough, it works fine on a system here that is running Red Hat.
GCC on Ubuntu: g++ (Ubuntu 4.4.1-4ubuntu9) 4.4.1
GCC on Red Hat: g++ (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7)
The Ubuntu machines are all Ubuntu 9.10 x64. A bunch are Rackspace
cloud servers, while my own system is a normal computer, also running
Ubuntu 9.10 x64.
Where the build fails:
g++ -o obj/release/circular-queue.o -c -Wall -Werror -W -Wno-unused-
parameter -Wnon-virtual-dtor -pedantic -m64 -O3 -fomit-frame-pointer -
fdata-sections -ffunction-sections -ansi -fno-rtti -fno-exceptions -
Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -
m64 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi
-DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING -
DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -I/home/
daedalus/git/node-latest/deps/v8/src /home/daedalus/git/node-latest/
deps/v8/src/circular-queue.cc
cc1plus: warnings being treated as errors
/home/daedalus/git/node-latest/deps/v8/src/handles-inl.h: In static
member function 'static void v8::V8::RemoveMessageListeners(void (*)
(v8::Handle<v8::Message>, v8::Handle<v8::Value>))':
/home/daedalus/git/node-latest/deps/v8/src/handles-inl.h:50: error:
dereferencing pointer '<anonymous>' does break strict-aliasing rules
/home/daedalus/git/node-latest/deps/v8/src/handles-inl.h:50: error:
dereferencing pointer '<anonymous>' does break strict-aliasing rules
/home/daedalus/git/node-latest/deps/v8/src/utils.h:739: 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
/home/daedalus/git/node-latest/deps/v8/src/api.cc:3793: note:
initialized from here
g++ -o obj/release/code-stubs.o -c -Wall -Werror -W -Wno-unused-
parameter -Wnon-virtual-dtor -pedantic -m64 -O3 -fomit-frame-pointer -
fdata-sections -ffunction-sections -ansi -fno-rtti -fno-exceptions -
Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -
m64 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi
-DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING -
DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -I/home/
daedalus/git/node-latest/deps/v8/src /home/daedalus/git/node-latest/
deps/v8/src/code-stubs.cc
g++ -o obj/release/codegen.o -c -Wall -Werror -W -Wno-unused-parameter
-Wnon-virtual-dtor -pedantic -m64 -O3 -fomit-frame-pointer -fdata-
sections -ffunction-sections -ansi -fno-rtti -fno-exceptions -Wall -
Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m64 -O3
-
fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -
DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING -
DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -I/home/
daedalus/git/node-latest/deps/v8/src /home/daedalus/git/node-latest/
deps/v8/src/codegen.cc
scons: *** [obj/release/api.o] Error 1
scons: building terminated because of errors.
Waf: Leaving directory `/home/daedalus/git/node-latest/build'
Build failed: -> task failed (err #2):
{task: libv8.a SConstruct -> libv8.a}
make: *** [all] Error 1
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users