Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830463 - sys-apps/sandbox fails to configure with sys-devel/mold: Unable to determine LIBC PATH ()
Summary: sys-apps/sandbox fails to configure with sys-devel/mold: Unable to determine ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All Linux
: Low normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
: 881657 (view as bug list)
Depends on:
Blocks: systemwide-mold
  Show dependency tree
 
Reported: 2022-01-02 18:47 UTC by Matthew Smith
Modified: 2023-06-17 02:42 UTC (History)
7 users (show)

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


Attachments
build.log (build.log,12.85 KB, text/plain)
2022-01-02 18:47 UTC, Matthew Smith
Details
config.log (config.log,153.77 KB, text/plain)
2022-01-02 18:47 UTC, Matthew Smith
Details
emerge --info sys-apps/sandbox (emerge--info,6.72 KB, text/plain)
2022-01-02 18:47 UTC, Matthew Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Smith gentoo-dev 2022-01-02 18:47:11 UTC
Created attachment 761105 [details]
build.log

When building sys-apps/sandbox (2.29 or 3.1) with -fuse-ld=mold, it fails to configure:

> checking libc path... configure: error: Unable to determine LIBC PATH ()
Comment 1 Matthew Smith gentoo-dev 2022-01-02 18:47:34 UTC
Created attachment 761106 [details]
config.log
Comment 2 Matthew Smith gentoo-dev 2022-01-02 18:47:59 UTC
Created attachment 761107 [details]
emerge --info sys-apps/sandbox
Comment 3 Ionen Wolkens gentoo-dev 2022-01-02 19:02:08 UTC
Seems it tries 3 methods for bfd/gold, lld, and solaris, but chances this would work with any other linker don't seem so good.

LIBC_PATH=$(AS_IF(
        [try_link -Wl,--verbose && grep -q '[[Aa]]ttempt' libctest.log]
        [try_link -Wl,--verbose],
                [$EGREP -o '/[[^ ]]*/libc.so.*' libctest.log | tail -n1],
        [try_link -Wl,-m],
                [set -- `$EGREP -o '/[[^ ]]*/libc.so' libctest.log`; echo $1]
Comment 4 Marco Scardovi (scardracs) 2022-01-04 07:51:13 UTC
I add the comment provided by the author of mold:

"Its ./configure script searches for a substring "attempt to open <filename> succeeded" from --verbose output to find the libc path. mold's --verbose output isn't the same as bfd's."
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-17 15:03:05 UTC
*** Bug 881657 has been marked as a duplicate of this bug. ***
Comment 6 James Le Cuirot gentoo-dev 2023-01-21 16:41:29 UTC
Here's a fix for review.
Comment 7 Larry the Git Cow gentoo-dev 2023-02-16 22:59:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=190300def3160ca39bd8590d1bbc7305ae07cc5b

commit 190300def3160ca39bd8590d1bbc7305ae07cc5b
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2023-01-21 16:36:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-16 22:59:03 +0000

    build: Fix libc path configure test for mold
    
    bfd, gold, lld, and mold all support `-Wl,--trace`, which has cleaner
    output than `-Wl,--verbose`. mold doesn't output anything with the
    latter, so the test didn't support that until now. The only difference
    between them now is that mold prefixes its output with `trace: ` whereas
    the others do not.
    
    I checked the Solaris linker, but that does not support `-Wl,--trace`.
    
    Bug: https://bugs.gentoo.org/830463
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>
    Closes: https://github.com/gentoo/sandbox/pull/5
    Signed-off-by: Sam James <sam@gentoo.org>

 configure.ac | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-17 02:42:49 UTC
commit f3b8deed4484e2c2ee8c90c75e71c56ea3570405
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Tue Jun 13 15:07:25 2023 -0400

    sys-apps/sandbox: add 2.31

    Closes: https://bugs.gentoo.org/908105
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>