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

gmp: don't use uname to detect system features #51515

Merged
merged 1 commit into from Jan 9, 2019

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

On 32-bit ARM, gmp is explicitly configured with an alternative way to autodetect the build platform to work around a bug in the default system detection. This has the side effect of making it impossible to build correctly for armv6l on an armv7l machine.

Things done

This PR replaces the configfsf.guess script with stdenv.buildPlatform.config. This makes the build more pure and also makes the derivation a little cleaner because we can use configureFlags instead of the preConfigure script.

I split the change into two commits, the first which avoids a mass rebuild on architectures other than 32-bit ARM, and second which cleans up the derivation with a mass rebuild (removing the preConfigure attribute).

I would like to get the first commit into master, and the second into staging, but I'm not sure what the procedure is for that.

cc @peti @vrthra

  • 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.

@lopsided98
Copy link
Contributor Author

I enabled it on all platforms and successfully built stdenv on x86_64.

@lopsided98
Copy link
Contributor Author

I also successfully built cross stdenv for armv6l-linux.

@Mic92
Copy link
Member

Mic92 commented Dec 19, 2018

@GrahamcOfBorg build gmp

@lopsided98
Copy link
Contributor Author

Can this be merged, or at least have the build triggered again? The ofborg logs seem to not be available anymore, but the x86_64 failure is a timeout, and the darwin failure seems to be a problem with a dependency.

@ryantm
Copy link
Member

ryantm commented Jan 5, 2019

@GrahamcOfBorg build gmp

@lopsided98
Copy link
Contributor Author

It timed out again on x86_64-linux, but x86_64-darwin succeeded this time, as well as aarch64-linux.

@Mic92 Mic92 merged commit 5611611 into NixOS:staging Jan 9, 2019
@lopsided98 lopsided98 deleted the gmp-uname-purity branch October 6, 2020 00:28
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

4 participants