Skip to content

zlib: fix cross-compilation not producing shared libraries#167395

Merged
mweinelt merged 1 commit intoNixOS:stagingfrom
Mindavi:cross/zlib-fix-staging
Apr 6, 2022
Merged

zlib: fix cross-compilation not producing shared libraries#167395
mweinelt merged 1 commit intoNixOS:stagingfrom
Mindavi:cross/zlib-fix-staging

Conversation

@Mindavi
Copy link
Contributor

@Mindavi Mindavi commented Apr 5, 2022

Description of changes

Apply patch that already has been applied upstream:

Fixes the issue described here: #166451 (comment)

I did think about only applying when cross-compiling, but applying unconditionally seems generally better to me. It does cause a lot of rebuilds due to that though.

(building / cross-compiling some packages that were cross-compiling ok previously and which I'm using as canaries)

  • wget cross-compiles and works (via qemu emulator)
  • git fails to cross-compile due to regression libcap (together with quite some others)
  • silver-searcher cross-compiles and works (via qemu emulator)
  • odt2txt cross-compiles
  • st cross-compiles
  • wtype cross-compiles
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux (cross-compiled)
    • 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.

@vcunat
Copy link
Member

vcunat commented Apr 5, 2022

Some list of currently new cross regressions, for reference: https://hydra.nixos.org/eval/1753445#tabs-now-fail

@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 5, 2022
@squalus squalus mentioned this pull request Apr 6, 2022
13 tasks
@squalus
Copy link
Member

squalus commented Apr 6, 2022

Tested a few cross builds and this worked for me.

Copy link
Member

@wamserma wamserma left a comment

Choose a reason for hiding this comment

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

Checked changes against upstream. Diff LGTM.
As people are reporting that this improves the situation, I'd give it a go on staging.
This might also solve the woes with pypy3.

@wamserma wamserma requested a review from mweinelt April 6, 2022 07:56
@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Apr 6, 2022

I did think about only applying when cross-compiling, but applying unconditionally seems generally better to me. It does cause a lot of rebuilds due to that though.

This is correct even if it causes rebuilds. Otherwise the patch gets forgotten and will not be removed or updated with the next update which is annoying for people that cross compile.

but I think this should go to staging-next.

@mweinelt
Copy link
Member

mweinelt commented Apr 6, 2022

but I think this should go to staging-next.

There is no staging-next at this time, so this is as good as it gets.

@mweinelt mweinelt merged commit 433a32e into NixOS:staging Apr 6, 2022
@Mindavi Mindavi deleted the cross/zlib-fix-staging branch April 6, 2022 16:18
@vcunat
Copy link
Member

vcunat commented Apr 6, 2022

Maybe we'll consider staging-21.11, too?

@Mindavi
Copy link
Contributor Author

Mindavi commented Apr 6, 2022

@vcunat: made a backport PR. Indeed would be nice to keep the stable branch stable too :).

I'm not tracking stable anywhere for cross-compilation, that's why I didn't think about it. May be worth starting to do this a bit to have a more stable base.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2022

Successfully created backport PR #167643 for staging-21.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 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. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants