-
Notifications
You must be signed in to change notification settings - Fork 38
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
pip install p4p fails on linux-aarch64 #156
Comments
In case anyone is interessted: So I cloned this repo (tag 4.1.12) and changed -"setuptools",
+"setuptools<60", Installing p4p still does not work, but it failed much later:
EDIT: Also changing the version of numpy and Cython solved the issue: -"numpy",
-"Cython>=0.20",
+"numpy<2.0",
+"Cython>=0.20,<3.0", With these two changes to |
This was a breaking change with Numpy 2.0, so that makes sense why pinning to Numpy<2.0 worked. I patched this in commit 1db6252, which corresponds to p4p 4.2.0a1. What version of Python have you been building p4p against? I am also surprised you get an error regarding EDIT: I just noticed in your stacktrace is says "python3.11", which is currently broken with p4p 4.2.0a1. We are waiting for the next Numpy release, and once that is done I can merge #152 which should fix this. |
For the docker container I used I tried building p4p 4.1.12 (f5c96ba) to have the same version as I have on my amd64 machines where I'm using the prebuild binaries from pypi.org |
btw: I just noticed that the pvagw does not work on amd64 after installing it via
You have to manually downgrade numpy with
Maybe it would be a good idea to add limitations to At least in the current HEAD I still see, that numpy and setuptools have no restrictions at all |
Same issue here. I managed to install p4p on linux-aarch64 following @ffeldbauer instructions. Thanks! |
#152 is merged, and |
@ffeldbauer Can you provide a reference link? Was this change intentional? |
@mdavidsaver Yes, here are the two links that I found on my original issue: Where I first found an answer to the original issue: And the Pull request where this change was acutally done: EDIT: In the discussion of the pull request is even mentioned that this change broke numpy and implicit amongst others |
Seems to me, there is a |
I am able to install into a fresh virtualenv
...
|
@mdavidsaver strange that it works for you. Looking at the pyproject files: Line 9 in b1052f4
For python 3.11 you require epicscorelibs to be exactly of version 7.0.7.99.0.2 and pvxs to be version 1.3.1. https://github.com/epics-base/pvxs/blob/93ab81c1532b7078aa261d8608db713898b545b6/pyproject.toml#L2
|
Ok...it seems to be (again) an issue with linux-aarch64: On my desktop PC: $ python3 -m venv p4ptest
$ ./p4ptest/bin/pip install p4p==4.2.0a2
Collecting p4p==4.2.0a2
Downloading p4p-4.2.0a2-cp311-cp311-manylinux2014_x86_64.whl (427 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 427.5/427.5 kB 5.2 MB/s eta 0:00:00
Collecting epicscorelibs<7.0.7.99.2,>=7.0.7.99.1.1a3
Downloading epicscorelibs-7.0.7.99.1.1a3-cp311-cp311-manylinux2014_x86_64.whl (5.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.4/5.4 MB 20.5 MB/s eta 0:00:00
Collecting pvxslibs<1.4.0a1,>=1.3.2a2
Downloading pvxslibs-1.3.2a2-cp311-cp311-manylinux2014_x86_64.whl (2.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 8.8 MB/s eta 0:00:00
Collecting nose2>=0.8.0
Downloading nose2-0.15.1-py3-none-any.whl (211 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 211.3/211.3 kB 3.4 MB/s eta 0:00:00
Collecting ply
Downloading ply-3.11-py2.py3-none-any.whl (49 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.6/49.6 kB 1.0 MB/s eta 0:00:00
Collecting numpy>=1.7
Downloading numpy-2.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.3/16.3 MB 23.9 MB/s eta 0:00:00
Requirement already satisfied: setuptools in ./p4ptest/lib/python3.11/site-packages (from epicscorelibs<7.0.7.99.2,>=7.0.7.99.1.1a3->p4p==4.2.0a2) (66.1.1)
Collecting setuptools-dso>=2.11a2
Downloading setuptools_dso-2.11-py2.py3-none-any.whl (23 kB)
Installing collected packages: ply, setuptools-dso, numpy, nose2, epicscorelibs, pvxslibs, p4p
Successfully installed epicscorelibs-7.0.7.99.1.1a3 nose2-0.15.1 numpy-2.1.1 p4p-4.2.0a2 ply-3.11 pvxslibs-1.3.2a2 setuptools-dso-2.11
$ ./p4ptest/bin/pip freeze
epicscorelibs==7.0.7.99.1.1a3
nose2==0.15.1
numpy==2.1.1
p4p==4.2.0a2
ply==3.11
pvxslibs==1.3.2a2
setuptools-dso==2.11
$ python3 --version
Python 3.11.2
$ uname -r -m
6.1.0-25-amd64 x86_64 |
I can install p4p-4.2.0a2 in aarch64, both on linux (Docker) and darwin, although tests fail when running on Docker (maybe that is expected):
Errors are On macOS, all tests pass
but I get funny error messages printed on the screen:
-------------- config -------------- Docker:
macOS
|
Your docker container is x86_64. For this architecture I was also able to install p4p 4.2.0a2 too. I tried to look at the various libs more closely:
So I'm able to install pvxslibs 1.3.1 standalone. But the required epicscorelibs versions are not compatible with the specified build requirements of p4p ( |
I tried it again and stored the output of the install process in a (verbose) logfile: EDIT: After reading the log file, I found the issue and it is similar to the above for p4p==4.1.12: pvxslibs depends on In order to fix this, one has to somehow force pip to use epicscorelibs==7.0.7.99.0.2 when building pvxslibs.... |
right, sorry I took the wrong container. With another one that is linux-aarch64 I get the same issue:
|
On the positive side, I tried to install p4p with python3.12
and inside the container:
Guess I will just use a docker container to run p4p on my Raspi instead of installing it in the host system |
I think you are correct that this is too strict. pyproject.toml should have loose ranges based on build time requirements. Strict versioning for binaries should either be prepared by CI jobs, or injected into wheel builds by ... see #157 |
Not entirely. A more representative test needs to avoid using wheels.
|
Please re-test with
|
I tested it on my raspi (the
|
p4p-4.2.0a3 installs fine and passes all tests on linux-aarch64 for me as well. thanks! |
Hey,
I currently try to set up a Docker image for linux/amd64, linux/arm64 and linux/arm/v7 containing p4p and some basic configurations for our setups.
Creating the image for linux/amd64 works fine, but I ran into issues with the two arm architectures.
pip tries to compile epicscorelibs, pvxslibs and p4p and fails with
But when I execute
python -c "from distutils.msvccompiler import get_build_version as get_build_msvc_version"
it works without an error.Any idea what goes wrong here?
Maybe I'm missing some build dependencies in my Dockerfile?
The text was updated successfully, but these errors were encountered: