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

diffutils: disable tests on aarch64 musl #258689

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

alyssais
Copy link
Member

@alyssais alyssais commented Oct 2, 2023

Description of changes

The tests have never worked on aarch64 musl, so this restores the previous behaviour on that platform of building successfully even though the tests don't pass.

Since the tests work on x86_64 musl, and not aarch64 musl, my best guess having not looked too closely is that the difference is because aarch64 is stuck on ancient bootstrap tools for musl that cause all sorts of problems. Hopefully we can revert this once the bootstrap tools are updated. Having diffutils building is a prerequisite to doing that.

Things done

  • Built on platform(s)
    • 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/)
  • 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.

@alyssais alyssais requested review from dasJ and yu-re-ka October 2, 2023 23:54
@alyssais alyssais added the 6.topic: musl Running or building packages with musl libc label Oct 2, 2023
@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 labels Oct 3, 2023
@Artturin
Copy link
Member

Artturin commented Oct 3, 2023

nix build --impure --expr "with import ./. { crossSystem = { config = \"x86_64-unknown-linux-musl\"; }; }; diffutils"
fails too

FAIL: test-getopt-gnu
=====================
test-getopt.h:659: assertion 'optind == 2' failed
FAIL test-getopt-gnu (exit status: 134)
FAIL: test-getopt-posix
=======================
test-getopt.h:659: assertion 'optind == 2' failed
FAIL test-getopt-posix (exit status: 134)
SKIP: test-mbrtowc1.sh
======================

pkgsMusl.diffutils builds

@alyssais
Copy link
Member Author

alyssais commented Oct 3, 2023

I'm not sure what the best thing to do about x86_64 cross is — I think maybe I'd prefer to leave that and hope somebody actually tries to debug it at some point, because for that we don't have an excuse (of old bootstrap tools).

@yu-re-ka
Copy link
Contributor

yu-re-ka commented Oct 3, 2023

FYI pkgsMusl.patchutils_0_4_2 also has a problem. I don't know if it is related to either of the other two.

The tests have never worked on aarch64 musl, so this restores the
previous behaviour on that platform of building successfully even
though the tests don't pass.

Since the tests work on x86_64 musl, and not aarch64 musl, my best
guess having not looked too closely is that the difference is because
aarch64 is stuck on ancient bootstrap tools for musl that cause all
sorts of problems.  Hopefully we can revert this once the bootstrap
tools are updated.  Having diffutils building is a prerequisite to
doing that.

Fixes: 9588972 ("diffutils: 3.9 -> 3.10")
@alyssais alyssais force-pushed the diffutils-aarch64-musl branch from d23fac9 to d57fa98 Compare October 9, 2023 10:23
@alyssais
Copy link
Member Author

alyssais commented Oct 9, 2023

I've changed this to check the build platform instead of the host platform, because I realised there'd be no need to disable the tests when building pkgsStatic.diffutils from glibc, or when cross compiling to glibc from musl (which doesn't currently work, but will with #259964).

We now have the musl stdenvBootstrapTools jobs on Hydra, so this is the last remaining blocker to having working aarch64-unknow-linux-musl builds.

I'll take this opportunity to restate that I want to keep this fix as narrowly scoped as possible, because in general, test failures should be investigated rather than hidden, but this is a special case because it's likely due to having outdated bootstrap tools, and is blocking having newer bootstrap tools.

@alyssais alyssais merged commit 45584b3 into NixOS:master Oct 10, 2023
9 checks passed
@alyssais alyssais deleted the diffutils-aarch64-musl branch October 10, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: musl Running or building packages with musl libc 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.

3 participants