Skip to content

Commit 0bc083a

Browse files
committed
fix: Add ARM64 SQLite library for cross-compilation
- Enable multiarch support with dpkg --add-architecture arm64 - Install libsqlite3-dev:arm64 for cross-compilation - Set PKG_CONFIG_PATH to ARM64 pkgconfig directory This fixes the linker error when cross-compiling ARM64 binaries with dynamic SQLite linking.
1 parent e73b1a9 commit 0bc083a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/artifacts.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ jobs:
5555
- name: Install build dependencies (Linux arm64)
5656
if: matrix.goos == 'linux' && matrix.goarch == 'arm64'
5757
run: |
58+
sudo dpkg --add-architecture arm64
5859
sudo apt-get update
59-
sudo apt-get install -y gcc-aarch64-linux-gnu libsqlite3-dev
60+
sudo apt-get install -y gcc-aarch64-linux-gnu libsqlite3-dev:arm64
6061
6162
- name: Get version info
6263
id: version
@@ -74,6 +75,7 @@ jobs:
7475
GOOS: ${{ matrix.goos }}
7576
GOARCH: ${{ matrix.goarch }}
7677
CC: ${{ matrix.goarch == 'arm64' && matrix.goos == 'linux' && 'aarch64-linux-gnu-gcc' || '' }}
78+
PKG_CONFIG_PATH: ${{ matrix.goarch == 'arm64' && matrix.goos == 'linux' && '/usr/lib/aarch64-linux-gnu/pkgconfig' || '' }}
7779
run: |
7880
go build -tags libsqlite3 -ldflags "-w -s -X github.com/inference-gateway/cli/cmd.version=${{ steps.version.outputs.version }} -X github.com/inference-gateway/cli/cmd.commit=${{ steps.version.outputs.commit }} -X github.com/inference-gateway/cli/cmd.date=${{ steps.version.outputs.date }}" -o infer-${{ matrix.goos }}-${{ matrix.goarch }} .
7981

0 commit comments

Comments
 (0)