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

commented Dec 4, 2018

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.

pkgs/development/libraries/gmp/5.1.x.nix Outdated Show resolved Hide resolved
@lopsided98

This comment has been minimized.

Copy link
Contributor Author

commented Dec 19, 2018

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

@lopsided98 lopsided98 force-pushed the lopsided98:gmp-uname-purity branch to edc67b5 Dec 19, 2018
@lopsided98

This comment has been minimized.

Copy link
Contributor Author

commented Dec 19, 2018

I also successfully built cross stdenv for armv6l-linux.

@Mic92

This comment has been minimized.

Copy link
Contributor

commented Dec 19, 2018

@GrahamcOfBorg build gmp

@lopsided98 lopsided98 force-pushed the lopsided98:gmp-uname-purity branch from edc67b5 to 7c04f95 Jan 5, 2019
@lopsided98 lopsided98 force-pushed the lopsided98:gmp-uname-purity branch from 7c04f95 to 3e94847 Jan 5, 2019
@lopsided98

This comment has been minimized.

Copy link
Contributor Author

commented Jan 5, 2019

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.

@GrahamcOfBorg GrahamcOfBorg requested a review from vrthra Jan 5, 2019
@ryantm

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

@GrahamcOfBorg build gmp

@lopsided98

This comment has been minimized.

Copy link
Contributor Author

commented Jan 6, 2019

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
12 of 13 checks passed
12 of 13 checks passed
nix-build -A gmp --argstr system x86_64-linux Build Results
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
nix-build -A gmp --argstr system aarch64-linux Build Results
Details
nix-build -A gmp --argstr system x86_64-darwin Build Results
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.