Hacker News new | ask | show | jobs
by xaerise 951 days ago
You can't take a binary running in Alpine and run it in Debian. Even if it is statically linked.

But you can ( with some effort ) make it run in ChromeOS.

3 comments

Huh? I do that all the time (run Alpine compiled exes on other distros). I use an Alpine Docker image to build statically linked exes (using MUSL as libc) which are distro agnostic since they don't depend on glibc. Works just fine (for command line tools at least).
I'd love to see an example of this.

I often compile things inside Alpine containers statically and run them on my local machine, and plenty of times I've downloaded deb packages, extracted them on a raspberry pi running Alpine and it's ran fine (assuming glibc compatibility is set up.

This is the first time I'm hearing this. Don't they both use ELF? Where can I read more on this?
New syscalls may be unavailable on distributions that use old kernels. It is probably possible to tell whatever libc you use to avoid fancy syscalls, but still there may be problems. Note that the other way should work (from old kernel to new)