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

musl: 1.2.3 -> 1.2.5 #229439

Draft
wants to merge 2 commits into
base: staging
Choose a base branch
from
Draft

musl: 1.2.3 -> 1.2.5 #229439

wants to merge 2 commits into from

Conversation

alyssais
Copy link
Member

@alyssais alyssais commented May 2, 2023

From a packaging perspective, this is the most important thing about this upgrade:

Users who build applications from source against musl should be aware: 1.2.4 deprecates the "LFS64" interfaces, which were provided via macros (causing lots of frustration by breaking things; thus the motivation to get rid of them).

Builds which break can be fixed for now by adding -D_LARGEFILE64_SOURCE to CFLAGS, but this too will be dropped in a later version.

Source

I think we should see which packages are affected, and give it some reasonable amount of time for them to be fixed, because I don't think it's going to always be as simple as modifying CFLAGS — what do we do for rustc, for example?

We also have some work ahead of us to even identify broken packages. I've done some test builds of the Spectrum live image, which heavily uses musl, to identify a few regressions, but since we don't have Hydra for musl, we're going to need people who use musl in Nixpkgs to do their own test builds to check whether any of the packages they care about are affected. If you do so, add any more broken packages to the list in this post (or comment if you lack permissions).

Where we can fix things without breaking things for musl 1.2.3, let's apply those fixes in separate PRs, so the work can be more easily spread out, and avoid this one becoming intimidatingly huge.

Resources

@alyssais
Copy link
Member Author

alyssais commented Oct 9, 2023

#259989 includes the necessary Rust fixes, so will unblock this when merged.

@mfrw mfrw mentioned this pull request Feb 10, 2024
13 tasks
@alyssais alyssais force-pushed the musl-1.2.4 branch 2 times, most recently from b1da5ba to fdade3e Compare March 1, 2024 09:00
@alyssais alyssais changed the title musl: 1.2.3 -> 1.2.4 musl: 1.2.3 -> 1.2.5 Mar 1, 2024
@alyssais
Copy link
Member Author

alyssais commented Mar 1, 2024

1.2.5 is out now, but it doesn't look like anything in that update will be nearly as hard as LFS in 1.2.4, so I'm now aiming to go straight to 1.2.5 with this. Help with reviewing the package fixes (the libselinux one has been open for a while) would be very helpful with getting this moving.

@fzakaria
Copy link
Contributor

I opened #313439 didn't see it -- will close.

@fzakaria
Copy link
Contributor

is there a Nix cache for musl ?
I'm stuck always rebuilding the world :)

@yu-re-ka
Copy link
Contributor

There is no official cache for musl.
I sometimes feed my own cache https://cache.cyberchaos.dev/musl/

@fzakaria
Copy link
Contributor

Would be cool to cook up an update script also for this.

@fzakaria fzakaria mentioned this pull request May 21, 2024
13 tasks
@fzakaria
Copy link
Contributor

Let me know how I can help.

I ran into issues building open office for musl due to NULL being #define as nullptr from this patch series -- figured I'd see if we were trying to upgrade first.

Let me know how I can help.

@alyssais
Copy link
Member Author

Let me know how I can help.

Find packages that currently build, but don't build with this PR applied. (Or if you can't find any, let me know, that's also good data.)

@fzakaria
Copy link
Contributor

Does nixpkgs with musl (non-static) even build at 1.2.3 ?
I found a few projects that were broken.

Is there a separate musl room on matrix or discord?

@fzakaria
Copy link
Contributor

@alyssais I'll start a running list in this thread:

Trying to build openmpi

  • pkgs/os-specific/linux/libpsm2/default.nix does not build.
    It uses drand48_data which is a non-standard libc extension in GLIBC.
    ptl_ips/ips_proto_recv.c:895:37: error: storage size of ‘drand48_data’ isn’t known
    895 |                 struct drand48_data drand48_data;
    

Trying to build libreoffice

  • pkgs/development/libraries/CoinMP/default.nix
    It uses a reinterpreter_cast that causes failures as it's non compliant and musl disallows it.

@alyssais
Copy link
Member Author

This isn't the place to collect a list of all packages that fail to build with musl. We're specifically interested in packages that do build with musl on current Nixpkgs, but fail with this PR applied. What you have posted look like packages that are already failing with musl, which are irrelevant for the purpose of upgrading.

@yu-re-ka
Copy link
Contributor

Some rust programs are still broken?

   Compiling wgautomesh v0.1.0 (/build/source)
error: linking with `/nix/store/w90awkmiclfkryafwczz05dzah3d553k-armv7l-unknown-linux-musleabihf-gcc-wrapper-13.2.0/bin/armv7l-unknown-linux-musleabihf-cc` failed: exit status: 1
[...]
  |
  = note: /nix/store/33q0sjdwn8razm4dds94bzqkhm9q0g4n-armv7l-unknown-linux-musleabihf-binutils-2.41/bin/armv7l-unknown-linux-musleabihf-ld: /build/source/target/armv7-unknown-linux-musleabihf/release/deps/libgetrandom-a142f84e6b80c41b.rlib(getrandom-a142f84e6b80c41b.getrandom.249c8394be21b431-cgu.0.rcgu.o): in function `getrandom::getrandom':
          getrandom.249c8394be21b431-cgu.0:(.text._ZN9getrandom9getrandom17hcb85645c7b8dd976E+0x184): undefined reference to `open64'
          /nix/store/33q0sjdwn8razm4dds94bzqkhm9q0g4n-armv7l-unknown-linux-musleabihf-binutils-2.41/bin/armv7l-unknown-linux-musleabihf-ld: getrandom.249c8394be21b431-cgu.0:(.text._ZN9getrandom9getrandom17hcb85645c7b8dd976E+0x224): undefined reference to `open64'
          collect2: error: ld returned 1 exit status
          

@yu-re-ka
Copy link
Contributor

Ah, all these programs need to bump their libc crate dependency...

@yu-re-ka
Copy link
Contributor

Submitted deps bump upstream: https://git.deuxfleurs.fr/Deuxfleurs/wgautomesh/pulls/7

@yu-re-ka

This comment was marked as outdated.

@yu-re-ka

This comment was marked as outdated.

@yu-re-ka yu-re-ka mentioned this pull request May 22, 2024
13 tasks
@yu-re-ka

This comment was marked as outdated.

@yu-re-ka

This comment was marked as outdated.

@yu-re-ka

This comment was marked as outdated.

@yu-re-ka

This comment was marked as outdated.

@alyssais
Copy link
Member Author

@yu-re-ka can we keep them all in the big list in the PR body? Otherwise they're going to get hard to keep track of when GitHub starts hiding comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: wait-for-upstream Waiting for upstream fix (or their other action). 6.topic: musl Running or building packages with musl libc 10.rebuild-darwin: 1-10 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants