-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-6148: [Packaging] Improve aarch64 support #5024
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
Conversation
|
Also worth noting: there is 'clang-7' package on arm64. In Debian 'buster'. |
|
I've created a Jira ticket at https://jira.apache.org/jira/browse/ARROW-6148, if you want to assign it to yourself, you'll get the resolution credits. |
kou
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.
We can't require clang-7 package because there isn't clang-7 package on Debian stretch arm64.
If we drop Debian stretch arm64 or we create dev/tasks/linux-packages/debian.debian-buster, we can require clang-7 package as a build dependency.
|
With those changes I am able to build packages for aarch64 Debian 'stretch' and Debian 'buster' (Ubuntu builds are in progress now). |
|
I have Xenial related update in test now - sync of debian.ubuntu-xenial/ with debian/ files. |
|
With all those changes I can run "rake apt" on x86-64 and aarch64 systems and get packages for
CUDA/Plasma/Gandiva are enabled for x86 architectures in all those OSes. Gandiva gets enabled on non-x86 architectures for everything except 'xenial'. 'nvidia-cuda-toolkit' and 'clang-7' are installed if needed by additional check in respecting Dockerfile. |
|
Potential change on top: enabling 'flight' on Xenial. |
kou
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.
This pull request is for "Add missing build dependencies for Debian".
Adding support for arm64 is out of scope.
Could you create another JIRA issue and pull request for arm64 support?
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 use separated Dockerfile for arm64 because base image is different. (debian:buster and arm64v8/debian:buster.)
See dev/tasks/linux-pakcages/debian-stretch-arm64 for details.
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.
You use 'debian-stretch-arm64' because you are crossbuilding for arm64 on x86-64. We use normal Dockerfiles when we build Arrow directly on arm64.
This change does not affect your x86-64 builds but helps us to build on arm64.
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.
./debian/pool/buster/main/a/apache-arrow:
apache-arrow_0.15.0~dev20190910-1.debian.tar.xz
apache-arrow_0.15.0~dev20190910-1.dsc
apache-arrow_0.15.0~dev20190910.orig.tar.gz
gir1.2-arrow-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-gandiva-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-parquet-1.0_0.15.0~dev20190910-1_arm64.deb
libarrow15_0.15.0~dev20190910-1_arm64.deb
libarrow15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset15_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-flight15_0.15.0~dev20190910-1_arm64.deb
libarrow-flight15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libarrow-flight-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib15_0.15.0~dev20190910-1_arm64.deb
libarrow-glib15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-doc_0.15.0~dev20190910-1_all.deb
libarrow-python15_0.15.0~dev20190910-1_arm64.deb
libarrow-python15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libarrow-python-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva15_0.15.0~dev20190910-1_arm64.deb
libgandiva15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libgandiva-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib15_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib-doc_0.15.0~dev20190910-1_all.deb
libparquet15_0.15.0~dev20190910-1_arm64.deb
libparquet15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libparquet-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib15_0.15.0~dev20190910-1_arm64.deb
libparquet-glib15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-doc_0.15.0~dev20190910-1_all.deb
./debian/pool/stretch/main/a/apache-arrow:
apache-arrow_0.15.0~dev20190910-1.debian.tar.xz
apache-arrow_0.15.0~dev20190910-1.dsc
apache-arrow_0.15.0~dev20190910.orig.tar.gz
gir1.2-arrow-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-gandiva-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-parquet-1.0_0.15.0~dev20190910-1_arm64.deb
libarrow15_0.15.0~dev20190910-1_arm64.deb
libarrow15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset15_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-flight15_0.15.0~dev20190910-1_arm64.deb
libarrow-flight15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libarrow-flight-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib15_0.15.0~dev20190910-1_arm64.deb
libarrow-glib15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-doc_0.15.0~dev20190910-1_all.deb
libarrow-python15_0.15.0~dev20190910-1_arm64.deb
libarrow-python15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libarrow-python-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva15_0.15.0~dev20190910-1_arm64.deb
libgandiva15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libgandiva-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib15_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib-doc_0.15.0~dev20190910-1_all.deb
libparquet15_0.15.0~dev20190910-1_arm64.deb
libparquet15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libparquet-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib15_0.15.0~dev20190910-1_arm64.deb
libparquet-glib15-dbgsym_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-doc_0.15.0~dev20190910-1_all.deb
./ubuntu/pool/bionic/universe/a/apache-arrow:
apache-arrow_0.15.0~dev20190910-1.debian.tar.xz
apache-arrow_0.15.0~dev20190910-1.dsc
apache-arrow_0.15.0~dev20190910.orig.tar.gz
gir1.2-arrow-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-gandiva-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-parquet-1.0_0.15.0~dev20190910-1_arm64.deb
libarrow15_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset15_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-flight15_0.15.0~dev20190910-1_arm64.deb
libarrow-flight-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib15_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-doc_0.15.0~dev20190910-1_all.deb
libarrow-python15_0.15.0~dev20190910-1_arm64.deb
libarrow-python-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva15_0.15.0~dev20190910-1_arm64.deb
libgandiva-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib15_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib-doc_0.15.0~dev20190910-1_all.deb
libparquet15_0.15.0~dev20190910-1_arm64.deb
libparquet-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib15_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-doc_0.15.0~dev20190910-1_all.deb
./ubuntu/pool/cosmic/universe/a/apache-arrow:
apache-arrow_0.15.0~dev20190910-1.debian.tar.xz
apache-arrow_0.15.0~dev20190910-1.dsc
apache-arrow_0.15.0~dev20190910.orig.tar.gz
gir1.2-arrow-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-gandiva-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-parquet-1.0_0.15.0~dev20190910-1_arm64.deb
libarrow15_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset15_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-flight15_0.15.0~dev20190910-1_arm64.deb
libarrow-flight-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib15_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-doc_0.15.0~dev20190910-1_all.deb
libarrow-python15_0.15.0~dev20190910-1_arm64.deb
libarrow-python-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva15_0.15.0~dev20190910-1_arm64.deb
libgandiva-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib15_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib-doc_0.15.0~dev20190910-1_all.deb
libparquet15_0.15.0~dev20190910-1_arm64.deb
libparquet-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib15_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-doc_0.15.0~dev20190910-1_all.deb
./ubuntu/pool/disco/universe/a/apache-arrow:
apache-arrow_0.15.0~dev20190910-1.debian.tar.xz
apache-arrow_0.15.0~dev20190910-1.dsc
apache-arrow_0.15.0~dev20190910.orig.tar.gz
gir1.2-arrow-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-gandiva-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-parquet-1.0_0.15.0~dev20190910-1_arm64.deb
libarrow15_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset15_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-flight15_0.15.0~dev20190910-1_arm64.deb
libarrow-flight-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib15_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-doc_0.15.0~dev20190910-1_all.deb
libarrow-python15_0.15.0~dev20190910-1_arm64.deb
libarrow-python-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva15_0.15.0~dev20190910-1_arm64.deb
libgandiva-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib15_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib-dev_0.15.0~dev20190910-1_arm64.deb
libgandiva-glib-doc_0.15.0~dev20190910-1_all.deb
libparquet15_0.15.0~dev20190910-1_arm64.deb
libparquet-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib15_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-doc_0.15.0~dev20190910-1_all.deb
./ubuntu/pool/xenial/universe/a/apache-arrow:
apache-arrow_0.15.0~dev20190910-1.debian.tar.xz
apache-arrow_0.15.0~dev20190910-1.dsc
apache-arrow_0.15.0~dev20190910.orig.tar.gz
gir1.2-arrow-1.0_0.15.0~dev20190910-1_arm64.deb
gir1.2-parquet-1.0_0.15.0~dev20190910-1_arm64.deb
libarrow15_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset15_0.15.0~dev20190910-1_arm64.deb
libarrow-dataset-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib15_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-dev_0.15.0~dev20190910-1_arm64.deb
libarrow-glib-doc_0.15.0~dev20190910-1_all.deb
libarrow-python15_0.15.0~dev20190910-1_arm64.deb
libarrow-python-dev_0.15.0~dev20190910-1_arm64.deb
libparquet15_0.15.0~dev20190910-1_arm64.deb
libparquet-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib15_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-dev_0.15.0~dev20190910-1_arm64.deb
libparquet-glib-doc_0.15.0~dev20190910-1_all.deb
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.
Can we use arm64v8/debian image on arm64 too?
Then we can use arm64v8/debian instead of debian for arm64.
If we use arm64v8/debian, we can use the same Dockerfile on amd64 and arm64. Then we can build .deb files for arm64 on Azure Pipelines.
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 can:
08:03 (1s) hrw@j13-qrep-04:repositories$ uname -a
Linux j13-qrep-04 4.19.0-5-arm64 #1 SMP Debian 4.19.37-5 (2019-06-19) aarch64 GNU/Linux
08:03 (1s) hrw@j13-qrep-04:repositories$ docker run --rm -it -u root arm64v8/debian:buster
Unable to find image 'arm64v8/debian:buster' locally
buster: Pulling from arm64v8/debian
ecfa071771e7: Pull complete
Digest: sha256:6b3715575add1050c27869d1c2ad907de4d1ab9fa3c01cf901f074181ef1071a
Status: Downloaded newer image for arm64v8/debian:buster
root@74363d13a449:/# uname -a
Linux 74363d13a449 4.19.0-5-arm64 #1 SMP Debian 4.19.37-5 (2019-06-19) aarch64 GNU/Linux
root@74363d13a449:/# exit
08:03 (5s) hrw@j13-qrep-04:repositories$
The thing is that when you do native builds do you not need special 'debian.stretch.arm64' thing.
As it turned out that there are no missing build dependencies can we just rename both pull request and Jira card to "add support for arm64 builds"? |
Really? I think that we need to add |
I did builds for 2 Debian releases and 4 Ubuntu releases on both amd64 and arm64 without a need to add 'ca-certificates' to build dependencies. Package was fetched as dependency of 'python3-pip' (disco, cosmic, bionic, buster, stretch) or 'libwww-perl' (xenial). |
|
OK. Then we can rename existing pull request and JIRA issue and reuse them. |
|
So, what's next? |
|
Would be nice to find a way to not duplicate them as the only change is "FROM". Will look at using "--build-arg" in 'docker build' calls to pass 'FROM'. Too bad that Docker lacks 'include' ;( |
|
My idea is to not create "*-arm64/Dockerfile" but rather pass "ARCH=arm64" to "rake apt" build and then in 'task-package.rb' add proper argument to Docker to change "FROM". Will take some time as I have to learn basics of Ruby. |
|
OK. I'll take over this. |
Gandiva and Plasma can be enabled separately so let use proper switch.
Debian 'stretch' got LLVM-7 in August 2019. Only Ubuntu 'xenial' lacks it now.
'nvidia-cuda-toolkit' is x86 only so install it only on x86 architectures. Also handle 'clang-7' for Ubuntu 'xenial'.
Documentation is architecture independent.
Mark CUDA, Plasma and Gandiva as x86 specific due to lack of LLVM7 for other architectures.
|
Thanks! Nice and clean solution :D |
|
@kou yes, tasks.yml and tests.yml were merged, so I've updated the Buildbot comment bot to closely align with crossbow's CLI. |
|
@kou for building docker images more conveniently we could use the docker build tool from ursabot. |
|
@kszucs Thanks for verifying ursabot usage! I understand. In this case, we didn't need the ursabot's Docker related feature. Because we can use a Docker's feature to change |
|
@ursabot crossbow submit -g linux |
|
AMD64 Conda Crossbow Submit (#63462) builder has been succeeded. Revision: eddc53f Submitted crossbow builds: ursa-labs/crossbow @ ursabot-202
|
|
I've finished all work. I'll merge this once all packages can be built. |
|
@ursabot crossbow submit --help |
|
|
Concern: arm64.deb build takes almost 5h except debian-stretch-arm64. debian-strech-arm64 takes almost 3h. We may want to stop nightly arm64 build. |
|
@kszucs One more question. Crossbow's default package version ( Can we specify package version from ursabot explicitly? We can specify package version explicitly on the local machine by |
kou
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.
+1
All green. I'll merge this.
|
Thanks! |
|
@kou sure, I've created an issue for that. We could also update crossbow to generate the version like rake does. |
|
@hrw Thanks for your work too! |
|
@kszucs Thanks! |
|
JIRA about unifying the version numbers: https://issues.apache.org/jira/browse/ARROW-6617 |
|
Now I can finish adding it to Linaro CI so our devs will get Debian packages :) |
Fetching Thrift fails without 'ca-certificates':
And build fails without 'meson' installed: