Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832019 - sys-boot/systemd-boot-249.9 fails to compile: meson.build:54:16: ERROR: Problem encountered: lld does not support COFF relocations Use different linker for EFI image
Summary: sys-boot/systemd-boot-249.9 fails to compile: meson.build:54:16: ERROR: Probl...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-25 08:39 UTC by Agostino Sarubbo
Modified: 2023-09-18 01:32 UTC (History)
0 users

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


Attachments
build.log (build.log,53.19 KB, text/plain)
2022-01-25 08:40 UTC, Agostino Sarubbo
Details
1-meson-log.txt (1-meson-log.txt,184.63 KB, text/plain)
2022-01-25 08:40 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-01-25 08:39:59 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sys-boot/systemd-boot-249.9 fails to compile.
Discovered on: amd64 (internal ref: tinderbox)

NOTE:
This machine uses CLANG as a compiler and LLD as a linker
Comment 1 Agostino Sarubbo gentoo-dev 2022-01-25 08:40:01 UTC
Created attachment 763575 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-01-25 08:40:03 UTC
Created attachment 763576 [details]
1-meson-log.txt

1-meson-log.txt
Comment 3 Agostino Sarubbo gentoo-dev 2022-01-25 08:40:04 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


Program bpftool /usr/sbin/bpftool found: NO
Program kexec /usr/sbin/kexec /sbin/kexec found: NO
Program quotacheck /usr/sbin/quotacheck /sbin/quotacheck found: NO
Program quotaon /usr/sbin/quotaon /sbin/quotaon found: NO
Run-time dependency libbpf found: NO (tried pkgconfig and cmake)
Run-time dependency libfido2 found: NO (tried pkgconfig and cmake)
Run-time dependency p11-kit-1 found: NO (tried pkgconfig and cmake)
Run-time dependency pwquality found: NO (tried pkgconfig and cmake)
Run-time dependency tss2-esys tss2-rc tss2-mu found: NO (tried pkgconfig and cmake)
src/boot/efi/meson.build:54:16: ERROR: Problem encountered: LLVM/lld does not support PE/COFF relocations. Use different linker for EFI image.
Comment 4 Mike Gilbert gentoo-dev 2023-07-28 14:51:35 UTC
This will be resolved by the changes coming in systemd-254.
Comment 5 Ali Abdel-Qader 2023-08-16 18:44:04 UTC
(In reply to Mike Gilbert from comment #4)
> This will be resolved by the changes coming in systemd-254.

https://github.com/systemd/systemd/blame/main/src/boot/efi/meson.build#L147

It seems like the change was to force ld.bfd when building systemd-boot. This breaks Clang thin LTO with systemd with +boot and requires either a patch to disable LTO when using clang in the efi_c_ld_args or the use of package.cflags locally to disable LTO for systemd entirely.
Comment 6 Mike Gilbert gentoo-dev 2023-08-16 19:09:36 UTC
(In reply to Ali Abdel-Qader from comment #5)

Take it up with upstream. Nothing I can do about it.
Comment 7 Mike Gilbert gentoo-dev 2023-09-18 01:32:21 UTC
Fixed upstream by forcing bfd.