
go get -u github.com/ry/v8worker2
cd $GOPATH/src/github.com/ry/v8worker2
./build.py --use_ccache
out_path None
Rebuilding V8
Fetching dependencies.
Traceback (most recent call last):
File "./build.py", line 149, in <module>
main()
File "./build.py", line 85, in main
lib_fn = Rebuild()
File "./build.py", line 97, in Rebuild
EnsureDeps(v8_path)
File "./build.py", line 146, in EnsureDeps
env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
There is an error when I run go get -u github.com/ry/v8worker2. I ignored this error and went on. It showed up again when I make deno.
go build -o deno ./cmd
# pkg-config --cflags v8.pc
Failed to open 'v8.pc': No such file or directory
No package 'v8.pc' found
pkg-config: exit status 1
Makefile:39: recipe for target 'deno' failed
make: *** [deno] Error 2
What is this v8.pc dir for? How can I make it right?
@qti3e
Also, the package github.com/spf13/afero seems to be necessary during building process. Should I add it to README?
FYI, other errors I got:
Failed to fetch file gs://chromium-clang-format/5349d1954e17f6ccafb6e6663b0f13cdb2bb33c8 for v8/buildtools/linux64/clang-format. [Err: Traceback (most recent call last):
Error: Command 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-clang-format -s v8/buildtools/linux64/clang-format.sha1' returned non-zero exit status 1 in .
Hook 'download_from_google_storage --no_resume '--platform=linux*' --no_auth --bucket chromium-clang-format -s v8/buildtools/linux64/clang-format.sha1' took 136.72 secs
Traceback (most recent call last):
File "./build.py", line 149, in <module>
main()
File "./build.py", line 85, in main
lib_fn = Rebuild()
File "./build.py", line 97, in Rebuild
EnsureDeps(v8_path)
File "./build.py", line 146, in EnsureDeps
env=env)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gclient', 'sync', '--spec', "solutions = [{'managed': False, 'custom_vars': {'build_for_node': True}, 'url': 'https://chromium.googlesource.com/v8/v8.git', 'custom_deps': {'v8/third_party/catapult': None, 'v8/third_party/colorama/src': None, 'v8/testing/gmock': None, 'v8/tools/swarming_client': None, 'v8/third_party/instrumented_libraries': None, 'v8/tools/gyp': None, 'v8/third_party/android_tools': None, 'v8/test/wasm-js': None, 'v8/test/benchmarks/data': None, 'v8/test/mozilla/data': None, 'v8/tools/luci-go': None, 'v8/test/test262/data': None, 'v8/test/test262/harness': None}, 'deps_file': 'DEPS', 'name': 'v8'}]"]' returned non-zero exit status 2
@lvgithub to build v8worker2 you need to pull git submodules:
cd $GOPATH/src/github.com/ry/v8worker2
git submodule update --init
and then you can use ./build.py
@yuqingc v8.pc is a package-config file which v8worker2 is using to link V8 with Go.
when you execute ./build.py it will auto-generate this file and a dir called out
so your first issue is that you can't build V8Worker, and it would be solved if you build v8worker2
Failed to fetch file gs://chromium-clang-format/5349d1954e17f6ccafb6e6663b0f13cdb2bb33c8 for v8/buildtools/linux64/clang-format. [Err: Traceback (most recent call last):
This is a network connection error (caused by gclient), make sure you have a good internet connection, if you don't please let me know and I'll see if I can do anything for you : )
@yuqingc btw if you're a Mac os user make sure you have package-config on your system:
brew install pkg-config
@qti3e Thanks. I tried building again but the error of "no v8.pc" raises on go get -u github.com/ry/v8worker2.
$ go get -u github.com/ry/v8worker2
# pkg-config --cflags v8.pc
Failed to open 'v8.pc': No such file or directory
No package 'v8.pc' found
pkg-config: exit status 1
I assume I should get v8worder2 by git clone the original repository directly and then build it manually. I'll update my result in here.
Thanks again for your advice. :smile:
update: I got the same problem as @lvgithub does if I clone v8worker2 directly from git repo, and git submodule update --recursive --remote does not make it right. btw, OS, ubuntu 18.04 x64
@yuqingc Do you still experience following error?
Failed to fetch file gs://chromium-clang-format/5349d1954e17f6ccafb6e6663b0f13cdb2bb33c8 for v8/buildtools/linux64/clang-format. [Err: Traceback (most recent call last):
also can you please make sure you have somefiles in depot_tools?
try: ls $GOPATH/src/github.com/ry/v8worker2/depot_tools
if there is nothing in there please try:
cd $GOPATH/src/github.com/ry/v8worker2
git submodule update --init
@qti3e There are files in $GOPATH/src/github.com/ry/v8worker2/depot_tools
I am building v8worker2 right now. It takes time and I'll update the building status whether or not there is Failed to fetch file later.
btw. Since ./build.py auto-generates v8.pc, why does the cannot find v8.pc error was invoked at the go get stage, before the ./build.py process?
./build.py --use_ccache :sob:Running gn
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
pkgresult = exec_script(pkg_config_script, args, "value")
^----------
Current dir: /home/matt/go/src/github.com/ry/v8worker2/out/v8build/
Command: python -- /home/matt/go/src/github.com/ry/v8worker2/v8/build/config/linux/pkg-config.py glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
Returned 1.
stderr:
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
Package gmodule-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gmodule-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gmodule-2.0' found
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
Package gthread-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gthread-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gthread-2.0' found
Could not run pkg-config.
See //build/config/linux/BUILD.gn:89:3: whence it was called.
pkg_config("glib") {
^-------------------
See //build/config/compiler/BUILD.gn:216:18: which caused the file to be included.
configs += [ "//build/config/linux:compiler" ]
^------------------------------
Traceback (most recent call last):
File "./build.py", line 149, in <module>
main()
File "./build.py", line 85, in main
lib_fn = Rebuild()
File "./build.py", line 114, in Rebuild
env=env)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/matt/go/src/github.com/ry/v8worker2/depot_tools/gn', 'gen', '/home/matt/go/src/github.com/ry/v8worker2/out/v8build', '--args= is_component_build=false is_debug=false libcpp_is_static=false symbol_level=1 treat_warnings_as_errors=false use_custom_libcxx=false use_sysroot=false v8_deprecation_warnings=false v8_embedder_string="-v8worker2" v8_enable_gdbjit=false v8_enable_i18n_support=false v8_enable_test_features=false v8_experimental_extra_library_files=[] v8_extra_library_files=[] v8_imminent_deprecation_warnings=false v8_monolithic=true v8_static_library=false v8_target_cpu="x64" v8_untrusted_code_mitigations=false v8_use_external_startup_data=false v8_use_snapshot=true ']' returned non-zero exit status 1
1 if you got such error, just use vpn
Failed to fetch file gs://xxxxx
2 if you got find_sdk.py error, try install Xcode
@yuqingc try sudo apt-get install libgtk-3-dev pkg-config ccache
@lvgithub Sounds like you need to do something like this: http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/
@ry Yes, it has been solved
@ry Everything works after I installed those packages. Thanks a lot!
btw, @lvgithub why not add sudo apt-get install libgtk-3-dev pkg-config ccache to your PR in case people meet the same problems as I do.
@qti3e it is solved. Thanks for your time.
so I close this issue : )
For CentOS
sudo yum group install "Development Tools"
sudo yum install ccache
sudo yum install libatomic

