Thomas Petazzoni
2020-Mar-24 10:57 UTC
[syslinux] [PATCH] efi/main.c: include <efisetjmp.h>
Building syslinux against gnu-efi 3.0.10 currently fails with: syslinux/efi/main.c:33:8: error: unknown type name ?jmp_buf? 33 | static jmp_buf load_error_buf; | ^~~~~~~ syslinux/efi/main.c: In function ?local_boot?: syslinux/efi/main.c:189:5: warning: implicit declaration of function ?longjmp? [-Wimplicit-function-declaration] 189 | longjmp(&load_error_buf, 1); | ^~~~~~~ syslinux/efi/main.c: In function ?build_gdt?: syslinux/efi/main.c:907:75: warning: taking address of packed member of ?struct dt_desc? may result in an unaligned pointer value [-Waddress-of-packed-member] 907 | status = emalloc(gdt.limit, __SIZEOF_POINTER__ , (EFI_PHYSICAL_ADDRESS *)&gdt.base); | ^~~~~~~~~ syslinux/efi/main.c: In function ?efi_main?: syslinux/efi/main.c:1390:7: warning: implicit declaration of function ?setjmp? [-Wimplicit-function-declaration] 1390 | if (!setjmp(&load_error_buf)) | ^~~~~~ make[3]: *** [syslinux/mk/efi.mk:63: main.o] Error 1 This is due to gnu-efi commit 486ba3c3bdd147b7d98159b9e650be60bce0f027 ("Do not include efisetjmp.h on efi.h"), in which they state: Do not include efisetjmp.h on efi.h People than really want to use efisetjmp implementation can include the header on their own. Signed-off-by: leo <leo.sartre at geebol.fr> So we act as specified, and include <efisetjmp.h> from efi/main.c. Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com> --- efi/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/efi/main.c b/efi/main.c index 6a748412..e924cfb1 100644 --- a/efi/main.c +++ b/efi/main.c @@ -12,6 +12,7 @@ #include <sys/ansi.h> #include "efi.h" +#include <efisetjmp.h> #include "fio.h" #include "version.h" #include "efi_pxe.h" -- 2.25.1
> Building syslinux against gnu-efi 3.0.10 currently fails with:FWIW, gnu-efi version 3.0.11 was released just 20 days after the release of version 3.0.10. Building on top of gnu-efi 3.0.10 should be considered irrelevant. A more-relevant test would be to build on top of the current gnu-efi master head: https://sf.net/p/gnu-efi/code/ci/HEAD/ https://sf.net/p/gnu-efi/code/ci/master/ ATM (2020.03.24), this is: https://sf.net/p/gnu-efi/code/ci/9b63de committed on 2020.01.16. In addition (JIC), please be aware of the potential building problems when building with gcc 10. In the meantime, the Syslinux package from Debian Sid still works better than upstream (but it still comes with the same bugs / regressions that Syslinux's upstream binaries have). Regards, Ady.
Thomas Petazzoni
2020-Mar-24 20:34 UTC
[syslinux] [PATCH] efi/main.c: include <efisetjmp.h>
Hello, Thanks for your feedback. On Tue, 24 Mar 2020 18:17:09 +0200 Ady via Syslinux <syslinux at syslinux.org> wrote:> > Building syslinux against gnu-efi 3.0.10 currently fails with: > > FWIW, gnu-efi version 3.0.11 was released just 20 days after the > release of version 3.0.10. Building on top of gnu-efi 3.0.10 should be > considered irrelevant. A more-relevant test would be to build on top of > the current gnu-efi master head:There's a single commit between 3.0.10 and 3.0.11: $ git log --format=oneline 3.0.10..3.0.11 2ab1abfd26ea0a87a4fdf3d3c532544a65ae6954 Bump revision to VERSION = 3.0.11 8b2da2c2247af28bd681a9c8e3231559964c80a6 Revert "efilink: fix build with gcc 4.8" So essentially my fix to make syslinux build against 3.0.10 is of course also relevant to build against gnuefi 3.0.11.> In addition (JIC), please be aware of the potential building problems > when building with gcc 10.I have not yet looked at building syslinux with gcc 10. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com