I downloaded the official generic linux x86-64-bit binary from julialang.org but it doesn't run on my system.
Fails with No such file or directory which indicates that a key component of the runtime environment necessary to run the program is missing.
Investigating further, file tells me about the binary:
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, with debug_info, not stripped.
Well, now it's pretty obvious what's the problem. Julia expects the system to have a specific libc installed. I don't have a /lib64/ld-linux-x86-64.so.2. In my system, libc is /lib/ld-musl-x86_64.so.1.
My proposal to make the binaries truly generic is to static link some libc instead of expecting the user to have a certain libc installed.
musl is lightweight, fast and simple. It was also designed from the ground up for static linking. So that would be my recommendation.
Thanks.
Statically linking Musl breaks all compatibility with glibc so it's not going to happen as an replacement.
Ignoring the suggestion about statically linking against musl, isn't there still a legitimate problem here? Does Julia support musl libc, and if not, should it?
The generic binary (or if you want to call it glibc binary) doesn't and won't. Musl is supported afaik, just not the binary. I'm fine with adding another binary if someone wants to maintain it (or I would have just close this)
Would be nice to have @staticfloat chime in.
Also it would be nice to update the issue title to be specific to the musl issue.
Yes, it's very difficult to build a single binary as complex as Julia is and be able to run on both musl based systems as well as glibc based systems. It's totally possible for us to provide a musl-linked binary; please go ahead and open an issue on https://github.com/JuliaCI/julia-buildbot, with as many details about your system as possible so that we can make sure that whatever we build is definitely compatible with your system.
Our platform support has grown pretty organically over the years; a new platform tends to get added when enough people are pushing for it.
Note that Julia can be built on musl-based Linux distributions, but there are a number of tests that are known to fail on particular distributions. See for example #26761, #27431, and #28805 which relate to Alpine Linux. One of the largest hurdles when porting Julia to a new platform is ensuring support for the platform in all of Julia's dependencies. I'd love to see better support for musl-based distributions, including official binaries and CI, we just have to make sure any given platform is works well enough that we can comfortably call it supported.
A good first step here is to determine whether Julia can be built from source and pass all of its tests on your system. And as Elliot said, details about your system and an issue on the buildbot repository would be great.
Maybe it is time to make BinaryBuilder be able to build Julia itself?
Maybe it is time to make BinaryBuilder be able to build Julia itself?
+:100: to this. We need to dog food this as much as possible. Getting Julia working under BinaryBuilder is the ultimate way to support the same set of platforms for Julia and all binary dependencies.
I 100% agree. The fundamental piece missing from that is the capability to cross-compile Julia itself; I've opened an issue to discuss that in deeper detail.
Closing this in favour of consolidating all discussion in #30338
Most helpful comment
The generic binary (or if you want to call it glibc binary) doesn't and won't. Musl is supported afaik, just not the binary. I'm fine with adding another binary if someone wants to maintain it (or I would have just close this)