You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
Chromium's depot_tools are not able to fetch V8's source on Alpine Linux #259
I'm getting an error when trying to install libv8. I'm using Ruby 2.5.0 on Alpine Linux. It seems to be a problem with downloading the sources.
gem install libv8 Building native extensions. This could take a while...
ERROR: Error installing libv8:
ERROR: Failed to build gem native extension.
current directory: /usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/ext/libv8
/usr/bin/ruby -r ./siteconf20180625-7743-1i7w51g.rb extconf.rb
creating Makefile
Running: gclient root
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 /usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/vendor
Running: gclient config --spec 'solutions = [
{
"url": "https://chromium.googlesource.com/v8/v8.git",
"managed": False,
"name": "v8",
"deps_file": "DEPS",
"custom_deps": {},
},
]
'
Running: gclient sync --with_branch_heads
Traceback (most recent call last):
File "/usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/vendor/depot_tools/fetch.py", line 301, in <module>
sys.exit(main())
File "/usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/vendor/depot_tools/fetch.py", line 296, in main
return run(options, spec, root)
File "/usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/vendor/depot_tools/fetch.py", line 290, in run
return checkout.init()
File "/usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/vendor/depot_tools/fetch.py", line 133, in init
self.run_gclient(*sync_cmd)
File "/usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/vendor/depot_tools/fetch.py", line 78, in run_gclient
return self.run(cmd_prefix + cmd, **kwargs)
File "/usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/vendor/depot_tools/fetch.py", line 68, in run
return subprocess.check_output(cmd, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('gclient', 'sync', '--with_branch_heads')' returned non-zero exit status 2
/usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/ext/libv8/builder.rb:117:in `block in setup_build_deps!': unable to fetch v8 source (RuntimeError)
from /usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/ext/libv8/builder.rb:115:in `chdir'
from /usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/ext/libv8/builder.rb:115:in `setup_build_deps!'
from /usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/ext/libv8/builder.rb:71:in `build_libv8!'
from /usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1/ext/libv8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /usr/lib/ruby/gems/2.5.0/gems/libv8-6.3.292.48.1 for inspection.
Results logged to /usr/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0/libv8-6.3.292.48.1/gem_make.out
Notable similarities: It's the exact same version.
Notable difference: It's not building native extensions. And that's where my local install fails. gem version is 2.7.7 in docker and 2.7.6 native.
changed the title [-]"unable to fetch v8 source" Ruby 2.5.0 / Alpine Linux[/-][+]depot_tools are not able to fetch V8's source on Alpine Linux[/+]on Jun 27, 2018
changed the title [-]depot_tools are not able to fetch V8's source on Alpine Linux[/-][+]Chromium's depot_tools are not able to fetch V8's source on Alpine Linux[/+]on Jun 27, 2018
Activity
niko commentedon Jun 26, 2018
Strange enough install in the docker ruby:2.5-alpine container just works:
Notable similarities: It's the exact same version.
Notable difference: It's not building native extensions. And that's where my local install fails.
gemversion is 2.7.7 in docker and 2.7.6 native.[-]"unable to fetch v8 source" Ruby 2.5.0 / Alpine Linux[/-][+]depot_tools are not able to fetch V8's source on Alpine Linux[/+]ignisf commentedon Jun 27, 2018
There seems to be lack of upstream support of the SDK with Alpine at this point:
Reference issues:
Star those issues to help get them resolved or even better -- suggest patches.
[-]depot_tools are not able to fetch V8's source on Alpine Linux[/-][+]Chromium's depot_tools are not able to fetch V8's source on Alpine Linux[/+]niko commentedon Jun 28, 2018
Any idea why this just works within a docker container?
ignisf commentedon Jun 28, 2018
Hey, it does not.
If you take a closer look,
gemdownloads the Linux binary versionFetching: libv8-6.3.292.48.1-*x86_64-linux*.gem (100%)This has been linked against glibc, which makes it unusable on Alpine afaik. :(
ignisf commentedon Jun 28, 2018
Huh... Actually it might work -- the Dockerfile you're using downloads and compiles Ruby from source which I think is linked against glibc... https://github.com/docker-library/ruby/blob/699a04311386ecc98ca242fc9bdee17fb4008863/2.5/alpine3.7/Dockerfile
The Ruby in Alpine's repos is not and in fact is patched to not use binary versions of gems because of the reason I outlined in the comment above.
niko commentedon Jun 29, 2018
Oh. Right. That makes sense.
lloeki commentedon Feb 3, 2020
Made a comment here regarding musl support and a possible partially upstream solution: #270 (comment)
lloeki commentedon Dec 4, 2023
Closing as this issue is completely sidestepped in libv8-node, and has musl builds.