Skip to content

Cross-compile binaries for aarch64-unknown-linux-gnu (alternative) #173

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

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

malor
Copy link
Member

@malor malor commented Nov 24, 2024

GitHub does not provide a aarch64-unknown-linux-gnu runner that we would need to compile binaries for Raspberry Pi, but we can use cross to build those on the amd64 Ubuntu runner.

[build]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH libpq-dev:$CROSS_DEB_ARCH"
Copy link
Member

Choose a reason for hiding this comment

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

Just curious, does it mean that cross compilation doesn't work on Windows/macOS?

Copy link
Member Author

Choose a reason for hiding this comment

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

cross creates a Docker container behind the scenes, so, I think, it could work.

GitHub does not provide a aarch64-unknown-linux-gnu runner that
we would need to compile binaries for Raspberry Pi, but we can
use `cross` to build those on the amd64 Ubuntu runner.
@malor malor merged commit 4e0c11a into master Nov 24, 2024
8 checks passed
@malor malor deleted the cross2 branch November 24, 2024 22:18
malor added a commit that referenced this pull request Nov 24, 2024
#173 had a couple of issues:

* String regex test in Bash requires [[ ]] instead of [ ]
* JSON output in rustc is only available when the nightly toolchain is
  installed. Instead, we can form the target value manually
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants