autotools plugin fails to build in classic confinement

Bug #1817300 reported by Konstantinos Tsakalozos
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Status tracked in Trunk
Legacy
Fix Committed
Critical
Sergio Schvezov
Trunk
Fix Released
Critical
Sergio Schvezov

Bug Description

How to reproduce:

Get the dosbox snapcraft.yaml from the official docs https://docs.snapcraft.io/c-c-applications/7817 and replace the confinement with "grade: stable" and "confinement: classic". Try then to build with "snapcraft cleanbuild"

The error you will get is:

checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/root/build_dosbox/parts/dosbox/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
Failed to run './configure --prefix=' for 'dosbox': Exited with code 77.
Verify that the part is using the correct parameters and try again.
Error: not found

This bug is blocking MicroK8s from building.

Thank you.

Revision history for this message
Konstantinos Tsakalozos (kos.tsakalozos) wrote :
no longer affects: microk8s
Revision history for this message
Konstantinos Tsakalozos (kos.tsakalozos) wrote :

The config.log showing gcc throwing a seg fault.

Revision history for this message
Evan (ev) wrote :

snapcraft-dosbox # snapcraft
Skipping pull dosbox (already ran)
Building dosbox
./configure --prefix=
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... Segmentation fault (core dumped)
no
checking whether make supports nested variables... Segmentation fault (core dumped)
no
checking whether make sets $(MAKE)... (cached) no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/root/parts/dosbox/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
Failed to run './configure --prefix=' for 'dosbox': Exited with code 77.
Verify that the part is using the correct parameters and try again.
snapcraft-dosbox # cd parts/dosbox/build/
snapcraft-dosbox ../parts/dosbox/build# ./configure --prefix= ; echo $?

0

Changed in snapcraft:
status: New → Confirmed
Revision history for this message
Joseph Wakeling (webdrake) wrote :

I wonder if the same underlying issue is responsible for the problems I'm having with a `cmake` build inside LXD containers:
https://forum.snapcraft.io/t/repeated-cmake-failures-in-snapcraft-cleanbuild/10104

It sounds like both may have a common problem in being able to write output files inside the LXD container used by cleanbuild ... ?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Looking into now.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

The root cause for this is the same root cause for why snapcraft has started to fail to build snapcraft and is related to an old implementation we had in our original snapcraft where we set LD_LIBRARY_PATHs into the core snap, this is broken since last wednesday due to a libc6 update on xenial.

It is clear that the snapcraft implementation that is left over is wrong, and it is unfortunate that an update to libc6 would break this way, but there is this saying that weird things can happen when mixing libc6 and this is the effect we get to see.

There is a workaround for this if in a hurry, if not, a fix will come soon.

Changed in snapcraft:
status: Confirmed → Triaged
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
milestone: none → 3.2
assignee: nobody → Sergio Schvezov (sergiusens)
importance: Undecided → Critical
Revision history for this message
Joseph Wakeling (webdrake) wrote :

For clarity: does this fix apply to both the automake and cmake failures? Or is the latter likely to be something else?

What's the short term workaround, just in case?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

There is no generic workaround, only specific ones for which I would need precise details on how the build takes place, the gist of it is to override the use of the include paths to core through the plugin/part options overriding what snapcraft constructs.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

launchpad should be building fine with no changes within the hours.

Revision history for this message
Evan (ev) wrote :
Revision history for this message
Evan (ev) wrote :
Revision history for this message
Konstantinos Tsakalozos (kos.tsakalozos) wrote :

Do we have an eta for this?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Here's more information https://forum.snapcraft.io/t/psa-classic-confinement-and-core-snapcraft-issue/10149

ETA for the snap should be tomorrow, why the release was slow is presented in the forum post.

Revision history for this message
Mario Limonciello (superm1) wrote :

Is this actually in snap stable tomorrow? I tried to revert to CircleCI's cibuilds/snapcraft:stable but it's still not working (i'm tracking edge right now for CI).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.