From a4728945ae5f4449c7147017e1eb8538c6d3b9db Mon Sep 17 00:00:00 2001 From: Bernhard Nebel Date: Sat, 10 Oct 2026 18:02:15 +0200 Subject: [PATCH] Fix libelf detection in the 32 bit Linux CI build --- .github/workflows/build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6945cee86..ff2ceb8b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,8 +99,18 @@ jobs: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 20 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 sudo update-alternatives --set cc /usr/bin/gcc + # Adding the i386 architecture above makes apt remove 206 amd64 + # packages, pkgconf among them. Without pkg-config, Makefile.common + # does not find libelf, HAVE_LIBELF stays undefined, and the binary + # cannot load any firmware. + sudo apt-get install -y pkg-config - name: CI-Build run: | + # libelf-dev:i386 puts libelf.pc under /usr/lib/i386-linux-gnu, + # where pkg-config does not look by default. Without this, + # HAVE_LIBELF stays undefined and the 32 bit binary answers + # "ELF format is not supported by this build" for every firmware. + export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig make V=1 RELEASE=1 mkdir simavr_installed make install RELEASE=1 DESTDIR=$(pwd)/simavr_installed/