rubyjs / libv8

Ruby gem binary distribution of the V8 JavaScript engine
269 stars 121 forks source link

Reintroduce using system v8 (for Alpine Linux support) #271

Closed volkanunsal closed 11 months ago

volkanunsal commented 6 years ago

I'm trying to install libv8 on Alpine. As has been noted here, libv8 build doesn't support Alpine's muslc library. So I thought I could use the system library with --with-system-v8, but saw that it had been removed in an earlier version. Is there an alternative? What is the best way to install libv8 on Alpine?

DanielRedOak commented 6 years ago

We're interested in this as well. You could install the libv8 package via apk and get things into system ruby, but we're doing things via bundler, Gemfiles, and Gemfile.lock so this really isn't viable.

ignisf commented 5 years ago

Hello,

Could you point me to a packaged V8 for Alpine? I would like to see how they managed to build the package and explore ways to use it.

I have been thinking about reintroducing linking against a shared library for of V8, however I want to do it correctly this time by verifying version compatibility as well.

ciroque commented 5 years ago

Is there any update on this? It has become a huge problem for us...

ignisf commented 5 years ago

@ciroque are you having issues with Alpine as well?

Taiki-San commented 5 years ago

Hi, we support Alpine in a product that rely on V8, so we built and made available the libv8 version we use here. I think the repo we use to build V8 is here but it might be outdated.

TheNicholasNick commented 5 years ago

so how do we get bundler to see libv8-alpine as libv8?

bundle complains libv8 is not installed...

EDIT: burned it down and built Debian-stretch-mini ruby dev container instead. (guess I won't be using alpine in prod for ruby apps then)

Taiki-San commented 5 years ago

They're different packages, a the Gemfile need to detect when it's running on Alpine and gem libv8-alpine instead of libv8. The requesting gem also need to aware of the changes in names. The fix would be to integrate those in the main libv8 package, but I don't know how it's done in other Ruby gems.

alyssais commented 5 years ago

This would be useful for us in Nixpkgs as well.

lloeki commented 4 years ago

Made a comment here regarding musl support and a possible partially upstream solution: https://github.com/rubyjs/libv8/issues/270#issuecomment-573063347

lloeki commented 3 years ago

libv8-node has Alpine support now.

lloeki commented 11 months ago

Closing as musl is supported by libv8-node.