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

glibc: use (lib.getBin pkgsBuildBuild.glibc) to generate locales #262881

Merged
2 commits merged into from Oct 26, 2023
Merged

glibc: use (lib.getBin pkgsBuildBuild.glibc) to generate locales #262881

2 commits merged into from Oct 26, 2023

Conversation

ghost
Copy link

@ghost ghost commented Oct 23, 2023

Description of changes

This is an alternative resolution of the problem identified in

#259964

which stated that "glibc depends on buildPackages.glibc for locale things. buildPackages.glibc depended on buildPackages.libgcc, which, since it's GCC, depends on the target's bintools, which depend on the target's glibc, which, again, depends on buildPackages.glibc, causing an infinute recursion when evaluating buildPackages.glibc when glibc hasn't come from stdenv (e.g. on musl)."

The fact that we use pkgsBuildHost.glibc instead of pkgsBuildBuild.glibc to generate the locales has always been a gross hack. If we simply remove the gross hack the circularity goes away.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 23.11 Release Notes (or backporting 23.05 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
  • Fits CONTRIBUTING.md.

This is an alternative resolution of the problem identified in

  #259964

which stated that "glibc depends on buildPackages.glibc for locale
things.  buildPackages.glibc depended on buildPackages.libgcc,
which, since it's GCC, depends on the target's bintools, which
depend on the target's glibc, which, again, depends on
buildPackages.glibc, causing an infinute recursion when evaluating
buildPackages.glibc when glibc hasn't come from stdenv (e.g. on
musl)."

The fact that we use pkgsBuildHost.glibc instead of
pkgsBuildBuild.glibc to generate the locales has always been a gross
hack.  If we simply remove the gross hack the circularity goes away.
@ghost ghost mentioned this pull request Oct 23, 2023
12 tasks
@ghost ghost requested a review from alyssais October 23, 2023 08:35
@ghost ghost marked this pull request as ready for review October 23, 2023 09:14
@alyssais
Copy link
Member

@ofborg build pkgsMusl.pkgsCross.gnu64.hello

@ghost
Copy link
Author

ghost commented Oct 23, 2023

@ofborg build pkgsMusl.pkgsCross.gnu64.hello

Should work now.

@ghost
Copy link
Author

ghost commented Oct 24, 2023

pkgsMusl.pkgsCross.gnu64.hello on x86_64-linux — Success

Copy link
Member

@alyssais alyssais left a comment

Choose a reason for hiding this comment

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

Either approach seems equally good to me, so if you like this one better, go ahead!

@ghost ghost merged commit b4371a5 into NixOS:master Oct 26, 2023
27 checks passed
@ghost ghost deleted the pr/glibc-musl-eval-recursion-fix branch October 26, 2023 06:12
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants