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 ()
Created attachment 761106 [details] config.log
Created attachment 761107 [details] emerge --info sys-apps/sandbox
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]
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."
*** Bug 881657 has been marked as a duplicate of this bug. ***
Here's a fix for review.
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(-)
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>
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=b926cd079443bb9d0420b11201d4bd88a7aacd08 commit b926cd079443bb9d0420b11201d4bd88a7aacd08 Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2023-01-21 16:36:05 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-05-12 01:39:38 +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> (cherry picked from commit 190300def3160ca39bd8590d1bbc7305ae07cc5b) configure.ac | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)