Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 729630 - x11-misc/imake - imake calls ld directly
Summary: x11-misc/imake - imake calls ld directly
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: PATCH
: 725200 726136 726228 729856 (view as bug list)
Depends on:
Blocks: tc-directly
  Show dependency tree
 
Reported: 2020-06-25 14:40 UTC by Agostino Sarubbo
Modified: 2021-02-07 12:27 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,7.91 KB, text/plain)
2020-06-25 14:40 UTC, Agostino Sarubbo
Details
files/imake-1.0.8-get_ld_version.patch (imake-1.0.8-get_ld_version.patch,167 bytes, patch)
2020-09-04 08:30 UTC, Jeroen Roovers (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-06-25 14:40:14 UTC
@@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.
Comment 1 Agostino Sarubbo gentoo-dev 2020-06-25 14:40:19 UTC
Created attachment 646386 [details]
build.log

build log and emerge --info
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2020-06-27 06:44:48 UTC
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?
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2020-06-27 06:47:16 UTC
(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
>  }
Comment 4 Larry the Git Cow gentoo-dev 2020-06-27 06:54:14 UTC
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(+)
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2020-06-28 07:19:44 UTC
*** Bug 729856 has been marked as a duplicate of this bug. ***
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-04 08:10:57 UTC
*** Bug 726136 has been marked as a duplicate of this bug. ***
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-04 08:30:16 UTC
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.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-04 11:47:32 UTC
*** Bug 726228 has been marked as a duplicate of this bug. ***
Comment 9 Joonas Niilola gentoo-dev 2021-02-07 12:27:58 UTC
*** Bug 725200 has been marked as a duplicate of this bug. ***