Skip to content

Fix libelf detection in the 32 bit Linux CI build - #592

Merged
gatk555 merged 1 commit into
buserror:masterfrom
felias-fogg:fix-lin32-libelf
Oct 13, 2026
Merged

gatk555 merged 1 commit into
buserror:masterfrom
felias-fogg:fix-lin32-libelf

Conversation

@felias-fogg

Copy link
Copy Markdown
Contributor

The 32 bit Linux build has no ELF support, so the binary it produces cannot load any firmware at all:

$ simavr -m atmega328p -f 16000000 smoke.elf
ELF format is not supported by this build.
simavr: Unable to load firmware from file smoke.elf

The reason is in the Install Dependencies step of build-lin32. Adding the i386 architecture makes apt remove 206 amd64 packages to resolve the dependencies, and pkgconf is one of them. Makefile.common detects libelf with pkg-config, so from then on HAVE_LIBELF stays undefined and sim_elf.c compiles to the stub that prints the message above.

It went unnoticed, as far as I can tell, because build-lin32 is the only job without make run_tests. I have the fix running green in my fork, where I load a small firmware after each build as a smoke test, on all eight platforms.

@gatk555

gatk555 commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Looks good apart from the commit comment: "CI comments in English". Can you make it the same as the PR description and force-push? Or I can do it while merging.

Thanks, G

@felias-fogg

Copy link
Copy Markdown
Contributor Author

Looks good apart from the commit comment: "CI comments in English". Can you make it the same as the PR description and force-push? Or I can do it while merging.

Thanks, G

Done.

Cheers,
Bernhard

@gatk555
gatk555 merged commit 5b08da6 into buserror:master Oct 13, 2026
8 checks passed
@gatk555

gatk555 commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Perhaps irrelevant now but about: "The 32 bit Linux build has no ELF support, so the binary it produces cannot load any firmware at all:". Hex firmware files should have still worked. You just have to ask Make for the hex ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants