eclipsesource / J2V8

Java Bindings for V8
2.54k stars 355 forks source link

Alpine Linux compatibility (musl vs glibc) #252

Open kernle32dll opened 7 years ago

kernle32dll commented 7 years ago

Hi,

We recently started replacing Nashorn components in our software with a J2V8 integration. While this all works very well on our development machines, it initially failed on our test server. The reason was, that we containerize our applications with Docker for deployment, and are using no "regular" Linux system but Alpine Linux as an image.

The special thing about Alpine is, that it uses a different C standard lib - musl - instead of glibc. This in turn essentially means that everything has to be recompiled to work with it, as you can't mix the two.

So, after some fiddling around we came up with a custom docker image (link also contains some more intel on the problem at hand), which contains a musl compiled version of J2V8s binding file (note we are using the "old" building technique, since your current approach is not stable-released yet) along a prebuild OpenJDK.

While this works for us (and probably for others - thats why we released it publicly) the question remains if it is possible for J2V8 to provide musl support itself, and even if it would be reasonable to do so.

kernle32dll commented 7 years ago

@irbull : Since no comment was made yet: I think we are be able to provide an PR to implement a dockerfile to J2V8s build pipeline to generate said lib flavor. However, I don't know if this of interest for the project? Maybe we should continue the discussion in #261 ?

NetzwergX commented 2 years ago

With alpine finding more and more usage, it would be really, really appreciated if J2V8 would work out-of-the-box on Alpine as well (which uses musl).