Summary: | sys-libs/efivar-38 - ld.lld: error: unknown argument '--add-needed' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michael Egger <egger.m> |
Component: | Current packages | Assignee: | Mike Gilbert <floppym> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 2073201758GD, ajak, contyk, decedion, erhard_f, ethancaston, ingo_brunberg, telans |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/rhboot/efivar/issues/204 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 408963 | ||
Attachments: |
build.log
emerge --info add-needed.patch clang.patch |
Description
Michael Egger
2022-01-19 12:10:30 UTC
I can't reproduce this with clang-14, despite still using lld-13. Not sure why. Michael would you be able to test? Thanks. Created attachment 765197 [details]
build.log
build log
Created attachment 765198 [details]
emerge --info
This is still an issue on my machine, attached build.log and emerge --info
Did Clang 14 add something here then? Please work with upstream on this. There are two PR upstream to resolve this https://github.com/rhboot/efivar/pull/218 This removes the --add-needed option but produces another issue https://github.com/rhboot/efivar/pull/222 fixes the "unable to insert .data after .data" but isn't complete *** Bug 867124 has been marked as a duplicate of this bug. *** *** Bug 867850 has been marked as a duplicate of this bug. *** issue recreated while doing a new install with clang,it currently is impossible to use this profile to install gentoo on an EFI system until a fix is pushed (chdoot) mint /usr/src/linux # emerge -v sys-libs/efivar * IMPORTANT: 9 news items need reading for repository 'gentoo'. * Use eselect news read to view new items. These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] sys-libs/efivar-38:0/1::gentoo USE="-test" 0 KiB Total: 1 package (1 new), Size of downloads: 0 KiB >>> Verifying ebuild manifests >>> Emerging (1 of 1) sys-libs/efivar-38::gentoo * efivar-38.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking efivar-38.tar.bz2 to /var/tmp/portage/sys-libs/efivar-38/work >>> Source unpacked in /var/tmp/portage/sys-libs/efivar-38/work >>> Preparing source in /var/tmp/portage/sys-libs/efivar-38/work/efivar-38 ... * Applying efivar-38-ia64-relro.patch ... [ ok ] * Applying efivar-38-march-native.patch ... [ ok ] * Applying efivar-38-Makefile-dep.patch ... [ ok ] * Applying efivar-38-binutils-2.36.patch ... [ ok ] * Applying efivar-38-ld-locale.patch ... [ ok ] * Applying efivar-38-glibc-2.36.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-libs/efivar-38/work/efivar-38 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/sys-libs/efivar-38/work/efivar-38 ... make -j16 make[1]: Entering directory '/var/tmp/portage/sys-libs/efivar-38/work/efivar-38/src' clang -march=native -O2 -pipe -std=gnu11 -funsigned-char -fvisibility=hidden -std=gnu11 -funsigned-char -fvisibility=hidden -fPIC -DLIBEFIVAR_VERSION=38 -D_GNU_SOURCE -I/var/tmp/portage/sys-libs/efivar-38/work/efivar-38/src/include/ -DEFIVAR_BUILD_ENVIRONMENT -c -o makeguids.o makeguids.c clang -march=native -O2 -pipe -std=gnu11 -funsigned-char -fvisibility=hidden -std=gnu11 -funsigned-char -fvisibility=hidden -fPIC -DLIBEFIVAR_VERSION=38 -D_GNU_SOURCE -I/var/tmp/portage/sys-libs/efivar-38/work/efivar-38/src/include/ -DEFIVAR_BUILD_ENVIRONMENT -c -o util.o util.c clang -march=native -O2 -pipe -std=gnu11 -funsigned-char -fvisibility=hidden -std=gnu11 -funsigned-char -fvisibility=hidden -L. -Wl,--add-needed -Wl,--build-id -Wl,--no-allow-shlib-undefined -Wl,-z,now -Wl,-z,muldefs -Wl,--fatal-warnings,-z,relro -rtlib=compiler-rt -DLIBEFIVAR_VERSION=38 -D_GNU_SOURCE -I/var/tmp/portage/sys-libs/efivar-38/work/efivar-38/src/include/ -DEFIVAR_BUILD_ENVIRONMENT -o makeguids makeguids.o util.o -ldl ld.lld: error: unknown argument '--add-needed' clang-15: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [/var/tmp/portage/sys-libs/efivar-38/work/efivar-38/src/include/rules.mk:32: makeguids] Error 1 make[1]: Leaving directory '/var/tmp/portage/sys-libs/efivar-38/work/efivar-38/src' make: *** [Makefile:14: prep] Error 2 * ERROR: sys-libs/efivar-38::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-libs/efivar-38::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-libs/efivar-38::gentoo'`. * The complete build log is located at '/var/tmp/portage/sys-libs/efivar-38/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-libs/efivar-38/temp/environment'. * Working directory: '/var/tmp/portage/sys-libs/efivar-38/work/efivar-38' * S: '/var/tmp/portage/sys-libs/efivar-38/work/efivar-38' >>> Failed to emerge sys-libs/efivar-38, Log file: >>> '/var/tmp/portage/sys-libs/efivar-38/temp/build.log' * Messages for package sys-libs/efivar-38: * ERROR: sys-libs/efivar-38::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-libs/efivar-38::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-libs/efivar-38::gentoo'`. * The complete build log is located at '/var/tmp/portage/sys-libs/efivar-38/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-libs/efivar-38/temp/environment'. * Working directory: '/var/tmp/portage/sys-libs/efivar-38/work/efivar-38' * S: '/var/tmp/portage/sys-libs/efivar-38/work/efivar-38' *** Bug 888847 has been marked as a duplicate of this bug. *** Created attachment 848743 [details, diff]
add-needed.patch
1 of 2 patches needed to build efivar-38 with clang.
Created attachment 848745 [details, diff]
clang.patch
2 of 2 patches needed to build efivar-38 with clang.
*** Bug 893622 has been marked as a duplicate of this bug. *** Please link to the upstream commits instead of attaching them as patches. (In reply to Mike Gilbert from comment #14) > Please link to the upstream commits instead of attaching them as patches. https://github.com/rhboot/efivar/commit/b23aba1469de8bb7a115751f9cd294ad3aaa6680 https://github.com/rhboot/efivar/commit/cfd686de51494d3e34be896a91835657ccab37d4 Maybe also: https://github.com/rhboot/efivar/commit/1f247260c9b4bd6fcda30f3e4cc358852aeb9e4d The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a929b75061d1ee6190ac9df0bfaafde6a4a19618 commit a929b75061d1ee6190ac9df0bfaafde6a4a19618 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-02-12 18:45:22 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-02-12 18:47:10 +0000 sys-libs/efivar: backport lld fixes Closes: https://bugs.gentoo.org/831472 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-libs/efivar/efivar-38.ebuild | 7 +- sys-libs/efivar/files/efivar-38-ia64-relro.patch | 4 +- sys-libs/efivar/files/efivar-38-lld-fixes.patch | 345 +++++++++++++++++++++++ 3 files changed, 352 insertions(+), 4 deletions(-) (In reply to nvinson234 from comment #11) Thanks for rebasing the patches on top of Gentoo's existing patchset. In the future, it would be helpful if you mentioned doing so. I decided it was better to adjust the Gentoo-specific efivar-38-ia64-relro.patch to apply on top of the other patches which have all been accepted upstream. |