Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide musl-linked Linux binaries in addition to glibc #30314

Closed
shabmk opened this issue Dec 8, 2018 · 10 comments
Closed

Provide musl-linked Linux binaries in addition to glibc #30314

shabmk opened this issue Dec 8, 2018 · 10 comments

Comments

@shabmk
Copy link

shabmk commented Dec 8, 2018

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.

@yuyichao
Copy link
Contributor

yuyichao commented Dec 8, 2018

Statically linking Musl breaks all compatibility with glibc so it's not going to happen as an replacement.

@jpsamaroo
Copy link
Member

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?

@yuyichao
Copy link
Contributor

yuyichao commented Dec 8, 2018

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)

@ViralBShah
Copy link
Member

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.

@staticfloat
Copy link
Member

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.

@ararslan
Copy link
Member

ararslan commented Dec 8, 2018

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, JuliaLang/LinearAlgebra.jl#530, 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.

@ararslan ararslan changed the title Generic Linux Binaries... not so generic? Provide musl-linked Linux binaries in addition to glibc Dec 8, 2018
@ViralBShah
Copy link
Member

Maybe it is time to make BinaryBuilder be able to build Julia itself?

@StefanKarpinski
Copy link
Member

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.

@staticfloat
Copy link
Member

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.

@ViralBShah
Copy link
Member

Closing this in favour of consolidating all discussion in #30338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants