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

@@ -9,6 +9,10 @@ buildPythonPackage rec {
sha256 = "f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2";
};

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@FRidh FRidh Jun 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@kvtb
Copy link
Contributor

kvtb commented Jul 10, 2021

@GrahamcOfBorg build pkgsCross.aarch64-multiplatform.python3Packages.pycryptodome

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