Skip to content

zlib: fix compiler detection#167808

Merged
vcunat merged 1 commit intoNixOS:staging-nextfrom
thefloweringash:zlib-compiler-detection
Apr 10, 2022
Merged

zlib: fix compiler detection#167808
vcunat merged 1 commit intoNixOS:staging-nextfrom
thefloweringash:zlib-compiler-detection

Conversation

@thefloweringash
Copy link
Copy Markdown
Member

This causes a regression on Darwin that resulted in the library having
the .so extension instead of the correct .dylib
extension. Downstream builds like qtbase then can't find zlib.

Description of changes

Fix for channel blocking #167708

This is going to be a lot of building. Sending this to staging will keep the channels blocked for a long time, so it's directed at master. The bug is present whenever CC is set, which in nixpkgs it always is, so it should apply to all platforms. Somehow zlib is working on linux, so it could be conditional to skip some builds. Is it worth it?

Things done
  • Built on platform(s) (zlib only)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@bobby285271
Copy link
Copy Markdown
Member

Maybe patch it conditionally for now and prepare another PR to apply the patch unconditionally (e.g. #146572 and #146726)?

Apply patch that already has been applied upstream:
- madler/zlib#607
- madler/zlib@05796d3

(cherry picked from commit f091c0e)
@thefloweringash thefloweringash force-pushed the zlib-compiler-detection branch from 48677ea to e3d9b21 Compare April 8, 2022 05:11
@thefloweringash
Copy link
Copy Markdown
Member Author

@NickCao pointed out that it's a duplicate of changes in #167395 which is currently in staging. I've converted this to a cherry-pick.

@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Apr 8, 2022
@vcunat
Copy link
Copy Markdown
Member

vcunat commented Apr 8, 2022

Hmm, the huge rebuild is quite a complication. We already picked the commit for 21.11 and are rebuilding it now, so it seems that comes first: #167647

Then it will be a question whether to just do normal staging (i.e. drop this PR as the change is there already) or restrict the rebuild of this PR, at least to cause no rebuild on Linux.

@vcunat
Copy link
Copy Markdown
Member

vcunat commented Apr 8, 2022

Confirmation for x86_64: https://hydra.nixos.org/build/172739285

@Mindavi
Copy link
Copy Markdown
Contributor

Mindavi commented Apr 8, 2022

Yeah, I went through staging since it's a stdenv rebuild. I think we'll just have to go through the normal flow here? Maybe it could be optionally enabled for darwin and cross for now, but that's still a lot of rebuilds for darwin, so I don't see that helping a lot

@risicle risicle added the 6.topic: darwin Running or building packages on Darwin label Apr 8, 2022
@vcunat vcunat changed the base branch from master to staging-next April 10, 2022 09:43
@vcunat vcunat merged commit 0419266 into NixOS:staging-next Apr 10, 2022
@K900 K900 added the 1.severity: channel blocker Blocks a channel label Apr 10, 2022
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Apr 10, 2022
@vcunat vcunat linked an issue Apr 10, 2022 that may be closed by this pull request
@thefloweringash thefloweringash deleted the zlib-compiler-detection branch April 12, 2022 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: channel blocker Blocks a channel 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qtbase no longer builds on x86_64-darwin with zlib 1.2.12

6 participants