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

CPython 3.11.3-1.5.9 No linux-armhf/linux-arm64 builds #1381

Open
AutonomicPerfectionist opened this issue Jul 7, 2023 · 9 comments
Open

Comments

@AutonomicPerfectionist
Copy link
Contributor

Hello, I've noticed that there are no builds in maven for the cpython preset for the linux-armhf, linux-arm64, and linux-ppc64le platforms while they exist for cpython-platform 3.10.8-1.5.8.

I've looked through the commit history, and I found those platforms were commented out in this commit: 57e3fb9

I'm just curious, was there a particular reason behind this change? I can't seem to find any PRs or discussions linked to the above commit, so I'm lost on how to rectify any build incompatibilities that may have warranted the change.

@saudet
Copy link
Member

saudet commented Jul 7, 2023

See discussion in pull #1373 and #1374

@AutonomicPerfectionist
Copy link
Contributor Author

AutonomicPerfectionist commented Jul 9, 2023

@saudet thanks for linking those issues. I've looked through them and everything else I could find related but as far as I can tell, the primary blockers are Mac specific. I did see your comment about crossenv not working in python 3.11 but according to this issue, it should work now.

I pulled this repo and attempted cross compiling for arm64 Linux myself, it made it all the way through compiling Python before it blew up on the JNI compilation for some reason, an error about skipping the cross compiled .so because of incompatible architecture type. Probably just a misconfiguration on my end, I verified the cross compiled Python was a correctly formatted binary for aarch64 but have not tested it on real/virtual hardware.

@AutonomicPerfectionist
Copy link
Contributor Author

Verification of successful cross-compilation:

$ file cpython/cppbuild/linux-arm64/bin/python3.11
cpython/cppbuild/linux-arm64/bin/python3.11: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=1e3b651d10f33551e1dd6a326cce7c74c06d4f70, for GNU/Linux 3.7.0, stripped

Please let me know if there's something amiss in the compiled binary, such as the interpreter location

@AutonomicPerfectionist
Copy link
Contributor Author

I did manage to compile a full cpython-linux-arm64.jar, for whatever reason the JavaCPP-compiler plugin was using my system g++ even after I set all the compiler properties, so I just symlinked the cross compiler g++ there instead and it all worked just fine. I'll have someone else on our project test the jar on a raspberry pi to see if it works

@saudet
Copy link
Member

saudet commented Jul 9, 2023

The problem isn't CPython, it's NumPy

@AutonomicPerfectionist
Copy link
Contributor Author

Ah I see, so the policy then is to not push cpython artifacts for platforms that don't also have working numpy artifacts?

@saudet
Copy link
Member

saudet commented Jul 9, 2023

I suppose we could call it a policy, it's just not something that anyone else than you has ever needed before, so I'd rather put my energies somewhere else. If you want to maintain it, please open a pull request, but as soon as it stops working and you're not there to fix it, I'll just comment it out. Sounds good?

@AutonomicPerfectionist
Copy link
Contributor Author

AutonomicPerfectionist commented Jul 9, 2023

That would be fine. By the way, what issues are you experiencing compiling numpy? I just tried cross compiling (first incrementing the crossenv version to 1.4 in cppbuild.sh) and it seemed to work just fine, I got a full jar file out of it with no errors, and it seems to contain ARM-compiled lib files.

EDIT: Won't be able to open a PR for a bit, but will later today or tomorrow

@saudet
Copy link
Member

saudet commented Jul 10, 2023

I didn't try it with crossenv==1.4.0. If it works, great!

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