Skip to content

Unable to build riscv64 wheels #7605

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

Closed
markdryan opened this issue Apr 3, 2025 · 4 comments
Closed

Unable to build riscv64 wheels #7605

markdryan opened this issue Apr 3, 2025 · 4 comments

Comments

@markdryan
Copy link
Contributor

markdryan commented Apr 3, 2025

To reproduce, I cloned the repo and checked out the latest release tag. Then on a VisionFive 2 running Ubuntu 24.04 I type

python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install setuptools wheel build auditwheel
cd src/api/python
python -m build --wheel

and I get the following error

* Building wheel...
running bdist_wheel
Traceback (most recent call last):
  File "/home/ubuntu/code/z3/venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
    main()
  File "/home/ubuntu/code/z3/venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/code/z3/venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
    return _build_backend().build_wheel(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/build_meta.py", line 435, in build_wheel
    return _build(['bdist_wheel'])
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/build_meta.py", line 426, in _build
    return self._build_with_temp_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/build_meta.py", line 407, in _build_with_temp_dir
    self.run_setup()
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
    exec(code, locals())
  File "<string>", line 323, in <module>
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 186, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
    dist.run_commands()
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
    self.run_command(cmd)
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/dist.py", line 1104, in run_command
    super().run_command(command)
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1020, in run_command
    cmd_obj.ensure_finalized()
  File "/tmp/build-env-bvc8fke7/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 135, in ensure_finalized
    self.finalize_options()
  File "<string>", line 319, in finalize_options
KeyError: ('linux', 'riscv64')

ERROR Backend subprocess exited when trying to invoke build_wheel

This is on Ubuntu 24.04 with Python 3.12, but I also see the same issue with Ubuntu 22.04 and Python 3.8. I'm able to build riscv64 wheels for earlier releases of z3, e.g., z3-4.12.2, without issue.

It looks like the TAGS dict in setup.py is missing entries for riscv64. Is this intentional?

@NikolajBjorner
Copy link
Contributor

It looks like the TAGS dict in setup.py is missing entries for riscv64. Is this intentional?

No. Could you add a PR to include it and optionally update the Github actions for RISC builds to include the step where wheels are built?

NikolajBjorner added a commit that referenced this issue Apr 5, 2025
add case for linux/risc64
@NikolajBjorner
Copy link
Contributor

could you check if the update addresses the core issue?

@markdryan
Copy link
Contributor Author

Yes it should do. I applied a similar patch which allowed me to build a 4.14.1.0 wheel for riscv64.

arbipher pushed a commit to arbipher/z3 that referenced this issue Apr 17, 2025
add case for linux/risc64
@NikolajBjorner
Copy link
Contributor

thanks

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

No branches or pull requests

2 participants