Autotools parts not building correctly

I have recently updated the contents of the configure.ac file. As a consequence, builds on snapcraft are failing because the wrong Makefile is being generated. This is the logs of one of the failing builds

https://snapcraft.io/austin/builds/1656956

The project is hosted on GitHub and there are released assets that are generated using autotools. There the process works as expected:

The issue is that some of the linker flags are not substituted by the snapcraft’s autotools leading to undefined symbols (you can search for l:libunwind), whereas they are correctly substituted in the GitHub Actions workflows.

I have tried running the same commands that snapcraft seems to execute as port of the autotools plugin locally

autoreconf -i
./configure --prefix=
make -j4

but those also work as expected (I’m using 20.04).

Hi,

You aren’t specifying a base for your snap, so it will be built for core based on Ubuntu 16.04. I suspect you’re using autotools commands that are unsupported in the version autotools available in Ubuntu 16.04. You likely need to update your snapcraft.yaml to include base: core18 or base: core20 to bring the snap to either be based upon Ubuntu 18.04 or 20.04 respectively, which will bring with it the versions of autotools shipped in whichever release you settle upon.

1 Like

Oh right, I didn’t realise 16.04 was still being used! I’ve added base: core20 and that fixed the problem!

Thanks for the help, @lucyllewy!

1 Like