-
Notifications
You must be signed in to change notification settings - Fork 8
Add linux aarch64 wheel build support #17
base: master
Are you sure you want to change the base?
Conversation
lonvia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Happy to include this. I have no way to test it but that's the same for windows.
cibuild/linux_steps.sh
Outdated
| then | ||
| yum install -y expat-devel boost-devel zlib-devel | ||
| wget https://download-ib01.fedoraproject.org/pub/epel/7/aarch64/Packages/g/geos-3.4.2-2.el7.aarch64.rpm | ||
| rpm -i geos-3.4.2-2.el7.aarch64.rpm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate on that part? It is a bit surprising. I thought we don't need geos anymore. We do need sparsehash though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need it in aarch64 as the 1.7.1 version of shapely does not have aarch64 wheels in PyPI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I would recommend the structure:
yum install -y expat-devel boost-devel zlib-devel
if [ "$(uname -m)" == "aarch64" ]
then
wget https://download-ib01.fedoraproject.org/pub/epel/7/aarch64/Packages/g/geos-3.4.2-2.el7.aarch64.rpm
rpm -i geos-3.4.2-2.el7.aarch64.rpm
else
yum install -y sparsehash-devel
fiAnd given @lonvia comment (which I agree with), I'd move sparsehash up and remove else, unless sparsehash package is missing for aarch64 (then we need some other workaround for it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sparsehash-devel cannot be installed in aarch64 using the yum install command. We need to download the .rpm file and then install it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you are installing geos not sparsehash.
The libosmium maintainer tells me, that sparsehash is deprecated anyway. So lets simply remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I have removed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, you have now removed everything for non-ARM builts with the obvious effect that it no longer works.
Before you go any further please answer the following question: why do you install geos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you install geos?
We need it as the 1.7.1 version of shapely does not have aarch64 wheels in PyPI so it is building from the source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. The geos installation should go into an extra script than that is run by CIBW_BEFORE_TEST.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
Oh god, the GitHub docs on arch is so bad. Here they mention: On the other hand, runners provide no hint about which architecture is supported on which OS... And I'm pretty sure I saw some news regarding availability of Apple M1 machines for CI/CD recently (or maybe it was only a complaint about missing binary packages for macOS aarch64 on PyPI). But I assume, that Linux+aarch64 works on Github provided workers. @odidev Do you have any successful runs that you can share? EDIT: we can actually add arm64 binary wheels thanks to cibuild! |
2b8cf57 to
f7b9e50
Compare
|
@wiktorn Github Action does not have an aarch64 build agent so we can run it through emulation only. In Github Action we can configure our own self-hosted aarch64 runner. |
45e15c4 to
a1ae412
Compare
Signed-off-by: odidev <odidev@puresoftware.com>
a1ae412 to
9292637
Compare
|
@wiktorn Let me know if any changes are required from my side? |
Add linux aarch64 wheel build support.
Related to #16 @lonvia Could you please review this PR?