@@This is an auto-filed bug@@ Feel free to change the summary at your convenience. Issue: app-misc/oneko calls ld directly. Discovered on: amd64 NOTE: As per QA policy, toolchain tools must not be called directly because they can cause issue in cross-compiling and because is not possible use a different LD implementation (like llvm-link). To reproduce, please use sys-devel/gcc-config[-native-symlinks], sys-devel/binutils-config[-native-symlinks] and set the LD variable to x86_64-pc-linux-gnu-ld.
Created attachment 646386 [details] build.log build log and emerge --info
For the app-misc/oneko case I could work around it like this: --- a/app-misc/oneko/oneko-1.2_p6_p14-r1.ebuild +++ b/app-misc/oneko/oneko-1.2_p6_p14-r1.ebuild @@ -41,9 +41,13 @@ src_prepare() { done default + printf '#!/bin/sh\n%s ${*}\n' $(tc-getLD) > "${T}"/ld + chmod +x "${T}"/ld + export PATH="${T}:${PATH}" } src_configure() { + tc-export LD xmkmf -a || die } Is it viable to use the same approach for all other x11-misc/imake users or should a generic imake wrapper fix this?
(In reply to Jeroen Roovers from comment #2) > For the app-misc/oneko case I could work around it like this: > > --- a/app-misc/oneko/oneko-1.2_p6_p14-r1.ebuild > +++ b/app-misc/oneko/oneko-1.2_p6_p14-r1.ebuild [...] This doesn't actually do anything: > src_configure() { > + tc-export LD > xmkmf -a || die > }
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1633afd2ea85db7aac81cc84557e18c5b849b475 commit 1633afd2ea85db7aac81cc84557e18c5b849b475 Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2020-06-27 06:53:55 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2020-06-27 06:54:10 +0000 app-misc/oneko: Set up ld => tc-getLD Package-Manager: Portage-2.3.103, Repoman-2.3.23 Bug: https://bugs.gentoo.org/729630 Signed-off-by: Jeroen Roovers <jer@gentoo.org> app-misc/oneko/oneko-1.2_p6_p14-r1.ebuild | 4 ++++ 1 file changed, 4 insertions(+)
*** Bug 729856 has been marked as a duplicate of this bug. ***
*** Bug 726136 has been marked as a duplicate of this bug. ***
Created attachment 658326 [details, diff] files/imake-1.0.8-get_ld_version.patch The get_ld_version function is executed once and its only function is to define DefaultLinuxBinUtilsMajorVersion which isn't used anywhere else in the generated Makefile. Make get_ld_version a noop.
*** Bug 726228 has been marked as a duplicate of this bug. ***
*** Bug 725200 has been marked as a duplicate of this bug. ***
*** Bug 779973 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b94256f4e995223066f750b65166e6a261fbeed4 commit b94256f4e995223066f750b65166e6a261fbeed4 Author: Ionen Wolkens <sudinave@gmail.com> AuthorDate: 2021-04-13 21:51:11 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2021-04-15 06:38:48 +0000 x11-misc/imake: ease usage with toolchain's -native-symlinks This is to provide a more-sane way for ebuilds to fix their bugs, without really altering how imake behaves. There's four notable known runtime issues with -native-symlinks: - checks if /usr/bin/cc exists (without executing), if missing it skips setting some defines and notably causes generated Makefiles to use makedepend over gccmakedep resulting in some build failures. - `ld -v` inoring LD, no failure but gives a QA warning (bug #729630), also prevents a define from being set and given previous issue rather ensure they're conserved (slightly used in xorg-cf-files). - `gcc -E` ignoring CC/CPP, causes build failure if missing. imake has IMAKECPP to change this but can't take arguments leading to build failure if setting to $(tc-getCPP) which often has -E. - `xmkmf -a` sometimes calls imake again in an imake-generated Makefile leading to the environment's CC/LD being ignored again. Added patches to fix each. xmkmf-using ebuilds wanting to take advantage of this need something along the lines of: BDEPEND=">=x11-misc/imake-1.0.8-r1" CC="$(tc-getBUILD_CC)" LD="$(tc-getLD)" \ IMAKECPP=${IMAKECPP:-$(tc-getCPP)} xmkmf ... || die emake CC="$(tc-getCC)" ... +test with -native-symlinks to ensure don't need more emake vars. (only CC should be BUILD_* here, LD not used to link) IMAKECPP is used this way to allow users to override without changing normal CPP. imake uses traditional CPP and clang notably doesn't play that well with that. Closes: https://bugs.gentoo.org/729630 Signed-off-by: Ionen Wolkens <sudinave@gmail.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org> x11-misc/imake/files/imake-1.0.8-cpp-args.patch | 18 +++++++++++ x11-misc/imake/files/imake-1.0.8-no-get-gcc.patch | 37 ++++++++++++++++++++++ x11-misc/imake/files/imake-1.0.8-respect-LD.patch | 15 +++++++++ .../imake/files/imake-1.0.8-xmkmf-pass-cc-ld.patch | 15 +++++++++ x11-misc/imake/imake-1.0.8-r1.ebuild | 25 +++++++++++++++ 5 files changed, 110 insertions(+)