chore: update pkg-config and library configuration for ARM64 cross-compilation

Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
Chaos Rogers 2025-07-10 13:27:07 +01:00
parent 2a358be6b0
commit 22aa16bfbf

View file

@ -39,7 +39,9 @@ jobs:
sudo sed -i 's/^deb /deb [arch=amd64] /' /etc/apt/sources.list sudo sed -i 's/^deb /deb [arch=amd64] /' /etc/apt/sources.list
sudo apt-get update -y sudo apt-get update -y
# Install build tools and cross-compilation libraries for Raspberry Pi 5 # Install build tools and cross-compilation libraries for Raspberry Pi 5
sudo apt-get install -y gcc-aarch64-linux-gnu libudev-dev:arm64 cmake sudo apt-get install -y gcc-aarch64-linux-gnu libudev-dev:arm64 pkg-config cmake
# Ensure pkg-config can find ARM64 libraries
sudo apt-get install -y libpkgconf3:arm64
- name: Build release binary - name: Build release binary
run: cargo build --release --target ${{ env.RUST_TARGET }} run: cargo build --release --target ${{ env.RUST_TARGET }}
@ -51,6 +53,8 @@ jobs:
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/aarch64-linux-gnu/pkgconfig PKG_CONFIG_LIBDIR: /usr/lib/aarch64-linux-gnu/pkgconfig
PKG_CONFIG_SYSROOT_DIR: / PKG_CONFIG_SYSROOT_DIR: /
PKG_CONFIG_ALLOW_SYSTEM_LIBS: 1
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS: 1
# Add library path for the cross-compiler's linker # Add library path for the cross-compiler's linker
RUSTFLAGS: -L/usr/lib/aarch64-linux-gnu RUSTFLAGS: -L/usr/lib/aarch64-linux-gnu