gcc-10 backport to bionic needed for grub2

Bug #2015801 reported by Steve Langasek
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gcc-10 (Ubuntu)
Invalid
Undecided
Unassigned
Bionic
Triaged
High
Unassigned

Bug Description

grub2-unsigned is now being binary-copied from kinetic back to all stable series, in order to avoid re-signing the UEFI binaries multiple times for the same code changes.

Current grub2-unsigned build-depends on gcc-10. This package does not exist in bionic - but because the binaries were copied from a later series, this was not a build failure that blocked the grub2-unsigned binaries being published in bionic.

Nevertheless, we require that all packages be rebuildable from source using build-dependencies *within* the given series. So this is a bug that needs to be addressed.

There are two options: either we publish a separate source version of grub2-unsigned for bionic that rolls back the build-dependency on gcc-10; or, we publish gcc-10 to bionic as a non-default compiler that doesn't take over any of the binary packages from gcc-9 in that series (notably: libgcc).

Revision history for this message
Steve Langasek (vorlon) wrote :

I recall there being some reason why we cared about building grub with a newer toolchain, either because the newer toolchain is needed to have not-buggy output or because it is needed for grub to not drop features. But I don't know the details, so I've added Julian to the bug to provide that information.

Changed in gcc-10 (Ubuntu):
status: New → Invalid
Changed in gcc-10 (Ubuntu Bionic):
status: New → Triaged
importance: Undecided → High
tags: added: fr-4062
Revision history for this message
Julian Andres Klode (juliank) wrote :

You also cannot necessarily produce working binaries without the correct versions of binutils. Stuff fails with sections not being aligned and issues like that. Everything messy.

I do not think we are super interested in gcc-10 backporting right now, grub needs to move to gcc-12 soon anyhow, Debian already moved.

Starting with the opening of lunar+1, stable fwupd-efi, grub, shim releases will be built from lunar.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 2015801] Re: gcc-10 backport to bionic needed for grub2

On Tue, Apr 11, 2023 at 12:51:41PM -0000, Julian Andres Klode wrote:
> You also cannot necessarily produce working binaries without the correct
> versions of binutils. Stuff fails with sections not being aligned and
> issues like that. Everything messy.

> I do not think we are super interested in gcc-10 backporting right now,
> grub needs to move to gcc-12 soon anyhow, Debian already moved.

Why does it "need" to move to gcc-12? Details required.

I don't care if we wind up with gcc-10 or gcc-12 as the build-dependency, so
long as we have that build-dependency satisfied in our supported series.

> Starting with the opening of lunar+1, stable fwupd-efi, grub, shim
> releases will be built from lunar.

Sure. Doesn't change the overall requirements!

Revision history for this message
Julian Andres Klode (juliank) wrote :

Regarding the move to GCC 12, it's simply because gcc-10 is in the process of being dropped (at the very least in Debian), and at least Debian dropped the versioned dependency, so following that, we'd start building with GCC 12.

Revision history for this message
Steve Langasek (vorlon) wrote :

On Tue, Apr 11, 2023 at 08:29:37PM -0000, Julian Andres Klode wrote:
> Regarding the move to GCC 12, it's simply because gcc-10 is in the
> process of being dropped (at the very least in Debian), and at least
> Debian dropped the versioned dependency, so following that, we'd start
> building with GCC 12.

That is not an argument for also having to do the work to provide a newer
gcc in focal.

grub2-unsigned in Debian should thus build-depend on gcc (>= 10) | gcc-10 so
that the build-deps are satisfied in each series; and then we need to sort
out gcc-10 for bionic.

Revision history for this message
Alex Kompel (velocloud) wrote :

I would like to upvote this bug. Having broken source package in Bionic is less than ideal.

I am not sure there is a technical reason for grub2 to depend on gcc-10. Debian package follows build-deps from the target codeline so that's probably not a right argument here. For example,
grub 2.06 in Buster still depends on gcc-8: https://salsa.debian.org/grub-team/grub/-/blob/buster/debian/control

Bionic toolchain should be perfectly capable of compiling grub. I tried to build grub2-unsigned-2.06 on Bionic after dropping gcc-10 and fuse3 dependency. It builds, tests pass, and amd64 binaries appear to work on the live system. Please consider publishing grub2-unsigned with correct dependencies for the codeline regardless of how the binary packages are produced and published.

Revision history for this message
Alan Baghumian (alanbach) wrote :

I agree with Alex.

I was able to back port GCC-10.3 (Focal) as well as GCC-10.4 (Jammy) to Bionic with minor GCC dependency changes. Everything compiles, goes through all the tests and produces the packages.

Steve Langasek (vorlon)
tags: added: foundations-todo
Revision history for this message
Matthias Klose (doko) wrote :

if gcc-10 is packaged, it should be in the form of the gcc-snapshot or gcc-mozilla package. We don't want to have newer versions of the packages for all the runtime libraries. grub then should be built with -static-libgcc and -static-libstdc++ options.

Revision history for this message
Julian Andres Klode (juliank) wrote :

fwiw we do not ship userspace components, only EFI binaries, so we do not need libraries in any case.

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.