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

Build failure: python-cryptography fails to cross compile for armv7l #262073

Closed
kjeremy opened this issue Oct 19, 2023 · 5 comments
Closed

Build failure: python-cryptography fails to cross compile for armv7l #262073

kjeremy opened this issue Oct 19, 2023 · 5 comments

Comments

@kjeremy
Copy link
Contributor

kjeremy commented Oct 19, 2023

Steps To Reproduce

Steps to reproduce the behavior:

  1. Clone nixpkgs
  2. nix build .#pkgsCross.armv7l-hf-multiplatform.python3Packages.cryptography

Build log

Complete log: https://gist.github.com/kjeremy/930924ab9b0704db331a14b5649a4a70

running: "armv7l-unknown-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=armv7-a" "-mfpu=vfpv3-d16" "-I" "/nix/store/pzf6dnxg8gf04xazzjdwarm7s03cbrgz-python3-3.10.12/include/python3.10" "-I" "/nix/store/fkcygywf96d1cvgz1fyln0szsh23yxjq-openssl-armv7l-unknown-linux-gnueabihf-3.0.10-dev/include" "-Wall" "-Wextra" "-Wconversion" "-Wno-error=sign-conversion" "-Wno-unused-parameter" "-DPy_LIMITED_API=0x030700f0" "-o" "/build/cryptography-41.0.3/src/rust/target/armv7-unknown-linux-gnueabihf/release/build/cryptography-cffi-1eecc4eb12ccf2f6/out/673c62801e1286cf-_openssl.o" "-c" "/build/cryptography-41.0.3/src/rust/target/armv7-unknown-linux-gnueabihf/release/build/cryptography-cffi-1eecc4eb12ccf2f6/out/_openssl.c"
  cargo:warning=In file included from /nix/store/pzf6dnxg8gf04xazzjdwarm7s03cbrgz-python3-3.10.12/include/python3.10/Python.h:50,
  cargo:warning=                 from /build/cryptography-41.0.3/src/rust/target/armv7-unknown-linux-gnueabihf/release/build/cryptography-cffi-1eecc4eb12ccf2f6/out/_openssl.c:57:
  cargo:warning=/nix/store/pzf6dnxg8gf04xazzjdwarm7s03cbrgz-python3-3.10.12/include/python3.10/pyport.h:746:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  cargo:warning=  746 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  cargo:warning=      |  ^~~~~
  exit status: 1

Additional context

nixpkgs rev ca012a0

This looks similar to #205807 which is reported as fixed.

Notify maintainers

@Artturin @Cynerd

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.55, NixOS, 23.11 (Tapir), 23.11.20230925.6500b45`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.0`
 - channels(root): `"nixos"`
 - channels(jkolb): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@kjeremy
Copy link
Contributor Author

kjeremy commented Oct 19, 2023

The include directory for python looks suspicious. I tried setting PYO3_CROSS_INCLUDE_DIR in the setup hook but that doesn't seem to make a difference.

@rblrblrblrbl
Copy link

Hello @kjeremy
I'm facing the same issue, did you succeed in making it work, with potentially some workarounds ?

@kjeremy
Copy link
Contributor Author

kjeremy commented Jan 8, 2024

@rblrblrblrbl no I have not yet.

@kjeremy
Copy link
Contributor Author

kjeremy commented Jul 18, 2024

Hello @kjeremy I'm facing the same issue, did you succeed in making it work, with potentially some workarounds ?

This seems to work for me now.

@kjeremy
Copy link
Contributor Author

kjeremy commented Jul 18, 2024

Closing

@kjeremy kjeremy closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants