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.pynacl: doesn't cross-compile #135149

Closed
legendofmiracles opened this issue Aug 22, 2021 · 1 comment · Fixed by #135447
Closed

python3Packages.pynacl: doesn't cross-compile #135149

legendofmiracles opened this issue Aug 22, 2021 · 1 comment · Fixed by #135447
Labels
0.kind: bug 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 6.topic: python

Comments

@legendofmiracles
Copy link
Contributor

Describe the bug

The package python3Packages.pynacl can't be cross compiled to other architectures, tested: raspberry-pi and aarch-multiplatform

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix build nixpkgs#pkgsCross.raspberryPi.python3Packages.pynacl

Expected behavior

It should be compiled.

Screenshots

$ nix build nixpkgs#pkgsCross.raspberryPi.python3Packages.pynacl
error: builder for '/nix/store/vs3s6kmri734axcxcf9pk90ccd1vrpb8-python3.9-pynacl-1.4.0-armv6l-unknown-linux-gnueabihf.drv' failed with exit code 1;
       last 10 log lines:
       >     add_cffi_module(dist, cffi_module)
       >   File "/nix/store/bvwj3jd0ddnjm0lv12smkb16dz4c5rvc-python3.9-cffi-1.14.5-armv6l-unknown-linux-gnueabihf/lib/python3.9/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
       >     execfile(build_file_name, mod_vars)
       >   File "/nix/store/bvwj3jd0ddnjm0lv12smkb16dz4c5rvc-python3.9-cffi-1.14.5-armv6l-unknown-linux-gnueabihf/lib/python3.9/site-packages/cffi/setuptools_ext.py", line 25, in execfile
       >     exec(code, glob, glob)
       >   File "src/bindings/build.py", line 36, in <module>
       >     ffi = FFI()
       >   File "/nix/store/bvwj3jd0ddnjm0lv12smkb16dz4c5rvc-python3.9-cffi-1.14.5-armv6l-unknown-linux-gnueabihf/lib/python3.9/site-packages/cffi/api.py", line 48, in __init__
       >     import _cffi_backend as backend
       > ModuleNotFoundError: No module named '_cffi_backend'
       For full logs, run 'nix log /nix/store/vs3s6kmri734axcxcf9pk90ccd1vrpb8-python3.9-pynacl-1.4.0-armv6l-unknown-linux-gnueabihf.drv'.

Additional context

This doesn't seem to a nix-only problem, but still influenced by nix.

Doesn't compile on arm: pyca/pynacl#654
AIX: pyca/pynacl#555
Some missing support for aarch64: pyca/pynacl#601
Doesn't compile via qemu for arm32v7 and arm64v8: pyca/pynacl#553

The error I'm having doesn't seem to show up anywhere else though. And a few of those threads also post work arounds.

Notify maintainers

There is no maintainer.

System Information

$ nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.05 MiB download, 0.28 MiB unpacked):
/nix/store/xq77wmzk8d306anyk9rsvl4i4h7ihchw-bash-interactive-4.4-p23-dev
copying path '/nix/store/xq77wmzk8d306anyk9rsvl4i4h7ihchw-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...

  • system: "x86_64-linux"
  • host os: Linux 5.13.12-xanmod1-cacule, NixOS, 21.11 (Porcupine)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.4pre20210802_47e96bb
  • channels(root): ""
  • channels(nix): ""
  • nixpkgs: /nix/store/02cm621rs5wbnmvbq79b12f08hs8xrf0-xfw6vsapwykrrcqhjs4zi4kzwhgji4hx-source

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: python3Packages.pynacl
# a list of nixos modules affected by the problem
module:
@veprbl veprbl added 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 6.topic: python labels Aug 22, 2021
@legendofmiracles
Copy link
Contributor Author

legendofmiracles commented Aug 23, 2021

It seems to be that every package that declares cffi in it's propagatedBuildInputs is failing to cross compile. If I put it in nativeBuildInputs it fails with another error though:

     > Executing pipInstallPhase
      > /build/PyNaCl-1.4.0/dist /build/PyNaCl-1.4.0
      > Processing ./PyNaCl-1.4.0-cp39-cp39-linux_armv6l.whl
      > Requirement already satisfied: cffi>=1.4.1 in /nix/store/lf0ydk1cjzgrsll3j3vx3yngmvmwcnrd-python3.9-cffi-1.14.5/lib/python3.9/site-packages (from PyNaCl==1.4.0) (1.14.5)
      > ERROR: Could not find a version that satisfies the requirement six (from pynacl) (from versions: none)
      > ERROR: No matching distribution found for six

Should I open another, conglomerate, issue for all the other packages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 6.topic: python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants