-
Notifications
You must be signed in to change notification settings - Fork 100
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
Build linux-arm64v8 with Ubuntu Bionic #86
Conversation
software-properties-common \ | ||
&& \ | ||
curl https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \ | ||
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && \ |
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.
The latest CMake
version is necessary to build aom
for make install/strip
Konnichiwa, thank you for the PR. I note this is still a WIP - have you been able to successfully use gcc 8.4.0 running on x64 to cross-compile a libvips binary that passes all the sharp unit tests when run natively on ARM64? (I'm currently in the process of securing dedicated ARM64 hardware to help verify this kind of thing as part of the CI process.) |
こんにちは (Konnichiwa) Thanks for replying. Unfortunately, I did not succeed in compiling After creating this pull request, instead of using amd64 based Docker image, I've tried to use the arm64v8 based image, and succeeded in compiling both You can see the branch from the following URL. I'm currently not sure how to perform the sharp unit tests for the build artifact in my macOS environment. |
My original comment about 8.4.0 was only a guess, so I've done some digging through the gcc changelog and found the commit that I believe fixes the problem - see gcc-mirror/gcc@44a7251 - this was first made available in gcc 9.1.0 and was not backported any further, so sadly I don't think the use of gcc 8 will help us. |
I'll close this for now as sadly I don't think this approach will get us the gcc 9 we need. Thank you very much for the PR, and if you or anyone else finds a way to easily solve this, please do feel free to open another PR or issue to discuss. |
As you know, the Arm64 based Node.js official Docker image is built with Debian 10 buster, or 9 stretch whose glibc versions are less than 2.29, so it is hard to use the pre-built sharp npm package in these environments.
According to lovell/sharp#1651 and 2e4202d discussion, gcc 8.2.0 has a bug, but 9.x doesn't, and gcc 8.4.0 seems to have fixed it.
Ubuntu 18.04 Bionic provides the gcc 8.4 through
g++-8-aarch64-linux-gnu
package, and I’ve tried to build it with my M1 MacBook Pro. Though it failed to build thelibsvg
with the rust error, I suppose it can be done with the Intel machine, because the error is the same one discussed in rust-lang/rust#80346, so at this time I’d like to discuss the possibility of this approach.Unfortunately, since Ubuntu 16.04 Xenial doesn’t have the
g++-8-aarch64-linux-gnu
package, the minimum glibc version would be 2.27, and Debian 9 stretch cannot be supported.