Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 953346 - sys-boot/syslinux-6.04_pre3-r1 - efi/main.c:189:13: error: passing argument 1 of ‘longjmp’ from incompatible pointer type [-Wincompatible-pointer-types]
Summary: sys-boot/syslinux-6.04_pre3-r1 - efi/main.c:189:13: error: passing argument 1...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Chí-Thanh Christopher Nguyễn
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-07 09:20 UTC by jospezial
Modified: 2025-04-07 19:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info.txt,11.00 KB, text/plain)
2025-04-07 09:27 UTC, jospezial
Details
build.log gzipped (build.log.gz,81.72 KB, application/gzip)
2025-04-07 09:30 UTC, jospezial
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2025-04-07 09:20:32 UTC
[ebuild   R   *]  sys-boot/syslinux-6.04_pre3-r1::gentoo  USE="bios uefi -secureboot" ABI_X86="(64) -32" 0 KiB

x86_64-pc-linux-gnu-gcc -I/usr/include/efi -I/usr/include/efi/x86_64 -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -fcommon -Wall -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/include -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/include/sys -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/core/include -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/core/ -m64 -march=x86-64 -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/lib/ -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/libutil/include -std=gnu99 -DELF_DEBUG -DSYSLINUX_EFI -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi64 -W -Wall -Wstrict-prototypes -Wno-implicit-fallthrough -Wno-format-truncation -Wno-stringop-overflow   -Wno-clobbered  -DDYNAMIC_DEBUG -D__COM32__ -D__FIRMWARE_EFI64__ -mno-red-zone -DLDLINUX=\"ldlinux.e64\" -fvisibility=hidden -Wno-unused-parameter -fno-stack-protector -Wno-strict-prototypes -DDATE_STR='"20190208"' -c -o main.o /var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/main.c
x86_64-pc-linux-gnu-gcc -I/usr/include/efi -I/usr/include/efi/x86_64 -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -fcommon -Wall -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/include -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/include/sys -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/core/include -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/core/ -m64 -march=x86-64 -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/lib/ -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/libutil/include -std=gnu99 -DELF_DEBUG -DSYSLINUX_EFI -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi64 -W -Wall -Wstrict-prototypes -Wno-implicit-fallthrough -Wno-format-truncation -Wno-stringop-overflow   -Wno-clobbered  -DDYNAMIC_DEBUG -D__COM32__ -D__FIRMWARE_EFI64__ -mno-red-zone -DLDLINUX=\"ldlinux.e64\" -fvisibility=hidden -Wno-unused-parameter -fno-stack-protector -Wno-strict-prototypes -DDATE_STR='"20190208"' -c -o mem.o /var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/mem.c
x86_64-pc-linux-gnu-gcc -I/usr/include/efi -I/usr/include/efi/x86_64 -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -fcommon -Wall -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/include -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/include/sys -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/core/include -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/core/ -m64 -march=x86-64 -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/lib/ -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/libutil/include -std=gnu99 -DELF_DEBUG -DSYSLINUX_EFI -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi64 -W -Wall -Wstrict-prototypes -Wno-implicit-fallthrough -Wno-format-truncation -Wno-stringop-overflow   -Wno-clobbered  -DDYNAMIC_DEBUG -D__COM32__ -D__FIRMWARE_EFI64__ -mno-red-zone -DLDLINUX=\"ldlinux.e64\" -fvisibility=hidden -Wno-unused-parameter -fno-stack-protector -Wno-strict-prototypes -DDATE_STR='"20190208"' -c -o pxe.o /var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/pxe.c
x86_64-pc-linux-gnu-gcc -I/usr/include/efi -I/usr/include/efi/x86_64 -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -fcommon -Wall -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/include -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/include/sys -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/core/include -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/core/ -m64 -march=x86-64 -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/lib/ -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/com32/libutil/include -std=gnu99 -DELF_DEBUG -DSYSLINUX_EFI -I/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi64 -W -Wall -Wstrict-prototypes -Wno-implicit-fallthrough -Wno-format-truncation -Wno-stringop-overflow   -Wno-clobbered  -DDYNAMIC_DEBUG -D__COM32__ -D__FIRMWARE_EFI64__ -mno-red-zone -DLDLINUX=\"ldlinux.e64\" -fvisibility=hidden -Wno-unused-parameter -fno-stack-protector -Wno-strict-prototypes -DDATE_STR='"20190208"' -c -o tcp.o /var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/tcp.c
/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/main.c: In function ‘local_boot’:
/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/main.c:189:13: error: passing argument 1 of ‘longjmp’ from incompatible pointer type [-Wincompatible-pointer-types]
  189 |     longjmp(&load_error_buf, 1);
      |             ^~~~~~~~~~~~~~~
      |             |
      |             struct <anonymous> (*)[1]
