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

Closed
wants to merge 1 commit into from

Conversation

@primeos
Copy link
Member

primeos commented Jun 20, 2020

Motivation for this change
[nix-review@ava:~/nixpkgs]$ nix-build -A python3Packages.pycryptodome -A pkgsCross.aarch64-multiplatform.python3Packages.pycryptodome
/nix/store/zd4mv1k88y8w9dp32l3f611yl6khc4zn-python3.7-pycryptodome-3.9.7
/nix/store/w3a3h99p8gaaw7xwlnfx7yzh7q0pci9k-python3.7-pycryptodome-3.9.7-aarch64-unknown-linux-gnu
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 CONTRIBUTING.md.
@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

Mic92 Jun 20, 2020

Contributor

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

This comment has been minimized.

Copy link
@primeos

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

@primeos
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
@FRidh
Copy link
Member

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