Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Dec 2021 11:59:18 -0800
From:      John Baldwin <jhb@FreeBSD.org>
To:        Cy Schubert <Cy.Schubert@cschubert.com>, Dimitry Andric <dim@FreeBSD.org>, Ed Maste <emaste@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 5e6a2d6eb220 - main - Reapply: move libc++ from /usr/lib to /lib
Message-ID:  <4b9316c7-7590-e2b2-dae0-a8983cfddb2b@FreeBSD.org>
In-Reply-To: <4179cbea-ce54-a285-a1ca-7002acbca778@FreeBSD.org>
References:  <202112301610.1BUGAC8t054952@gitrepo.freebsd.org> <202112301658.1BUGwMkC009096@slippy.cwsent.com> <4179cbea-ce54-a285-a1ca-7002acbca778@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/30/21 11:52 AM, John Baldwin wrote:
> On 12/30/21 8:58 AM, Cy Schubert wrote:
>> This commit results in a different error.
>>
>> ld: error: /export/obj/opt/src/git-src/amd64.amd64/tmp/usr/lib/libc++.so:2:
>> cannot find /usr/lib/libc++.so.1 inside /export/obj/opt/src/git-src/amd64.am
>> d64/tmp
>>>>> GROUP ( /usr/lib/libc++.so.1 /usr/lib/libcxxrt.so )
>>>>>           ^
>> c++: error: linker command failed with exit code 1 (use -v to see
>> invocation)
>> *** [libclang_rt.asan-x86_64.so.full] Error code 1
>>
>> make[6]: stopped in /opt/src/git-src/lib/libclang_rt/asan_dynamic
> 
> I suspect that NO_CLEAN builds are broken.  You can try removing
> /usr/obj/<mumble>/amd64.amd64/usr/lib/libc++/libc++.ld and building again to see
> if that fixes it?  If so, we might need another NO_CLEAN fixup rule to delete
> that file it has has the wrong path.

This patch might fix this automatically:

diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh
index b6ad7701c32b..d2e31dab31be 100755
--- a/tools/build/depend-cleanup.sh
+++ b/tools/build/depend-cleanup.sh
@@ -78,3 +78,10 @@ fi
  clean_dep   cddl/lib/libspl atomic S
  # 20211207  cbdec8db18b5    switch to libthr-friendly pdfork
  clean_dep   lib/libc        pdfork S
+
+# 20211230  5e6a2d6eb220    libc++.so.1 path changed in ldscript
+if [ -e "$OBJTOP"/lib/libc++/libc++.ld ] && \
+    fgrep -q "/usr/lib/libc++.so" "$OBJTOP"/lib/libc++/libc++.ld; then
+       echo "Removing old libc++ linker script"
+       rm -f "$OBJTOP"/lib/libc++/libc++.ld
+fi


-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4b9316c7-7590-e2b2-dae0-a8983cfddb2b>