Forgot to mention that this happens even with latest master, not just
the 3.9.7 tag.

On Mar 19, 6:38 pm, fdmanana <[email protected]> wrote:
> Hi,
>
> I've been trying to build V8 with GYP, but so far unsuccessful (scons
> works perfectly btw).
>
> This is on Mac OS X Lion:
>
> $ uname -a
> Darwin dorian-2.lan 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12
> 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
>
> $ g++ --version
> i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc.
> build 5658) (LLVM build 2335.15.00)
> Copyright (C) 2007 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.
>
> Explicitly passing the option library=shared makes it impossible to
> build the x64 target, as it can be seen here:
>
> http://www.pastie.org/3629629
>
> Not specifying library=shared option, and using the x64.release target
> I get a bunch of compilation errors:
>
> http://friendpaste.com/34S2vQzwSBqmSdSdKQSDeD
>
> Finally using target native.release allows the build to succeed:
>
> http://friendpaste.com/1GlS5lEnxkqcMpclFptKAs
>
> Which results in 4 archive files inside out/native:
>
> -rw-r--r--   1 fdmanana  staff   957K Mar 19 18:26 libpreparser_lib.a
> -rw-r--r--   1 fdmanana  staff   112M Mar 19 18:26 libv8_base.a
> -rw-r--r--   1 fdmanana  staff   937K Mar 19 18:26 libv8_nosnapshot.a
> -rw-r--r--   1 fdmanana  staff   1.2M Mar 19 18:26 libv8_snapshot.a
>
> However their object files have the wrong architecture (output when
> compiling the sample hello world program):
>
> $ g++ -o hello hello.cpp -L/Users/fdmanana/git/hub/v8/out/native -I/
> Users/fdmanana/git/hub/v8/include -lv8_base -lv8_nosnapshot -
> lpreparser_lib
> ld: warning: ignoring file /Users/fdmanana/git/hub/v8/out/native/
> libv8_base.a, file was built for archive which is not the architecture
> being linked (x86_64)
> ld: warning: ignoring file /Users/fdmanana/git/hub/v8/out/native/
> libv8_nosnapshot.a, file was built for archive which is not the
> architecture being linked (x86_64)
> ld: warning: ignoring file /Users/fdmanana/git/hub/v8/out/native/
> libpreparser_lib.a, file was built for archive which is not the
> architecture being linked (x86_64)
> Undefined symbols for architecture x86_64:
>   "v8::HandleScope::HandleScope()", referenced from:
>       _main in ccHhUcyB.o
>   "v8::Context::New(v8::ExtensionConfiguration*,
> v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Value>)", referenced
> from:
>       _main in ccHhUcyB.o
>   "v8::String::New(char const*, int)", referenced from:
>       _main in ccHhUcyB.o
>   "v8::Script::Compile(v8::Handle<v8::String>, v8::ScriptOrigin*,
> v8::ScriptData*, v8::Handle<v8::String>)", referenced from:
>       _main in ccHhUcyB.o
>   "v8::Script::Run()", referenced from:
>       _main in ccHhUcyB.o
>   "v8::String::AsciiValue::AsciiValue(v8::Handle<v8::Value>)",
> referenced from:
>       _main in ccHhUcyB.o
>   "v8::String::AsciiValue::~AsciiValue()", referenced from:
>       _main in ccHhUcyB.o
>   "v8::HandleScope::~HandleScope()", referenced from:
>       _main in ccHhUcyB.o
>   "v8::Context::Enter()", referenced from:
>       v8::Context::Scope::Scope(v8::Handle<v8::Context>)in ccHhUcyB.o
>   "v8::V8::DisposeGlobal(v8::internal::Object**)", referenced from:
>       v8::Persistent<v8::Context>::Dispose()      in ccHhUcyB.o
>   "v8::Context::Exit()", referenced from:
>       v8::Context::Scope::~Scope()in ccHhUcyB.o
> ld: symbol(s) not found for architecture x86_64
> collect2: ld returned 1 exit status
>
> Are these known problems? Besides using the old scons way, is there
> anything else I can do?
>
> Thanks.

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

Reply via email to