ipxe-qemu-256k-compat ftbfs in focal

Bug #1870061 reported by Matthias Klose
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ipxe-qemu-256k-compat (Ubuntu)
Low
Unassigned
Focal
Low
Unassigned

Bug Description

seen in the second focal test rebuild
https://launchpadlibrarian.net/471776606/buildlog_ubuntu-focal-amd64.ipxe-qemu-256k-compat_1.0.0+git-20150424.a25a16d-0ubuntu3_BUILDING.txt.gz

ar: creating bin-x86_64-efi/blib.a
util/elf2efi.c: In function ‘process_section’:
util/elf2efi.c:337:24: warning: implicit declaration of function ‘bfd_get_section_flags’; did you mean ‘bfd_set_section_flags’? [-Wimplicit-function-declaration]
  337 | unsigned long flags = bfd_get_section_flags ( bfd, section );
      | ^~~~~~~~~~~~~~~~~~~~~
      | bfd_set_section_flags
util/elf2efi.c:362:37: warning: passing argument 1 of ‘bfd_section_size’ from incompatible pointer type [-Wincompatible-pointer-types]
  362 | section_memsz = bfd_section_size ( bfd, section );
      | ^~~
      | |
      | bfd * {aka struct bfd *}
In file included from util/elf2efi.c:32:
/usr/include/bfd.h:1206:35: note: expected ‘const asection *’ {aka ‘const struct bfd_section *’} but argument is of type ‘bfd *’ {aka ‘struct bfd *’}
 1206 | bfd_section_size (const asection *sec)
      | ~~~~~~~~~~~~~~~~^~~
util/elf2efi.c:362:18: error: too many arguments to function ‘bfd_section_size’
  362 | section_memsz = bfd_section_size ( bfd, section );
      | ^~~~~~~~~~~~~~~~
In file included from util/elf2efi.c:32:
/usr/include/bfd.h:1206:1: note: declared here
 1206 | bfd_section_size (const asection *sec)
      | ^~~~~~~~~~~~~~~~
util/elf2efi.c:372:28: warning: implicit declaration of function ‘bfd_get_section_vma’; did you mean ‘bfd_set_section_vma’? [-Wimplicit-function-declaration]
  372 | new->hdr.VirtualAddress = bfd_get_section_vma ( bfd, section );
      | ^~~~~~~~~~~~~~~~~~~
      | bfd_set_section_vma
make[2]: *** [Makefile.housekeeping:1314: util/elf2efi64] Error 1
make[2]: *** Waiting for unfinished jobs....
ranlib bin-x86_64-efi/blib.a
rm bin-x86_64-efi/version.82540em.efidrv.o
make[2]: Leaving directory '/<<BUILDDIR>>/ipxe-qemu-256k-compat-1.0.0+git-20150424.a25a16d/src'
dh_auto_build: error: cd src && make -j4 V=1 NO_WERROR=1 VERSION=1.0.0\+git-20150424.a25a16d-0ubuntu3 bin-x86_64-efi/82540em.efirom returned exit code 2
make[1]: *** [debian/rules:18: src/bin-x86_64-efi/82540em.efirom] Error 25

Matthias Klose (doko)
Changed in ipxe-qemu-256k-compat (Ubuntu):
status: New → Confirmed
importance: Undecided → High
tags: added: ftbfs rls-ff-incoming
Revision history for this message
Paride Legovini (paride) wrote :

We are using a rather old upstream snapshot of ipxe: commit a25a16d dates back to April 2015. I guess this is because upstream didn't tag any release between 2010 and January 2, 2020, when version v1.20.1 was tagged.

The FTBFS does not happen with the latest upstream version, as the use of bfd has been dropped in 2016 by this commit:

https://github.com/ipxe/ipxe/commit/efd5cf9aadcaf36f45db5d1c3059197a8479567c

While that's the commit fixing (actually, removing) the issue, I would not consider this "patch on a table" scenario, as at that point the codebase already diverged significantly from what we have in Ubuntu, plus it's difficult to tell what the code status was at that arbitrary point of the commit history.

It would be nice to ship v1.20.1 in Focal, but we are late in the cycle. The attached patch fixes the issue according to:

https://wiki.gentoo.org/wiki/Binutils_2.34_porting_notes/undefined_reference_to_bfd_get_section_*

Changed in ipxe-qemu-256k-compat (Ubuntu):
status: Confirmed → Triaged
tags: added: server-next
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ixpe.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi paride,
things aren't as bad as you think :-)

ipxe-qemu-256k-compat-efi-roms is an intended old artifact only needed for compatibility for pre-bionic upgraders. We will have to carry it as-is for now (and quite a while).

But the actual source for the real (not the compat) thing is much much newer.
ipxe-qemu | 1.0.0+git-20190109.133f4c4-0ubuntu3
That is 4 years up from what you looked at :-)

The new ipxe code was still failing in January so for Focal we focussed on stability and only added selected changes for some new features (see changelog). I guess in 20.10 we will pick up the (now working) new version along a new qemu.

Any CVE will need the users to restart their guests to pickup the new ROMs anyway.
While at that they can bump the machine-type and get the new roms.
This is generally recommended but not enforced.
=> https://wiki.ubuntu.com/QemuKVMMigration#Upgrade_machine_type
Due to this somewhat special case the FTBFS in this is of a very low prio, and not needed for Focal IMHO (there is enough going on right now).

I'm ok to sponsor it into early 20.10 and if anyone (unlikely) ever wants/needs it in Focal he can use the change in this bug along the upload he had in mind.

Changed in ipxe-qemu-256k-compat (Ubuntu Focal):
importance: High → Low
tags: removed: rls-ff-incoming server-next
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

If anyone is doing an upload sooner please triple ensure that migrations from pre-bionic still work.
Especially the size of the rom is not allowed to change compared to older builds or things will break.

Revision history for this message
Paride Legovini (paride) wrote :

Very good to know it is not as bad as I thought. I did lack most of the background information about this package, thanks for explaining.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ipxe-qemu-256k-compat - 1.0.0+git-20150424.a25a16d-0ubuntu4

---------------
ipxe-qemu-256k-compat (1.0.0+git-20150424.a25a16d-0ubuntu4) focal; urgency=medium

  * Fix build with binutils 2.34 (Paride Legovini). LP: #1870061.

 -- Matthias Klose <email address hidden> Wed, 08 Apr 2020 11:25:01 +0200

Changed in ipxe-qemu-256k-compat (Ubuntu Focal):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers