-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
cups: enable compiling with musl #71575
Conversation
Note that currently there are 3 commits in this PR. However, two of them are from other PRs, and shouldn't be included when this is merged in. This PR should only be merged in after the following two have been merged in:
The only commit that is relevant to this PR (well, |
@GrahamcOfBorg build cups @GrahamcOfBorg build pkgsMusl.cups |
This is related to the following three PRs:
|
Systemd /should/ build on Musl right? Perhaps some patch exists for it? |
@matthewbauer As far as I am aware, it is difficult to get systemd to build with musl: https://github.com/NixOS/rfcs/blob/master/rfcs/0023-musl-libc.md#big-incompatibilities I think @nh2 has done a lot of work getting stuff building in |
Feedback to things like https://lists.freedesktop.org/archives/systemd-devel/2014-September/023177.html was mostly constructive IMHO. I think in general systemd upstream seems to be fine with accepting patches enhancing musl compat, it might be just more complicated if it's about things not provided by the libc, if there's different opinions on whether it should be in there or not. Another thread from |
That being said, removing systemd in case of building with musl might be a good workaround for now, but having a musl-based systemd might become interesting for NixOS-on-whatever-device setups :-) |
This has the |
On the point of systemd + musl compatibility: Upstream support for making systemd support building on musl is mixed. systemd maintainers are mostly of the opinion that they should use glibc functions they consider useful, as opposed to re-implementing them (code duplication) to support other libcs. I think one could say they consider glibc a more of a "normal library dependency" that provides the functions they want, and not a "minimal portable standard". On the functions that systemd uses that glibc has and musl does not, the opinions diverge on whether they are are useful or good to have in a libc. I personally forecast that systemd and musl slowly get together over time, but don't expect that this is very soon, so I think the approach in this PR to disable it for now is exactly the right choice. |
@cdepillabout Another request across your 4 PRs (not a blocker but a nice-to-have): Could you make That would allow us to easily turn off systemd deps even when using glibc, which would be convenient to quickly check whether things are fine with glibc in situations where the musl builds are broken. It would also be in line with how other packages are written. |
317cd4d
to
3a4584c
Compare
This has been done in 3a4584c. Thanks for the suggestion! |
@GrahamcOfBorg build pkgsMusl.cups |
3a4584c
to
dc4400e
Compare
I've force-pushed a slightly reworked version of the patch that keeps the original order of |
@nh2 Didn't realize this was the thing forcing the mass rebuild! Thanks for catching and fixing this! |
When compiling `cups` with `pkgsMusl`, `cups` can't depend on `systemd` because `systemd` is not able to be built with musl.
dc4400e
to
8cf8f83
Compare
Rebased on master |
This has worked fine for me in static-haskell-nix so far, and no changes for non-musl; merging. |
@nh2 Thanks for fixing up these four PRs and merging them in :-) |
This PR enables
cups
to be able to be compiled withpkgsMusl
.cups
can't depend onsystemd
when being compiled withpkgsMusl
, because it is not possible to buildsystemd
withpkgsMusl
.Motivation for this change
This is for nh2/static-haskell-nix#50. I'd like to get GTK compiling with
pkgsMusl
, and GTK has a dependency oncups
.This can be tested like the following:
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @nh2 @domenkozar @matthewbauer