Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Conversation

@odidev
Copy link

@odidev odidev commented Dec 7, 2021

Add linux aarch64 wheel build support.

Related to #16 @lonvia Could you please review this PR?

Copy link
Member

@lonvia lonvia left a 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.

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
Copy link
Member

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.

Copy link
Author

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.

Copy link
Collaborator

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
fi

And 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).

Copy link
Author

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.

Copy link
Member

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.

Copy link
Author

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.

Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@lonvia lonvia requested a review from wiktorn December 8, 2021 07:59
@wiktorn
Copy link
Collaborator

wiktorn commented Dec 9, 2021

Oh god, the GitHub docs on arch is so bad. Here they mention:

The architecture of the runner executing the job. Possible values are X86, X64, ARM, and ARM64

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!

@odidev odidev force-pushed the odidev_pyosmium-wheel-build branch from 2b8cf57 to f7b9e50 Compare December 10, 2021 05:12
@odidev
Copy link
Author

odidev commented Dec 10, 2021

@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.

@odidev odidev force-pushed the odidev_pyosmium-wheel-build branch 2 times, most recently from 45e15c4 to a1ae412 Compare December 16, 2021 10:40
Signed-off-by: odidev <odidev@puresoftware.com>
@odidev odidev force-pushed the odidev_pyosmium-wheel-build branch from a1ae412 to 9292637 Compare May 6, 2022 13:27
@odidev
Copy link
Author

odidev commented May 6, 2022

@wiktorn Let me know if any changes are required from my side?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants