Skip to content

Commit

Permalink
Fix: Cross-compile OpenSSL issues
Browse files Browse the repository at this point in the history
This commit fixes issues with cross-compiling for aarch64 by:

- Installing `pkg-config` and `libssl-dev` for the host architecture.
- Adding a check
  • Loading branch information
suenot committed Jan 24, 2025
1 parent a5792ef commit b39fda7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,23 @@ jobs:
sudo apt-get install -y libc6-dev-arm64-cross
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install -y libssl-dev:arm64
sudo apt-get install -y libssl-dev:arm64 libssl-dev pkg-config
else
sudo apt-get install -y libssl-dev
fi
- name: Check OpenSSL
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
dpkg -l | grep libssl
ls -l /usr/lib/aarch64-linux-gnu/libssl*
- name: Build
run: cargo build --release --target ${{ matrix.target }}
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
PKG_CONFIG_ALLOW_CROSS: 1
OPENSSL_DIR: ${{ matrix.target == 'aarch64-unknown-linux-gnu' && '/usr/lib/aarch64-linux-gnu' || '/usr' }}
OPENSSL_DIR: /usr
OPENSSL_INCLUDE_DIR: /usr/include
OPENSSL_LIB_DIR: ${{ matrix.target == 'aarch64-unknown-linux-gnu' && '/usr/lib/aarch64-linux-gnu' || '/usr/lib/x86_64-linux-gnu' }}

Expand Down

0 comments on commit b39fda7

Please sign in to comment.