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

python3Packages.pycryptodome: Fix the cross compilation #91161

wants to merge 1 commit into from


Copy link

primeos commented Jun 20, 2020

Motivation for this change
[nix-review@ava:~/nixpkgs]$ nix-build -A python3Packages.pycryptodome -A pkgsCross.aarch64-multiplatform.python3Packages.pycryptodome
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits
@primeos primeos requested review from FRidh and jonringer as code owners Jun 20, 2020
@ofborg ofborg bot added the 6.topic: python label Jun 20, 2020
@primeos primeos force-pushed the primeos:cross-compilation-fixes branch from e2aac41 to d3125b0 Jun 20, 2020
@@ -9,6 +9,10 @@ buildPythonPackage rec {
sha256 = "f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2";

preBuild = ''
export LDSHARED="$CC -shared" # Fix cross compilation, defaults to gcc instead of $CC

This comment has been minimized.

Copy link

Mic92 Jun 20, 2020


Is this a variable python uses or this project in particular?

This comment has been minimized.

Copy link

primeos Jun 20, 2020

Author Member

It's something that distutils uses and it would be best to fix this in our Python abstraction if someone has time for it. I've opened #91171 and added some information there, but I didn't really dig deeper into this. For me this was only a quick fix for cross compiling another package. We can either merge this until we have a proper fix or close this PR (I'm fine with both).

Copy link
Member Author

primeos commented Jun 20, 2020

I'll close this PR as we already have #91178 now to fix this properly.
Thank you @FRidh :)

@primeos primeos closed this Jun 20, 2020
Copy link

FRidh commented Jun 20, 2020

Well, not sure if its the proper way really! But please do test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.