In file included from /var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/efi.h:25,
                 from /var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/main.c:14:
/usr/include/efi/efisetjmp.h:8:29: note: expected ‘struct <anonymous> *’ but argument is of type ‘struct <anonymous> (*)[1]’
    8 | extern VOID longjmp(jmp_buf env, UINTN value) EFI_NORETURN;
      |                     ~~~~~~~~^~~
/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/main.c: In function ‘build_gdt’:
/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/main.c:907:82: 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);
      |                                                                                  ^~~~~~~~~
/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/main.c: In function ‘efi_main’:
/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi/main.c:1390:21: error: passing argument 1 of ‘setjmp’ from incompatible pointer type [-Wincompatible-pointer-types]
 1390 |         if (!setjmp(&load_error_buf))
      |                     ^~~~~~~~~~~~~~~
      |                     |
      |                     struct <anonymous> (*)[1]
/usr/include/efi/efisetjmp.h:7:29: note: expected ‘struct <anonymous> *’ but argument is of type ‘struct <anonymous> (*)[1]’
    7 | extern UINTN setjmp(jmp_buf env) __attribute__((returns_twice));
      |                     ~~~~~~~~^~~
make[3]: *** [/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/mk/efi.mk:64: main.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi64/efi'
make[2]: *** [/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/Makefile:288: efi] Error 2
make[2]: Leaving directory '/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/efi64'
make[1]: *** [/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3/Makefile:272: efi64] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-boot/syslinux-6.04_pre3-r1/work/syslinux-6.04-pre3'
make: *** [Makefile:102: efi64] Error 2
 * ERROR: sys-boot/syslinux-6.04_pre3-r1::gentoo failed (compile phase):
 *   emake failed
 *
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-07 09:22:44 UTC
Please always include the full build.log and emerge --info.

I also assume this may be with some version of sys-boot/gnu-efi (maybe 4.0.0?)
Comment 2 jospezial 2025-04-07 09:27:08 UTC
Created attachment 923703 [details]
emerge --info

This bug is with sys-boot/gnu-efi 3.0.15 and 4.0.0
With versions between I get Bug 921597
Comment 3 jospezial 2025-04-07 09:30:51 UTC
Created attachment 923704 [details]
build.log gzipped
Comment 5 Mike Gilbert gentoo-dev 2025-04-07 15:05:49 UTC
(In reply to jospezial from comment #4)
> introduced since gnu-efi-3.0.18 by
> https://github.com/ncroxon/gnu-efi/commit/
> d27431f679dcd9c2fd57d7cfd46a2287b9f77415#diff-
> 9f203cef69f315eb2201e834fe2f47b890ee6dc098baaa26b04a2a3e46ed467d

Are you certain about that commit? The change does not appear to be relevant to the build error.
Comment 6 jospezial 2025-04-07 19:00:46 UTC
(In reply to Mike Gilbert from comment #5)
> (In reply to jospezial from comment #4)
> > introduced since gnu-efi-3.0.18 by
> > https://github.com/ncroxon/gnu-efi/commit/
> > d27431f679dcd9c2fd57d7cfd46a2287b9f77415#diff-
> > 9f203cef69f315eb2201e834fe2f47b890ee6dc098baaa26b04a2a3e46ed467d
> 
> Are you certain about that commit? The change does not appear to be relevant
> to the build error.

I did not bisect or patch. I only looked for possibly related commits.
For me it looks as syslinux needs to be adapted to this new EFI_NORETURN.
Comment 7 Mike Gilbert gentoo-dev 2025-04-07 19:12:52 UTC
(In reply to jospezial from comment #6)
> I did not bisect or patch. I only looked for possibly related commits.
> For me it looks as syslinux needs to be adapted to this new EFI_NORETURN.

EFI_NORETURN is equivalent to __attribute__((noreturn)) on Linux.

That commit is a noop for Linux systems. Only Microsoft (_MSC_EXTENSIONS) is affected.