-
Notifications
You must be signed in to change notification settings - Fork 753
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: Fix aarch64 cross build #3353
Conversation
Signed-off-by: Xuanwo <github@xuanwo.io>
Thanks for the contribution! Please review the labels and make any necessary changes. |
1 similar comment
Thanks for the contribution! Please review the labels and make any necessary changes. |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/databend/databend/3U3pYUteRGV5mADJ5Qiqq2Pn6J6W |
This PR will fix build error in #3344. |
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.
LGTM
Wait for another reviewer approval |
Signed-off-by: Xuanwo github@xuanwo.io
I hereby agree to the terms of the CLA available at: https://databend.rs/policies/cla/
Summary
This PR fixed aarch64 cross-build support.
And this PR will remove not well maintained target support including:
armv7-unknown-linux-gnueabihf
arm-unknown-linux-gnueabi
No one really uses them and they are not covered by CI.
Let's add them back until we are ready to maintain them.
NOTICE: After this PR get merged, we need to push the built image to dockerhub.
Detailed explain
The original
rustembedded/cross:aarch64-unknown-linux-gnu
image doesn't have lib we need, socross build --target aarch64-unknown-linux-gnu
will meet errros like:In the past, we fixed this problem via self-compiled openssol with hardcoded
OPENSSL_DIR
and other envs.However, it's not enough. We will meet other problems like the following:
The real problem here is we
pkg-config
doesn't have current path.So we only need to set the
PKG_CONFIG_PATH
correctly like the following:ENV PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH
And we can add new packages like:
RUN dpkg --add-architecture arm64 && \ apt-get update && \ apt-get install --assume-yes libssl-dev zlib1g-dev
The simple, perfect solution.
Changelog