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

Merged
merged 3 commits into from
Sep 20, 2024
Merged

musl: 1.2.3 -> 1.2.5 #229439

merged 3 commits into from
Sep 20, 2024

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).

New! with GCC 14

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 alyssais added the 6.topic: musl Running or building packages with musl libc label May 2, 2023
@alyssais alyssais requested a review from yu-re-ka May 2, 2023 08:58
@alyssais alyssais added the 9.needs: upstream fix This PR needs upstream to change something label May 2, 2023
@alyssais alyssais marked this pull request as draft May 2, 2023 08:58
@ofborg ofborg bot requested review from thoughtpolice and dtzWill May 2, 2023 09:57
@rrbutani rrbutani mentioned this pull request May 2, 2023
12 tasks
@alyssais alyssais mentioned this pull request May 3, 2023
12 tasks
@alyssais
Copy link
Member Author

alyssais commented Oct 9, 2023

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

@alyssais alyssais changed the base branch from master to staging October 10, 2023 14:47
@alyssais alyssais removed the 9.needs: upstream fix This PR needs upstream to change something label Jan 31, 2024
@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.

@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.

@yu-re-ka yu-re-ka mentioned this pull request Jun 26, 2024
13 tasks
alyssais added a commit to alyssais/nixpkgs that referenced this pull request Jul 5, 2024
Needed for compatibility with musl 1.2.4+.

Link: NixOS#229439
yu-re-ka pushed a commit that referenced this pull request Jul 5, 2024
Needed for compatibility with musl 1.2.4+.

Link: #229439
@alyssais alyssais mentioned this pull request Jul 21, 2024
13 tasks
@tie tie mentioned this pull request Jul 30, 2024
16 tasks
@AndersonTorres
Copy link
Member

There is a PR updating GN here:

#221306

@yu-re-ka
Copy link
Contributor

yu-re-ka commented Aug 7, 2024

The gn update does not address the LFS64 breakage though

@alyssais
Copy link
Member Author

Unless there are any last minute objections, I intend to merge this with the next staging cycle. (There aren't enough rebuilds to force this into staging, but there are important fixes that are only in staging.) Every package previously identified as regressing on update builds with musl 1.2.5 on staging, with the exception of nfs-utils, which doesn't work on master anyway and hasn't for a while. Merging this is the best way to fix building pulseaudio with musl and GCC 14, and we're also increasingly seeing packages relying on features introduced in later versions of musl — there are two reverts for hacks we've had to do for 1.2.3 in this PR, and I also recently discovered that we need a newer musl for bcachefs-tools.

Since we don't have Hydra for musl, there will absolutely be a long tail of broken packages that we can't identify, but it's been a year and a half. This is as good as it's going to get, and we can't hold back forever.

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go for it 🎉

This release fixes the implementation of strverscmp(), so the libtasn1
patch that negates the test can now be removed.
This reverts commit 248efc2.

The musl bug has now been fixed.
This reverts commit 966f79b.

We've now updated musl to a version that has statx available.
@K900 K900 merged commit aeeb21d into NixOS:staging Sep 20, 2024
8 of 9 checks passed
@alyssais alyssais deleted the musl-1.2.4 branch September 20, 2024 16:54
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.

6 participants