1

downloaded code as described in Using Git:

fetch v8
cd v8

built as described in BuildingWithGYP:

gclient sync
make x64.release

updated to the latest master, and used a sample:

git checkout master
git pull

but when building a samle as described in Get Started, I met an error

g++ -I. hello_world.cc -o hello_world -Wl,--start-group out/x64.release/obj.target/{tools/gyp/libv8_{base,libbase,snapshot,libplatform},third_party/icu/libicu{uc,i18n,data}}.a -Wl,--end-group -lrt -pthread -std=c++0x

g++: error: out/x64.release/obj.target/tools/gyp/libv8_snapshot.a: No such file or directory

and it turns out there is no such file:

$ find . -name *snapshot*.a
./out/x64.release/obj.target/tools/gyp/libv8_nosnapshot.a
./out/x64.release/obj.target/tools/gyp/libv8_external_snapshot.a

So the question is, what I'm doing wrong?

Marcs
  • 3,768
  • 5
  • 33
  • 42
叶安华
  • 11
  • 1

1 Answers1

0

it seems it is because the unstable version. https://groups.google.com/forum/#!topic/v8-users/SBAGmGr7eBg

according this link above:

"Getting Started is only compatible with the current Stable version. I am currently updating it to be compatible with version 4.4."

so we can checkout the stable version like 4.4

git checkout -b 4.4 -t branch-heads/4.4

then continue the rest of steps.

but noticed the hello-world.cc exist in version 4.5, so we can download the example first.

here are the steps I copied from the link:

Goto v8/ git checkout -b 4.5 -t branch-heads/4.5 Copy samples/hello-world.cc to v8/ git checkout -b 4.4 -t branch-heads/4.4 gclient sync make x64.release snapshot=off g++ -I. hello-world.cc -o hello_world -Wl,--start-group out/x64.release/obj.target/{tools/gyp/libv8_{base,libbase,nosnapshot,libplatform},third_party/icu/libicu{uc,i18n,data}}.a -Wl,--end-group -lrt -ldl -pthread -std=c++0x ./hello_world

avidya
  • 91
  • 6