Skip to content

Commit 5b08da6

Browse files
authored
Fix libelf detection in the 32 bit Linux CI build (#592)
1 parent 557b074 commit 5b08da6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,18 @@ jobs:
9999
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 20
100100
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
101101
sudo update-alternatives --set cc /usr/bin/gcc
102+
# Adding the i386 architecture above makes apt remove 206 amd64
103+
# packages, pkgconf among them. Without pkg-config, Makefile.common
104+
# does not find libelf, HAVE_LIBELF stays undefined, and the binary
105+
# cannot load any firmware.
106+
sudo apt-get install -y pkg-config
102107
- name: CI-Build
103108
run: |
109+
# libelf-dev:i386 puts libelf.pc under /usr/lib/i386-linux-gnu,
110+
# where pkg-config does not look by default. Without this,
111+
# HAVE_LIBELF stays undefined and the 32 bit binary answers
112+
# "ELF format is not supported by this build" for every firmware.
113+
export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig
104114
make V=1 RELEASE=1
105115
mkdir simavr_installed
106116
make install RELEASE=1 DESTDIR=$(pwd)/simavr_installed/

0 commit comments

Comments
 (0)