-
Notifications
You must be signed in to change notification settings - Fork 725
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
pyo3-0.20.0 on ppc32: no AtomicI64
in sync::atomic
#3614
Comments
no
AtomicI64 in
sync::atomic``no \
AtomicI64\ in \
sync::atomic\``
no \
AtomicI64\ in \
sync::atomic\``AtomicI64
in sync::atomic
IMO in Rust we could use the portable-atomic crate. |
Does it work if we have that as an optional dependency? Alternatively we could use |
If you give me a patch, I can test it on this system. |
I will try to put something together by end of Sunday. Afraid I'm a little bit behind on OSS this week; was in hospital with my son the two weeks before. |
I created #3619 as I agree with @messense on using portable-atomic to resolve this. @mgorny Could you give it a try? An alternative I see is safely casting the interpreter ID to 32-bits (using |
Thank you! I can confirm that the setuptools-rust example builds against your branch on that machine, and the tests pass. |
As reported by Antoine Coutant on the Buildroot mailing list [1]: rpds depends on the crate pyo3. This crate uses "std::sync::atomic::AtomicI64" which doesn't exist for 32 bits targets. That leads to an error as reported by Buildroot Gitlab-ci. An issue have been opened on pyo3's github [2]. A fix have been accepted by pyo3 [3] and merged in pyo3 0.20.3 release [4]. This pyo3 0.20.3 uses crate portable-atomic [5] to provide atomic types and compare and swap operations for all targets that can use std. python-rpds-py 0.18.1 is the first release that use pyo3 0.20.3. Before python-rpds-py 0.18.1 release fixing this issue would require that we be able to patch a package during the Cargo vendoring step [6]. [1] http://lists.busybox.net/pipermail/buildroot/2024-February/684867.html [2]: PyO3/pyo3#3614 [3]: PyO3/pyo3#3619 [4]: https://github.com/PyO3/pyo3/blob/v0.20.3/CHANGELOG.md [5]: https://github.com/taiki-e/portable-atomic [6]: http://lists.busybox.net/pipermail/buildroot/2024-February/684886.html Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/6783811842 (TestPythonPy3Dtschema) https://gitlab.com/buildroot.org/buildroot/-/jobs/6783811860 (TestPythonPy3FlaskExpectsJson) Reported-by: Antoine Coutant <antoine.coutant@smile.fr> Cc: James Hilliard <james.hilliard1@gmail.com> Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
As reported by Antoine Coutant on the Buildroot mailing list [1]: rpds depends on the crate pyo3. This crate uses "std::sync::atomic::AtomicI64" which doesn't exist for 32 bits targets. That leads to an error as reported by Buildroot Gitlab-ci. An issue have been opened on pyo3's github [2]. A fix have been accepted by pyo3 [3] and merged in pyo3 0.20.3 release [4]. This pyo3 0.20.3 uses crate portable-atomic [5] to provide atomic types and compare and swap operations for all targets that can use std. python-rpds-py 0.18.1 is the first release that use pyo3 0.20.3. Before python-rpds-py 0.18.1 release fixing this issue would require that we be able to patch a package during the Cargo vendoring step [6]. [1] http://lists.busybox.net/pipermail/buildroot/2024-February/684867.html [2]: PyO3/pyo3#3614 [3]: PyO3/pyo3#3619 [4]: https://github.com/PyO3/pyo3/blob/v0.20.3/CHANGELOG.md [5]: https://github.com/taiki-e/portable-atomic [6]: http://lists.busybox.net/pipermail/buildroot/2024-February/684886.html Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/6783811842 (TestPythonPy3Dtschema) https://gitlab.com/buildroot.org/buildroot/-/jobs/6783811860 (TestPythonPy3FlaskExpectsJson) Reported-by: Antoine Coutant <antoine.coutant@smile.fr> Cc: James Hilliard <james.hilliard1@gmail.com> Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 26b0540) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Bug Description
When building a package (html-py-ever example from setuptools-rust) using pyo3 0.20.0 on ppc32, I'm getting the following error:
Steps to Reproduce
Backtrace
Your operating system and version
Gentoo Linux, ppc32 nspawn container on POWER9
Your Python version (
python --version
)Python 3.11.6
Your Rust version (
rustc --version
)rustc 1.71.1 (eb26296b5 2023-08-03)
Your PyO3 version
0.20.0
How did you install python? Did you use a virtualenv?
Gentoo package. Tested inside a venv (with another venv layer via build) and outside.
Additional Info
I know that C programs using 64-bit atomics need to explicitly link
-latomic
here. I don't know how that maps to Rust.The text was updated successfully, but these errors were encountered: