#994274 syslinux: FTBFS with gnu-efi 3.0.13

Package:
src:syslinux
Source:
syslinux
Submitter:
Lukas Schwaighofer
Date:
2025-04-13 12:45:01 UTC
Severity:
serious
Tags:
#994274#5
Date:
2021-09-14 22:34:53 UTC
From:
To:
With the new version of gnu-efi that was recently uploaded [1] to
unstable, syslinux fails to build from source.

So far I tried applying a simple fix from the upstream mailing list [2]
which result in a successful build, but the efi binaries from that
build are unbootable.


[1] https://tracker.debian.org/news/1257850/accepted-gnu-efi-3013git20210716269ef9d-2-source-into-unstable/
[2] https://www.syslinux.org/archives/2020-March/026621.html

#994274#12
Date:
2022-10-16 09:20:37 UTC
From:
To:
It looks like Ubuntu added a patch to fix this slightly differently
(adding <setjmp.h> to efi/main.c instead of adding <efisetjmp.h>[1]).
With that it compiles as well. I don't quite understand the reference
to glibc in the changelog[2], though. This is reusing syslinux's
internal setjmp logic copied from klibc while gnu-efi rolled its own.
It's also possible that by including the "wrong" header you get the
wrong linkage against the wrong implementation.

Could you try this out? Apparently I cannot test this within qemu OVMF
(per [3] and it also didn't boot for me).

Kind regards
Philipp Kern

[1] http://launchpadlibrarian.net/553034379/syslinux_3%3A6.04~git20190206.bf6db5b4+dfsg1-3_3%3A6.04~git20190206.bf6db5b4+dfsg1-3ubuntu1.diff.gz
[2] https://launchpad.net/ubuntu/+source/syslinux/3:6.04~git20190206.bf6db5b4+dfsg1-3ubuntu1
[3] https://wiki.archlinux.org/title/syslinux#Limitations_of_UEFI_Syslinux

#994274#17
Date:
2022-10-16 09:20:37 UTC
From:
To:
It looks like Ubuntu added a patch to fix this slightly differently
(adding <setjmp.h> to efi/main.c instead of adding <efisetjmp.h>[1]).
With that it compiles as well. I don't quite understand the reference
to glibc in the changelog[2], though. This is reusing syslinux's
internal setjmp logic copied from klibc while gnu-efi rolled its own.
It's also possible that by including the "wrong" header you get the
wrong linkage against the wrong implementation.

Could you try this out? Apparently I cannot test this within qemu OVMF
(per [3] and it also didn't boot for me).

Kind regards
Philipp Kern

[1] http://launchpadlibrarian.net/553034379/syslinux_3%3A6.04~git20190206.bf6db5b4+dfsg1-3_3%3A6.04~git20190206.bf6db5b4+dfsg1-3ubuntu1.diff.gz
[2] https://launchpad.net/ubuntu/+source/syslinux/3:6.04~git20190206.bf6db5b4+dfsg1-3ubuntu1
[3] https://wiki.archlinux.org/title/syslinux#Limitations_of_UEFI_Syslinux

#994274#22
Date:
2022-10-17 19:21:01 UTC
From:
To:
Hi Philipp,

thanks for the pointers, I'll try to test the alternative patch you've
suggested within the week.

Interesting – this is how I tested syslinux efi builds in the past.
When filing this bug I was able to successfully boot with OVMF using
the builds currently installed in the archives, but not with the
freshly built versions.

Regards
Lukas

#994274#27
Date:
2023-02-12 21:48:59 UTC
From:
To:
Hi,

I was just bisecting this and noticed that EFI booting stops working if I
simply rebuild both syslinux 3:6.04~git20190206.bf6db5b4+dfsg1-3 and
gnu-efi 3.0.9-2.

If I rebuild only syslinux but use the gnu-efi package from the archive I can boot
successfully. This seems to indicate the that the boot issue is not
related to the new gnu-efi version but something different, possibly a
change in the toolchain.

#994274#30
Date:
2023-02-12 21:48:59 UTC
From:
To:
Hi,

I was just bisecting this and noticed that EFI booting stops working if I
simply rebuild both syslinux 3:6.04~git20190206.bf6db5b4+dfsg1-3 and
gnu-efi 3.0.9-2.

If I rebuild only syslinux but use the gnu-efi package from the archive I can boot
successfully. This seems to indicate the that the boot issue is not
related to the new gnu-efi version but something different, possibly a
change in the toolchain.

#994274#35
Date:
2023-02-12 22:07:06 UTC
From:
To:
Hi,

here are the bisect results:


# debbisect --cache cache -v --depends e2fslibs-dev,nasm,python3,uuid-dev,gnu-efi,debhelper-compat,binutils,gcc-multilib,build-essential 2020-02-01 2022-12-31 ./script.sh
good timestamp 2020-02-01 00:00:00+02:00 was remapped to snapshot.d.o timestamp 2020-01-31 21:17:03+00:00
bad timestamp 2022-12-31 00:00:00+02:00 was remapped to snapshot.d.o timestamp 2022-12-30 15:17:41+00:00
INFO:root:using cache directory: cache
snapshot timestamp difference: 1063.750440 days
approximately 14 steps left to test
#1: using cached results from debbisect.20200131T211703Z.log.good
computation time left: 0:00:00.001066
approximately 13 steps left to test
#2: using cached results from debbisect.20221230T151741Z.log.bad
snapshot timestamp difference: 1063.750440 days
computation time left: 0:00:01.426242
approximately 12 steps left to test
#3: using cached result (was good) from debbisect.20210716T091727Z.log.good
snapshot timestamp difference: 532.250162 days
computation time left: 0:00:01.436556
approximately 11 steps left to test
#4: using cached result (was good) from debbisect.20220408T091859Z.log.good
snapshot timestamp difference: 266.249097 days
computation time left: 0:00:01.549000
approximately 10 steps left to test
#5: using cached result (was bad) from debbisect.20220818T100320Z.log.bad
snapshot timestamp difference: 132.030799 days
computation time left: 0:00:01.393391
approximately 9 steps left to test
#6: using cached result (was good) from debbisect.20220613T085403Z.log.good
snapshot timestamp difference: 66.048113 days
computation time left: 0:00:01.362789
approximately 8 steps left to test
#7: using cached result (was good) from debbisect.20220716T092224Z.log.good
snapshot timestamp difference: 33.028426 days
computation time left: 0:00:01.257209
approximately 7 steps left to test
#8: using cached result (was bad) from debbisect.20220801T205040Z.log.bad
snapshot timestamp difference: 16.477963 days
computation time left: 0:00:01.060509
approximately 6 steps left to test
#9: using cached result (was bad) from debbisect.20220724T092241Z.log.bad
snapshot timestamp difference: 8.000197 days
computation time left: 0:00:00.870132
approximately 5 steps left to test
#10: using cached result (was good) from debbisect.20220720T092049Z.log.good
snapshot timestamp difference: 4.001296 days
computation time left: 0:00:00.721089
approximately 4 steps left to test
#11: using cached result (was good) from debbisect.20220722T085138Z.log.good
snapshot timestamp difference: 2.021562 days
computation time left: 0:00:00.533613
approximately 3 steps left to test
#12: using cached result (was bad) from debbisect.20220723T030313Z.log.bad
snapshot timestamp difference: 0.758044 days
computation time left: 0:00:00.365619
approximately 2 steps left to test
#13: using cached result (was bad) from debbisect.20220722T150935Z.log.bad
bisection finished successfully
   last good timestamp: 2022-07-22 08:51:38+00:00
   first bad timestamp: 2022-07-22 15:09:35+00:00
the following packages differ between the last good and first bad timestamp:
   cpp 4:11.2.0-2 -> 4:12.1.0-1
   cpp-12 (n.a.) -> 12.1.0-7
   g++ 4:11.2.0-2 -> 4:12.1.0-1
   g++-12 (n.a.) -> 12.1.0-7
   gcc 4:11.2.0-2 -> 4:12.1.0-1
   gcc-12 (n.a.) -> 12.1.0-7
   gcc-12-multilib (n.a.) -> 12.1.0-7
   gcc-multilib 4:11.2.0-2 -> 4:12.1.0-1
   lib32asan8 (n.a.) -> 12.1.0-7
   lib32gcc-12-dev (n.a.) -> 12.1.0-7
   libasan8:amd64 (n.a.) -> 12.1.0-7
   libgcc-12-dev:amd64 (n.a.) -> 12.1.0-7
   libstdc++-12-dev:amd64 (n.a.) -> 12.1.0-7
   libtsan2:amd64 (n.a.) -> 12.1.0-7
   libx32asan8 (n.a.) -> 12.1.0-7
   libx32gcc-12-dev (n.a.) -> 12.1.0-7
test upgrading cpp 4:11.2.0-2 -> 4:12.1.0-1...
using cached result (was bad) from debbisect.20220722T085138Z.cpp.log.bad
   upgrading cpp triggered the problem
   additional packages that got upgraded/installed at the same time:
     cpp-12 (n.a.) -> 12.1.0-7
     g++ 4:11.2.0-2 -> 4:12.1.0-1
     g++-12 (n.a.) -> 12.1.0-7
     gcc 4:11.2.0-2 -> 4:12.1.0-1
     gcc-12 (n.a.) -> 12.1.0-7
     gcc-12-multilib (n.a.) -> 12.1.0-7
     gcc-multilib 4:11.2.0-2 -> 4:12.1.0-1
     lib32asan8 (n.a.) -> 12.1.0-7
     lib32gcc-12-dev (n.a.) -> 12.1.0-7
     libasan8:amd64 (n.a.) -> 12.1.0-7
     libgcc-12-dev:amd64 (n.a.) -> 12.1.0-7
     libstdc++-12-dev:amd64 (n.a.) -> 12.1.0-7
     libtsan2:amd64 (n.a.) -> 12.1.0-7
     libx32asan8 (n.a.) -> 12.1.0-7
     libx32gcc-12-dev (n.a.) -> 12.1.0-7
test installing cpp-12 12.1.0-7...
using cached result (was bad) from debbisect.20220722T085138Z.cpp-12.log.bad
   upgrading cpp-12 triggered the problem
test upgrading g++ 4:11.2.0-2 -> 4:12.1.0-1...
using cached result (was bad) from debbisect.20220722T085138Z.g++.log.bad
   upgrading g++ triggered the problem
   additional packages that got upgraded/installed at the same time:
     cpp 4:11.2.0-2 -> 4:12.1.0-1
     cpp-12 (n.a.) -> 12.1.0-7
     g++-12 (n.a.) -> 12.1.0-7
     gcc 4:11.2.0-2 -> 4:12.1.0-1
     gcc-12 (n.a.) -> 12.1.0-7
     gcc-12-multilib (n.a.) -> 12.1.0-7
     gcc-multilib 4:11.2.0-2 -> 4:12.1.0-1
     lib32asan8 (n.a.) -> 12.1.0-7
     lib32gcc-12-dev (n.a.) -> 12.1.0-7
     libasan8:amd64 (n.a.) -> 12.1.0-7
     libgcc-12-dev:amd64 (n.a.) -> 12.1.0-7
     libstdc++-12-dev:amd64 (n.a.) -> 12.1.0-7
     libtsan2:amd64 (n.a.) -> 12.1.0-7
     libx32asan8 (n.a.) -> 12.1.0-7
     libx32gcc-12-dev (n.a.) -> 12.1.0-7
test installing g++-12 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.g++-12.log.good
   installing g++-12 does not cause the problem
test upgrading gcc 4:11.2.0-2 -> 4:12.1.0-1...
using cached result (was bad) from debbisect.20220722T085138Z.gcc.log.bad
   upgrading gcc triggered the problem
   additional packages that got upgraded/installed at the same time:
     cpp 4:11.2.0-2 -> 4:12.1.0-1
     cpp-12 (n.a.) -> 12.1.0-7
     g++ 4:11.2.0-2 -> 4:12.1.0-1
     g++-12 (n.a.) -> 12.1.0-7
     gcc-12 (n.a.) -> 12.1.0-7
     gcc-12-multilib (n.a.) -> 12.1.0-7
     gcc-multilib 4:11.2.0-2 -> 4:12.1.0-1
     lib32asan8 (n.a.) -> 12.1.0-7
     lib32gcc-12-dev (n.a.) -> 12.1.0-7
     libasan8:amd64 (n.a.) -> 12.1.0-7
     libgcc-12-dev:amd64 (n.a.) -> 12.1.0-7
     libstdc++-12-dev:amd64 (n.a.) -> 12.1.0-7
     libtsan2:amd64 (n.a.) -> 12.1.0-7
     libx32asan8 (n.a.) -> 12.1.0-7
     libx32gcc-12-dev (n.a.) -> 12.1.0-7
test installing gcc-12 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.gcc-12.log.good
   installing gcc-12 does not cause the problem
test installing gcc-12-multilib 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.gcc-12-multilib.log.good
   installing gcc-12-multilib does not cause the problem
test upgrading gcc-multilib 4:11.2.0-2 -> 4:12.1.0-1...
using cached result (was bad) from debbisect.20220722T085138Z.gcc-multilib.log.bad
   upgrading gcc-multilib triggered the problem
   additional packages that got upgraded/installed at the same time:
     cpp 4:11.2.0-2 -> 4:12.1.0-1
     cpp-12 (n.a.) -> 12.1.0-7
     g++ 4:11.2.0-2 -> 4:12.1.0-1
     g++-12 (n.a.) -> 12.1.0-7
     gcc 4:11.2.0-2 -> 4:12.1.0-1
     gcc-12 (n.a.) -> 12.1.0-7
     gcc-12-multilib (n.a.) -> 12.1.0-7
     lib32asan8 (n.a.) -> 12.1.0-7
     lib32gcc-12-dev (n.a.) -> 12.1.0-7
     libasan8:amd64 (n.a.) -> 12.1.0-7
     libgcc-12-dev:amd64 (n.a.) -> 12.1.0-7
     libstdc++-12-dev:amd64 (n.a.) -> 12.1.0-7
     libtsan2:amd64 (n.a.) -> 12.1.0-7
     libx32asan8 (n.a.) -> 12.1.0-7
     libx32gcc-12-dev (n.a.) -> 12.1.0-7
test installing lib32asan8 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.lib32asan8.log.good
   installing lib32asan8 does not cause the problem
test installing lib32gcc-12-dev 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.lib32gcc-12-dev.log.good
   installing lib32gcc-12-dev does not cause the problem
test installing libasan8:amd64 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libasan8:amd64.log.good
   installing libasan8:amd64 does not cause the problem
test installing libgcc-12-dev:amd64 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libgcc-12-dev:amd64.log.good
   installing libgcc-12-dev:amd64 does not cause the problem
test installing libstdc++-12-dev:amd64 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libstdc++-12-dev:amd64.log.good
   installing libstdc++-12-dev:amd64 does not cause the problem
test installing libtsan2:amd64 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libtsan2:amd64.log.good
   installing libtsan2:amd64 does not cause the problem
test installing libx32asan8 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libx32asan8.log.good
   installing libx32asan8 does not cause the problem
test installing libx32gcc-12-dev 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libx32gcc-12-dev.log.good
   installing libx32gcc-12-dev does not cause the problem



#### script.sh

#!/bin/bash

dir="$1"

echo building syslinux

mkdir "$dir/build"

cp syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.dsc syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.debian.tar.xz syslinux_6.04~git20190206.bf6db5b4+dfsg1.orig.tar.xz "$dir/build"
cp -a syslinux-6.04~git20190206.bf6db5b4+dfsg1 "$dir/build"

cp gnu-efi_3.0.9-2.debian.tar.xz gnu-efi_3.0.9-2.dsc gnu-efi_3.0.9.orig.tar.bz2 "$dir/build"
cp -a gnu-efi-3.0.9 "$dir/build"

cp script2.sh "$dir"

chroot "$dir" ./script2.sh

rc=$?
if [ "$rc" != "0" ]; then
     echo build failed
     exit 1
fi


file1="$dir/build/syslinux-6.04~git20190206.bf6db5b4+dfsg1/debian/syslinux-efi/usr/lib/SYSLINUX.EFI/efi64/syslinux.efi"

if [ ! -e "$file1" ]; then
     echo build did not produce $file1
     exit 1
fi

dir2="$dir/build/syslinux-6.04~git20190206.bf6db5b4+dfsg1/debian/syslinux-common/usr/lib/syslinux/modules/efi64"

if [ ! -e "$dir2" ]; then
     echo build did not produce $dir2
     exit 1
fi



virt-copy-in -d debian11 "$file1" $dir2/* /boot/efi/EFI/syslinux/

virsh start debian11

sleep 20

virsh screenshot debian11 screenshot.png

virsh destroy debian11

tesseract screenshot.png - > screenshot.txt

cat screenshot.txt

for i in futomatic "edit options"; do
     if [ "$(grep "$i" screenshot.txt)" != "" ]; then
 	echo "OK"
 	exit 0
     fi
done
echo "FAIL"
exit 1


#### script2.sh

#!/bin/bash

(
     cd build/gnu-efi-3.0.9 || exit 1
     dpkg-buildpackage -us -uc
     dpkg -i ../gnu-efi*.deb
)

(
     cd build/syslinux-6.04~git20190206.bf6db5b4+dfsg1 || exit 1
     dpkg-buildpackage -us -uc
)

#994274#38
Date:
2023-02-12 22:07:06 UTC
From:
To:
Hi,

here are the bisect results:


# debbisect --cache cache -v --depends e2fslibs-dev,nasm,python3,uuid-dev,gnu-efi,debhelper-compat,binutils,gcc-multilib,build-essential 2020-02-01 2022-12-31 ./script.sh
good timestamp 2020-02-01 00:00:00+02:00 was remapped to snapshot.d.o timestamp 2020-01-31 21:17:03+00:00
bad timestamp 2022-12-31 00:00:00+02:00 was remapped to snapshot.d.o timestamp 2022-12-30 15:17:41+00:00
INFO:root:using cache directory: cache
snapshot timestamp difference: 1063.750440 days
approximately 14 steps left to test
#1: using cached results from debbisect.20200131T211703Z.log.good
computation time left: 0:00:00.001066
approximately 13 steps left to test
#2: using cached results from debbisect.20221230T151741Z.log.bad
snapshot timestamp difference: 1063.750440 days
computation time left: 0:00:01.426242
approximately 12 steps left to test
#3: using cached result (was good) from debbisect.20210716T091727Z.log.good
snapshot timestamp difference: 532.250162 days
computation time left: 0:00:01.436556
approximately 11 steps left to test
#4: using cached result (was good) from debbisect.20220408T091859Z.log.good
snapshot timestamp difference: 266.249097 days
computation time left: 0:00:01.549000
approximately 10 steps left to test
#5: using cached result (was bad) from debbisect.20220818T100320Z.log.bad
snapshot timestamp difference: 132.030799 days
computation time left: 0:00:01.393391
approximately 9 steps left to test
#6: using cached result (was good) from debbisect.20220613T085403Z.log.good
snapshot timestamp difference: 66.048113 days
computation time left: 0:00:01.362789
approximately 8 steps left to test
#7: using cached result (was good) from debbisect.20220716T092224Z.log.good
snapshot timestamp difference: 33.028426 days
computation time left: 0:00:01.257209
approximately 7 steps left to test
#8: using cached result (was bad) from debbisect.20220801T205040Z.log.bad
snapshot timestamp difference: 16.477963 days
computation time left: 0:00:01.060509
approximately 6 steps left to test
#9: using cached result (was bad) from debbisect.20220724T092241Z.log.bad
snapshot timestamp difference: 8.000197 days
computation time left: 0:00:00.870132
approximately 5 steps left to test
#10: using cached result (was good) from debbisect.20220720T092049Z.log.good
snapshot timestamp difference: 4.001296 days
computation time left: 0:00:00.721089
approximately 4 steps left to test
#11: using cached result (was good) from debbisect.20220722T085138Z.log.good
snapshot timestamp difference: 2.021562 days
computation time left: 0:00:00.533613
approximately 3 steps left to test
#12: using cached result (was bad) from debbisect.20220723T030313Z.log.bad
snapshot timestamp difference: 0.758044 days
computation time left: 0:00:00.365619
approximately 2 steps left to test
#13: using cached result (was bad) from debbisect.20220722T150935Z.log.bad
bisection finished successfully
   last good timestamp: 2022-07-22 08:51:38+00:00
   first bad timestamp: 2022-07-22 15:09:35+00:00
the following packages differ between the last good and first bad timestamp:
   cpp 4:11.2.0-2 -> 4:12.1.0-1
   cpp-12 (n.a.) -> 12.1.0-7
   g++ 4:11.2.0-2 -> 4:12.1.0-1
   g++-12 (n.a.) -> 12.1.0-7
   gcc 4:11.2.0-2 -> 4:12.1.0-1
   gcc-12 (n.a.) -> 12.1.0-7
   gcc-12-multilib (n.a.) -> 12.1.0-7
   gcc-multilib 4:11.2.0-2 -> 4:12.1.0-1
   lib32asan8 (n.a.) -> 12.1.0-7
   lib32gcc-12-dev (n.a.) -> 12.1.0-7
   libasan8:amd64 (n.a.) -> 12.1.0-7
   libgcc-12-dev:amd64 (n.a.) -> 12.1.0-7
   libstdc++-12-dev:amd64 (n.a.) -> 12.1.0-7
   libtsan2:amd64 (n.a.) -> 12.1.0-7
   libx32asan8 (n.a.) -> 12.1.0-7
   libx32gcc-12-dev (n.a.) -> 12.1.0-7
test upgrading cpp 4:11.2.0-2 -> 4:12.1.0-1...
using cached result (was bad) from debbisect.20220722T085138Z.cpp.log.bad
   upgrading cpp triggered the problem
   additional packages that got upgraded/installed at the same time:
     cpp-12 (n.a.) -> 12.1.0-7
     g++ 4:11.2.0-2 -> 4:12.1.0-1
     g++-12 (n.a.) -> 12.1.0-7
     gcc 4:11.2.0-2 -> 4:12.1.0-1
     gcc-12 (n.a.) -> 12.1.0-7
     gcc-12-multilib (n.a.) -> 12.1.0-7
     gcc-multilib 4:11.2.0-2 -> 4:12.1.0-1
     lib32asan8 (n.a.) -> 12.1.0-7
     lib32gcc-12-dev (n.a.) -> 12.1.0-7
     libasan8:amd64 (n.a.) -> 12.1.0-7
     libgcc-12-dev:amd64 (n.a.) -> 12.1.0-7
     libstdc++-12-dev:amd64 (n.a.) -> 12.1.0-7
     libtsan2:amd64 (n.a.) -> 12.1.0-7
     libx32asan8 (n.a.) -> 12.1.0-7
     libx32gcc-12-dev (n.a.) -> 12.1.0-7
test installing cpp-12 12.1.0-7...
using cached result (was bad) from debbisect.20220722T085138Z.cpp-12.log.bad
   upgrading cpp-12 triggered the problem
test upgrading g++ 4:11.2.0-2 -> 4:12.1.0-1...
using cached result (was bad) from debbisect.20220722T085138Z.g++.log.bad
   upgrading g++ triggered the problem
   additional packages that got upgraded/installed at the same time:
     cpp 4:11.2.0-2 -> 4:12.1.0-1
     cpp-12 (n.a.) -> 12.1.0-7
     g++-12 (n.a.) -> 12.1.0-7
     gcc 4:11.2.0-2 -> 4:12.1.0-1
     gcc-12 (n.a.) -> 12.1.0-7
     gcc-12-multilib (n.a.) -> 12.1.0-7
     gcc-multilib 4:11.2.0-2 -> 4:12.1.0-1
     lib32asan8 (n.a.) -> 12.1.0-7
     lib32gcc-12-dev (n.a.) -> 12.1.0-7
     libasan8:amd64 (n.a.) -> 12.1.0-7
     libgcc-12-dev:amd64 (n.a.) -> 12.1.0-7
     libstdc++-12-dev:amd64 (n.a.) -> 12.1.0-7
     libtsan2:amd64 (n.a.) -> 12.1.0-7
     libx32asan8 (n.a.) -> 12.1.0-7
     libx32gcc-12-dev (n.a.) -> 12.1.0-7
test installing g++-12 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.g++-12.log.good
   installing g++-12 does not cause the problem
test upgrading gcc 4:11.2.0-2 -> 4:12.1.0-1...
using cached result (was bad) from debbisect.20220722T085138Z.gcc.log.bad
   upgrading gcc triggered the problem
   additional packages that got upgraded/installed at the same time:
     cpp 4:11.2.0-2 -> 4:12.1.0-1
     cpp-12 (n.a.) -> 12.1.0-7
     g++ 4:11.2.0-2 -> 4:12.1.0-1
     g++-12 (n.a.) -> 12.1.0-7
     gcc-12 (n.a.) -> 12.1.0-7
     gcc-12-multilib (n.a.) -> 12.1.0-7
     gcc-multilib 4:11.2.0-2 -> 4:12.1.0-1
     lib32asan8 (n.a.) -> 12.1.0-7
     lib32gcc-12-dev (n.a.) -> 12.1.0-7
     libasan8:amd64 (n.a.) -> 12.1.0-7
     libgcc-12-dev:amd64 (n.a.) -> 12.1.0-7
     libstdc++-12-dev:amd64 (n.a.) -> 12.1.0-7
     libtsan2:amd64 (n.a.) -> 12.1.0-7
     libx32asan8 (n.a.) -> 12.1.0-7
     libx32gcc-12-dev (n.a.) -> 12.1.0-7
test installing gcc-12 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.gcc-12.log.good
   installing gcc-12 does not cause the problem
test installing gcc-12-multilib 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.gcc-12-multilib.log.good
   installing gcc-12-multilib does not cause the problem
test upgrading gcc-multilib 4:11.2.0-2 -> 4:12.1.0-1...
using cached result (was bad) from debbisect.20220722T085138Z.gcc-multilib.log.bad
   upgrading gcc-multilib triggered the problem
   additional packages that got upgraded/installed at the same time:
     cpp 4:11.2.0-2 -> 4:12.1.0-1
     cpp-12 (n.a.) -> 12.1.0-7
     g++ 4:11.2.0-2 -> 4:12.1.0-1
     g++-12 (n.a.) -> 12.1.0-7
     gcc 4:11.2.0-2 -> 4:12.1.0-1
     gcc-12 (n.a.) -> 12.1.0-7
     gcc-12-multilib (n.a.) -> 12.1.0-7
     lib32asan8 (n.a.) -> 12.1.0-7
     lib32gcc-12-dev (n.a.) -> 12.1.0-7
     libasan8:amd64 (n.a.) -> 12.1.0-7
     libgcc-12-dev:amd64 (n.a.) -> 12.1.0-7
     libstdc++-12-dev:amd64 (n.a.) -> 12.1.0-7
     libtsan2:amd64 (n.a.) -> 12.1.0-7
     libx32asan8 (n.a.) -> 12.1.0-7
     libx32gcc-12-dev (n.a.) -> 12.1.0-7
test installing lib32asan8 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.lib32asan8.log.good
   installing lib32asan8 does not cause the problem
test installing lib32gcc-12-dev 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.lib32gcc-12-dev.log.good
   installing lib32gcc-12-dev does not cause the problem
test installing libasan8:amd64 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libasan8:amd64.log.good
   installing libasan8:amd64 does not cause the problem
test installing libgcc-12-dev:amd64 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libgcc-12-dev:amd64.log.good
   installing libgcc-12-dev:amd64 does not cause the problem
test installing libstdc++-12-dev:amd64 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libstdc++-12-dev:amd64.log.good
   installing libstdc++-12-dev:amd64 does not cause the problem
test installing libtsan2:amd64 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libtsan2:amd64.log.good
   installing libtsan2:amd64 does not cause the problem
test installing libx32asan8 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libx32asan8.log.good
   installing libx32asan8 does not cause the problem
test installing libx32gcc-12-dev 12.1.0-7...
using cached result (was good) from debbisect.20220722T085138Z.libx32gcc-12-dev.log.good
   installing libx32gcc-12-dev does not cause the problem



#### script.sh

#!/bin/bash

dir="$1"

echo building syslinux

mkdir "$dir/build"

cp syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.dsc syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.debian.tar.xz syslinux_6.04~git20190206.bf6db5b4+dfsg1.orig.tar.xz "$dir/build"
cp -a syslinux-6.04~git20190206.bf6db5b4+dfsg1 "$dir/build"

cp gnu-efi_3.0.9-2.debian.tar.xz gnu-efi_3.0.9-2.dsc gnu-efi_3.0.9.orig.tar.bz2 "$dir/build"
cp -a gnu-efi-3.0.9 "$dir/build"

cp script2.sh "$dir"

chroot "$dir" ./script2.sh

rc=$?
if [ "$rc" != "0" ]; then
     echo build failed
     exit 1
fi


file1="$dir/build/syslinux-6.04~git20190206.bf6db5b4+dfsg1/debian/syslinux-efi/usr/lib/SYSLINUX.EFI/efi64/syslinux.efi"

if [ ! -e "$file1" ]; then
     echo build did not produce $file1
     exit 1
fi

dir2="$dir/build/syslinux-6.04~git20190206.bf6db5b4+dfsg1/debian/syslinux-common/usr/lib/syslinux/modules/efi64"

if [ ! -e "$dir2" ]; then
     echo build did not produce $dir2
     exit 1
fi



virt-copy-in -d debian11 "$file1" $dir2/* /boot/efi/EFI/syslinux/

virsh start debian11

sleep 20

virsh screenshot debian11 screenshot.png

virsh destroy debian11

tesseract screenshot.png - > screenshot.txt

cat screenshot.txt

for i in futomatic "edit options"; do
     if [ "$(grep "$i" screenshot.txt)" != "" ]; then
 	echo "OK"
 	exit 0
     fi
done
echo "FAIL"
exit 1


#### script2.sh

#!/bin/bash

(
     cd build/gnu-efi-3.0.9 || exit 1
     dpkg-buildpackage -us -uc
     dpkg -i ../gnu-efi*.deb
)

(
     cd build/syslinux-6.04~git20190206.bf6db5b4+dfsg1 || exit 1
     dpkg-buildpackage -us -uc
)

#994274#43
Date:
2023-04-05 11:44:57 UTC
From:
To:
Hi Lukas, Philipp, Timo,

Does reverting the removal[1] of 'efisetjmp.h' from 'efi.h' in src:gnu-efi
produce successful results?

That occurred between gnu-efi versions 3.0.9 and 3.0.13 if I read the upstream
history correctly.

(revert patch attached for convenience, although I'm not yet going to add the
corresponding tag to this bug until we confirm whether it's useful)

And if that headerfile does seem relevant: this issue may affect src:shim too.

Thanks,
James

[1] - https://sourceforge.net/u/lslrt/gnu-efi/ci/486ba3c3bdd147b7d98159b9e650be60bce0f027/

#994274#52
Date:
2025-04-12 16:17:45 UTC
From:
To:
Hi,

I've spent a bit of time debugging this, and by adding setjmp.h to
efi/main.c
and removing the ampersand from the longjmp()/setjmp() calls (provided
a patch in #1091027), I was able to get a working EFI syslinux.

I've used the following configuration for testing:

PROMPT    1
TIMEOUT    50
DEFAULT debian

LABEL debian
     LINUX /vmlinuz
     INITRD /initrd.gz

LABEL localboot
     LINUX .localboot

The localboot option actually tests the longjmp() call in efi/main.c,
and it successfully returns me to the EFI shell in qemu with OVMF,
and I even tried it on my own computer where I added a boot entry
for EFI/syslinux/syslinux.efi, and after invoking localboot, it switched
to the next boot entry, which was grub, my primary bootloader on this
system.

However, all of what I've mentioned above applies to the 64-bit image.
I was unable to get the 32-bit image running in qemu with OVMF. What
happens is that it writes a bunch of space characters, and then quits,
throwing me back to the EFI shell prompt.

Interestingly enough, I get the same behavior when I try to use
the pre-compiled syslinux-6.03 from kernel.org, but when I try to use
the syslinux-6.03_8.i686 package from Void Linux, that one actually
works.

Another interesting thing is that when I've enabled debugging by defining
the CORE_DEBUG and DEBUG_STDIO macros, the 32-bit image actually works too,
so perhaps it might have to do with some optimizations that cause issues,
or perhaps some race condition where the outcome is altered by debugging
messages being printed.

It's possible that this race condition also happens on the 64-bit syslinux,
because I thought I observed such behavior on the 64-bit version as well
under qemu, but I can't seem to reproduce it now.  It's also possible
that I jus got my files mixed up during testing.


Either way, I think that's a separate bug from the setjmp() bug, and I think
that one is taken care of by adding setjmp.h to efi/main.c.


Best Regards,
Marek

#994274#59
Date:
2025-04-13 11:38:24 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
syslinux, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 994274@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Philipp Kern <pkern@debian.org> (supplier of updated syslinux package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 13 Apr 2025 11:31:54 +0200
Source: syslinux
Architecture: source
Version: 3:6.04~git20190206.bf6db5b4+dfsg1-3.1
Distribution: unstable
Urgency: medium
Maintainer: Debian CD Group <debian-cd@lists.debian.org>
Changed-By: Philipp Kern <pkern@debian.org>
Closes: 994274 1057462 1091027
Changes:
 syslinux (3:6.04~git20190206.bf6db5b4+dfsg1-3.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Add GCC 14 compatibility patch. Thanks to Marek Benc.
     (Closes: #1091027, #1057462)
   * Add wchar_t definition for gnu-efi >= 3.0.16 compatibility.
     (Closes: #994274)
   * Update build dependency on e2fslibs-dev => libext2fs-dev.
   * Update Lintian overrides to match again.
Checksums-Sha1:
 422a41748b51fa7563ce18569010481b3ed04661 2270 syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.1.dsc
 f1f7a74a5597d18fa4acf8839731ff1361ef71be 44624 syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.1.debian.tar.xz
 96bbf211705371adbed0d267e82dd9cf3e147e1a 8874 syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.1_amd64.buildinfo
Checksums-Sha256:
 1fdf50a82ae674d6348e84cfb6bf31e6f337cad86093ebe9d93eabfa92cbcfea 2270 syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.1.dsc
 f2bb2987dd56739500f3157c79532c0fa6d3c2740426f6b222cfb1642bb08f27 44624 syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.1.debian.tar.xz
 e23fc14170ef08ee669d317eb6636d7248d190b0a33a8e71064dad405fd08ee1 8874 syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.1_amd64.buildinfo
Files:
 1332f1b7c7af61a5fb8dc3c867d4fc51 2270 admin optional syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.1.dsc
 4a62e92dd8340f37ec6b330c3c5e873b 44624 admin optional syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.1.debian.tar.xz
 089e262eebf7c502b4e5782f490023af 8874 admin optional syslinux_6.04~git20190206.bf6db5b4+dfsg1-3.1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQFFBAEBCgAvFiEEPzuChCNsw7gPxr3/RG4lRTXQVuwFAmf7nNcRHHBrZXJuQGRl
Ymlhbi5vcmcACgkQRG4lRTXQVuxsyQgAvpapTwo8a2jZ6+mUQdUjzG1xG+fn+/PH
OM/h8pGG05rQiFwR/oHj+KSwAGX8JNeuACGg2xrGS9WdfXl7NipcVoXcXwxZAW9+
ry3aVjLBMu0lbiy3L4yNn2dYyLay5sWjU+KZcz1Lcv3DkfyHJvMPH5MXSFL+1p3w
0ZaR2rjxxeyNnN0CRHCodngxQnVaNbYq7tRgdO8F8vEYZyEV1b15Vfw7RbagrIPj
vj4sLs7tvxD+GSMD8cT83gyxZw0bVuULHplRdNcPg6set1ma8UNT7hs88JN6XqgB
VIGFGRfcWzgo1+MQXxZt7HJiGLcwO3MSpFKYiqSfhtfHU0mNG0Z8cw==
=7XRK
-----END PGP SIGNATURE-----

#994274#68
Date:
2025-04-13 11:22:07 UTC
From:
To:
user debian-release@lists.debian.org
usertag 1091027 + bsp-2025-04-at-vienna
usertag 1057462 + bsp-2025-04-at-vienna
usertag 994274 + bsp-2025-04-at-vienna
tag 1091027 + pending
tag 1057462 + pending
tag 994274 + pending
thanks

Uploaded an NMU to DELAYED/0-day:

Kind regards
Philipp Kern