This package currently fails to build (at least on the amd64
architecture) with link time optimizations enabled. For a background
for LTO please see
https://wiki.debian.org/ToolChain/LTO
The goal is to enable this optimization by default in an upcoming
Debian release in dpkg-buildflags for 64bit architectures. The goal
is to get this package to build with link time optimizations, or to
explicitly disable link time optimizations for this package build.
To reproduce the build failure, enable the lto optimization in
testing/unstable by adding "optimize=+lto" to DEB_BUILD_MAINT_OPTIONS
in the debian/rules file, or if this macro is unset, just set it:
export DEB_BUILD_MAINT_OPTIONS = optimize=+lto
Please try to fix the build with lto enabled, fixing the packaging or
forwarding the issue upstream. If the issue cannot be fixed,
explicitly disallow building the package with lto by adding to your
rules file:
export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
or adding that string to your existing setting of DEB_BUILD_MAINT_OPTIONS.
The full build log can be found at:
http://qa-logs.debian.net/2022/06/09/dpkglto/qemu_7.0+dfsg-7_unstable_dpkglto.log
The last lines of the build log are at the end of this report.
[...]
objcopy -O binary -j .text pvh.img pvh.raw
python3 /<<PKGBUILDDIR>>/scripts/signrom.py pvh.raw pvh.bin
rm linuxboot_dma.img multiboot_dma.o linuxboot_dma.o kvmvapic.img multiboot.raw pvh.raw multiboot.o multiboot_dma.raw linuxboot_dma.raw kvmvapic.o linuxboot.img linuxboot.o kvmvapic.raw linuxboot.raw multiboot.img multiboot_dma.img
make[3]: Leaving directory '/<<PKGBUILDDIR>>/b/optionrom'
touch b/optionrom/built
mkdir -p b/sgabios
cc -c -o b/sgabios/sgabios.o roms/sgabios/sgabios.S -Wall -Os -m32 -nostdlib \
-DBUILD_DATE="\"$(LC_ALL=C date -u -r roms/sgabios/sgabios.S)\"" \
-DBUILD_SHORT_DATE="\"$(date -u +%D -r roms/sgabios/sgabios.S)\"" \
-DBUILD_HOST=\"debian\" -DBUILD_USER=\"build\"
ld -T roms/sgabios/rom16.ld -nostdlib b/sgabios/sgabios.o -o b/sgabios/sgabios.elf
objcopy -O binary b/sgabios/sgabios.elf b/sgabios/sgabios.bin
cc -Wall -O2 -o b/sgabios/csum8 roms/sgabios/csum8.c
b/sgabios/csum8 b/sgabios/sgabios.bin
b/sgabios/sgabios.bin: sum = 0xfd, wrote byte 0x03
rm -rf b/qboot
meson setup roms/qboot b/qboot
The Meson build system
Version: 0.62.2
Source dir: /<<PKGBUILDDIR>>/roms/qboot
Build dir: /<<PKGBUILDDIR>>/b/qboot
Build type: native build
Project name: qboot
Project version: undefined
C compiler for the host machine: cc (gcc 11.3.0 "cc (Debian 11.3.0-3) 11.3.0")
C linker for the host machine: cc ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program objcopy found: YES (/usr/bin/objcopy)
Compiler for C supports link arguments -Wl,--build-id=none: YES
Compiler for C supports link arguments -no-pie: YES
Build targets in project: 2
Found ninja-1.11.0 at /usr/bin/ninja
ninja -C b/qboot
ninja: Entering directory `b/qboot'
[1/17] Compiling C object bios.bin.elf.p/entry.S.o
[2/17] Compiling C object bios.bin.elf.p/cstart.S.o
[3/17] Compiling C object bios.bin.elf.p/code16.c.o
[4/17] Compiling C object bios.bin.elf.p/malloc.c.o
[5/17] Compiling C object bios.bin.elf.p/code32seg.c.o
[6/17] Compiling C object bios.bin.elf.p/linuxboot.c.o
[7/17] Compiling C object bios.bin.elf.p/mptable.c.o
[8/17] Compiling C object bios.bin.elf.p/hwsetup.c.o
[9/17] Compiling C object bios.bin.elf.p/main.c.o
[10/17] Compiling C object bios.bin.elf.p/smbios.c.o
[11/17] Compiling C object bios.bin.elf.p/pci.c.o
[12/17] Compiling C object bios.bin.elf.p/string.c.o
[13/17] Compiling C object bios.bin.elf.p/tables.c.o
[14/17] Compiling C object bios.bin.elf.p/printf.c.o
[15/17] Compiling C object bios.bin.elf.p/fw_cfg.c.o
[16/17] Linking target bios.bin.elf
FAILED: bios.bin.elf
cc -o bios.bin.elf bios.bin.elf.p/code16.c.o bios.bin.elf.p/code32seg.c.o bios.bin.elf.p/cstart.S.o bios.bin.elf.p/entry.S.o bios.bin.elf.p/fw_cfg.c.o bios.bin.elf.p/hwsetup.c.o bios.bin.elf.p/linuxboot.c.o bios.bin.elf.p/main.c.o bios.bin.elf.p/malloc.c.o bios.bin.elf.p/mptable.c.o bios.bin.elf.p/pci.c.o bios.bin.elf.p/printf.c.o bios.bin.elf.p/string.c.o bios.bin.elf.p/smbios.c.o bios.bin.elf.p/tables.c.o -Wl,--as-needed -Wl,--no-undefined -flto=auto -ffat-lto-objects -Wl,-z,relro -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -nostdlib -m32 -Wl,--build-id=none -Wl,-T/<<PKGBUILDDIR>>/roms/qboot/flat.lds -no-pie
../../roms/qboot/code16.c: Assembler messages:
../../roms/qboot/code16.c:37: Error: redundant addr32 prefix
../../roms/qboot/code16.c:27: Error: redundant addr32 prefix
../../roms/qboot/code16.c:18: Error: redundant addr32 prefix
make[3]: *** [/tmp/cco3YDMk.mk:2: /tmp/cctxX9kV.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make[2]: *** [debian/rules:538: b/qboot/bios.bin] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules:646: install] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:646: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2