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

Building CargoPythonBundle EasyConfigs fails because of maturin error #21789

Open
Thyre opened this issue Nov 6, 2024 · 3 comments
Open

Building CargoPythonBundle EasyConfigs fails because of maturin error #21789

Thyre opened this issue Nov 6, 2024 · 3 comments
Milestone

Comments

@Thyre
Copy link
Contributor

Thyre commented Nov 6, 2024

While working on easybuilders/easybuild-easyblocks#3472, I ran into issues with jiter-0.4.1-GCCcore-12.3.0.eb and pydantic-2.9.1-GCCcore-13.3.0.eb.

In both cases, maturin would fail with the following error message:

Python interpreter should be a kind of interpreter (e.g. 'python3.8' or 'pypy3.9') when cross-compiling, got path to interpreter: <EB_PREFIX>/software/Python/3.11.3-GCCcore-12.3.0/bin/python

  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

   Preparing metadata (pyproject.toml) did not run successfully.
   exit code: 1
  > [6 lines of output]
       Found pyo3 bindings
       maturin failed
        Caused by: Python interpreter should be a kind of interpreter (e.g. 'python3.8' or 'pypy3.9') when cross-compiling, got path to interpreter: /tank/Programs/Linux/EasyBuild/datenlager/Software/software/Python/3.11.3-GCCcore-12.3.0/bin/python
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/eb-ibucduig/pip-modern-metadata-debc3bzs', '--interpreter', '/tank/Programs/Linux/EasyBuild/datenlager/Software/software/Python/3.11.3-GCCcore-12.3.0/bin/python']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/eb-ibucduig/pip-modern-metadata-debc3bzs --interpreter /tank/Programs/Linux/EasyBuild/datenlager/Software/software/Python/3.11.3-GCCcore-12.3.0/bin/python`
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

 Encountered error while generating package metadata.
> See above for output.

I'm clearly not running on a cross-compiling machine, using my private system with an AMD Ryzen 7800X3D and my home-server with an AMD Ryzen 3700X. I don't know what's going wrong here...

A gist of a test-build can be found here: https://gist.github.com/Thyre/abd4413683d3801209f2daa0a6d77ed8

@boegel
Copy link
Member

boegel commented Nov 6, 2024

@Thyre What type of filesystem is /tank? Maybe there's related here...

Something is definitely tripping up some check that's being done by maturin

@boegel boegel added this to the 4.x milestone Nov 6, 2024
@Thyre
Copy link
Contributor Author

Thyre commented Nov 6, 2024

@Thyre What type of filesystem is /tank? Maybe there's related here...

Something is definitely tripping up some check that's being done by maturin

It is an OpenZFS filesystem. On my personal system, it also fails with ext4 on a separate SSD (mounted at /data).

@Thyre
Copy link
Contributor Author

Thyre commented Nov 11, 2024

The issue occurs because ARCHFLAGS is set on my systems. I think we may want to unset that variable to make sure that building works regardless of the users environment. The error thrown by maturin certainly doesn't help.

PyO3/maturin#2101 (comment)

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

No branches or pull requests

2 participants