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: fix cross-build #56235

Merged
merged 1 commit into from Feb 24, 2019
Merged

glibc: fix cross-build #56235

merged 1 commit into from Feb 24, 2019

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Feb 23, 2019

glibc's buildsystem uses its own executables to generate locales.
This does not work for cross-compilation so instead we use localedef
from buildPackages.

cc @vcunat

I only tested the build so far. Please verify that the cross-compiled archive also works. i.e. python

LOCALE_ARCHIVE= python -c 'import locale; locale.setlocale(locale.LC_ALL, "C.UTF-8")'
Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

glibc's buildsystem uses its own executables to generate locales.
This does not work for cross-compilation so instead we use localedef
from buildPackages.
@vcunat
Copy link
Member

vcunat commented Feb 23, 2019

Nitpick: as written, this shouldn't cause any rebuild for non-cross, so I'd expect to merge to master directly. EDIT: In particular, only the failing builds should get rebuilt.

@Mic92
Copy link
Member Author

Mic92 commented Feb 23, 2019

@vcunat sure, you can cherry-pick it, if you tested the cross-compiled binaries.

@vcunat
Copy link
Member

vcunat commented Feb 23, 2019

I did some very basic tests of running cross-compiled binaries with this, but not even any locale so far.

@lopsided98
Copy link
Contributor

It seems like this should definitely go into master, since cross is completely broken right now, and we shouldn't have to wait for a staging merge to fix it.

@Mic92 Mic92 merged commit 0aec9d4 into NixOS:staging Feb 24, 2019
@Mic92 Mic92 deleted the glibc-cross branch February 24, 2019 09:40
@Mic92
Copy link
Member Author

Mic92 commented Feb 24, 2019

master: ff1b945

@Ericson2314
Copy link
Member

Awesome!!

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.

None yet

5 participants