Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928381 - sys-apps/systemd-255.4 fails to link with lld-18
Summary: sys-apps/systemd-255.4 fails to link with lld-18
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: LD-is-lld, systemwide-lld
  Show dependency tree
 
Reported: 2024-04-01 11:52 UTC by Chris Pritchard
Modified: 2024-04-02 18:03 UTC (History)
2 users (show)

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


Attachments
fix-lld-18.patch (fix-lld-18.patch,1.05 KB, patch)
2024-04-01 11:54 UTC, Chris Pritchard
Details | Diff
build.log (systemd-255.4-build.log.zst,59.83 KB, application/zstd)
2024-04-01 13:05 UTC, Chris Pritchard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Pritchard 2024-04-01 11:52:38 UTC
This is due to upstream bug: https://github.com/systemd/systemd/issues/31637.

Package fails to link when using lld-18 as linker with the following error:

[675/1798] /var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py --version-major=255 --version-minor=0 --efi-major=1 --efi-minor=1 --subsystem=10 --minimum-sections=15 --copy-section
s=.sbat,.sdmagic,.osrel src/boot/efi/linuxx64.elf.stub src/boot/efi/linuxx64.efi.stub                                                                                                                              
FAILED: src/boot/efi/linuxx64.efi.stub                                                                                                                                                                             
/var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py --version-major=255 --version-minor=0 --efi-major=1 --efi-minor=1 --subsystem=10 --minimum-sections=15 --copy-sections=.sbat,.sd
magic,.osrel src/boot/efi/linuxx64.elf.stub src/boot/efi/linuxx64.efi.stub                  
Traceback (most recent call last):                                                                                                                                                                                 
  File "/var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py", line 699, in <module>                                                                                                 
    main()                                                                                                                                                                                                         
  File "/var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py", line 695, in main                                                                                                     
    elf2efi(parser.parse_args())                                                                                                                                                                                   
  File "/var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py", line 600, in elf2efi                                                                                                  
    sections = convert_sections(elf, opt)                                                                                                                                                                          
               ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                          
  File "/var/tmp/portage/sys-apps/systemd-255.4/work/systemd-stable-255.4/tools/elf2efi.py", line 330, in convert_sections                                                                                         
    raise RuntimeError("Overlapping PE sections.")
Comment 1 Chris Pritchard 2024-04-01 11:54:02 UTC
Created attachment 889208 [details, diff]
fix-lld-18.patch

Patch backported to systemd-255.4 from the upstream bug report (https://github.com/systemd/systemd/commit/6d03e5523cc26a4f4cecf277788ae62bba44f88e)
Comment 2 Chris Pritchard 2024-04-01 13:05:56 UTC
Created attachment 889209 [details]
build.log
Comment 3 Amit Ugol 2024-04-02 18:03:09 UTC
had same issue, attached fix works on both
23.0 (gcc)/desktop/systemd
23.0 llvm/systemd
LGTM