@ry
libgtk-3-dev pkg-config ccache It has been installed, but it still has this problem. Why?
@0123cf you need run git submodule update --init in v8worker2 directory
run
git submodule update --init
result
out_path None
Rebuilding V8
Fetching dependencies.
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin"' in ./v8/third_party/jinja2 failed; will retry after a short nap...
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin"' in ./v8/third_party/depot_tools failed; will retry after a short nap...
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin"' in ./v8/third_party/googletest/src failed; will retry after a short nap...
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin"' in ./v8/third_party/jinja2 failed; will retry after a short nap...
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin"' in ./v8/third_party/depot_tools failed; will retry after a short nap...
Syncing projects: 80% (16/20) v8/third_party/depot_tools
v8/third_party/icu (ERROR)
----------------------------------------
[0:00:02] Started.
----------------------------------------
Error: Command 'git rev-list -n 1 HEAD' returned non-zero exit status 128 in ./v8/third_party/icu
fatal: mmap failed: Cannot allocate memory
Traceback (most recent call last):
File "./build.py", line 149, in <module>
main()
File "./build.py", line 85, in main
lib_fn = Rebuild()
File "./build.py", line 97, in Rebuild
EnsureDeps(v8_path)
File "./build.py", line 146, in EnsureDeps
env=env)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gclient', 'sync', '--spec', "solutions = [{'managed': False, 'custom_vars': {'build_for_node': True}, 'url': 'https://chromium.g
ooglesource.com/v8/v8.git', 'custom_deps': {'v8/third_party/catapult': None, 'v8/third_party/colorama/src': None, 'v8/testing/gmock': None, 'v8/tools/swarming_client': No
ne, 'v8/third_party/instrumented_libraries': None, 'v8/tools/gyp': None, 'v8/third_party/android_tools': None, 'v8/test/wasm-js': None, 'v8/test/benchmarks/data': None, '
v8/test/mozilla/data': None, 'v8/tools/luci-go': None, 'v8/test/test262/data': None, 'v8/test/test262/harness': None}, 'deps_file': 'DEPS', 'name': 'v8'}]"]' returned non
-zero exit status 1
@lvgithub
@0123cf I meet the same problem!
Error: Command 'git -c core.deltaBaseCacheLimit=2g fetch origin' returned non-zero exit status 128 in ./v8/base/trace_event/common
Traceback (most recent call last):
File "./build.py", line 149, in <module>
main()
File "./build.py", line 85, in main
lib_fn = Rebuild()
File "./build.py", line 97, in Rebuild
EnsureDeps(v8_path)
File "./build.py", line 146, in EnsureDeps
env=env)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gclient', 'sync', '--spec', "solutions = [{'managed': False, 'custom_vars': {'build_for_node': True}, 'url': 'https://chromium.googlesource.com/v8/v8.git', 'custom_deps': {'v8/third_party/catapult': None, 'v8/third_party/colorama/src': None, 'v8/testing/gmock': None, 'v8/tools/swarming_client': None, 'v8/third_party/instrumented_libraries': None, 'v8/tools/gyp': None, 'v8/third_party/android_tools': None, 'v8/test/wasm-js': None, 'v8/test/benchmarks/data': None, 'v8/test/mozilla/data': None, 'v8/tools/luci-go': None, 'v8/test/test262/data': None, 'v8/test/test262/harness': None}, 'deps_file': 'DEPS', 'name': 'v8'}]"]' returned non-zero exit status 1
you try :
sudo apt-get install libgtk-3-dev pkg-config ccache
(As I told you not)
@ldwonday
@ry @FrankFang help me
out_path None
Rebuilding V8
Fetching dependencies.
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin"' in ./v8/third_party/jinja2 failed; will retry after a short nap...
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin"' in ./v8/third_party/depot_tools failed; will retry after a short nap...
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin"' in ./v8/third_party/googletest/src failed; will retry after a short nap...
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin"' in ./v8/third_party/jinja2 failed; will retry after a short nap...
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin"' in ./v8/third_party/depot_tools failed; will retry after a short nap...
Syncing projects: 80% (16/20) v8/third_party/depot_tools
v8/third_party/icu (ERROR)
----------------------------------------
[0:00:02] Started.
----------------------------------------
Error: Command 'git rev-list -n 1 HEAD' returned non-zero exit status 128 in ./v8/third_party/icu
fatal: mmap failed: Cannot allocate memory
Traceback (most recent call last):
File "./build.py", line 149, in <module>
main()
File "./build.py", line 85, in main
lib_fn = Rebuild()
File "./build.py", line 97, in Rebuild
EnsureDeps(v8_path)
File "./build.py", line 146, in EnsureDeps
env=env)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gclient', 'sync', '--spec', "solutions = [{'managed': False, 'custom_vars': {'build_for_node': True}, 'url': 'https://chromium.g
ooglesource.com/v8/v8.git', 'custom_deps': {'v8/third_party/catapult': None, 'v8/third_party/colorama/src': None, 'v8/testing/gmock': None, 'v8/tools/swarming_client': No
ne, 'v8/third_party/instrumented_libraries': None, 'v8/tools/gyp': None, 'v8/third_party/android_tools': None, 'v8/test/wasm-js': None, 'v8/test/benchmarks/data': None, '
v8/test/mozilla/data': None, 'v8/tools/luci-go': None, 'v8/test/test262/data': None, 'v8/test/test262/harness': None}, 'deps_file': 'DEPS', 'name': 'v8'}]"]' returned non
-zero exit status 1
@0123cf Try vpn, say ProtonVPN or others.
Most helpful comment
@yuqingc try
sudo apt-get install libgtk-3-dev pkg-config ccache@lvgithub Sounds like you need to do something like this: http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/