From nobody Fri Dec 31 23:04:00 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A9E651937307; Fri, 31 Dec 2021 23:04:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JQggQ39vGz4rVS; Fri, 31 Dec 2021 23:04:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from [IPV6:2601:648:8601:8b20:dc79:bf12:122a:616b] (unknown [IPv6:2601:648:8601:8b20:dc79:bf12:122a:616b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id B722AF9B3; Fri, 31 Dec 2021 23:04:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Fri, 31 Dec 2021 15:04:00 -0800 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: git: 5e6a2d6eb220 - main - Reapply: move libc++ from /usr/lib to /lib [add /usr/lib/libc++.so.1 -> ../../lib/libc++.so.1 ?] Content-Language: en-US To: Mark Millard Cc: Dimitry Andric , Ed Maste , freebsd-current , "dev-commits-src-main@freebsd.org" References: <45118DB4-F8C4-4F96-9CAA-5DC5DCFFEB7E@yahoo.com> <3140C5F6-495F-441C-AA6B-542F3BC53B62@yahoo.com> <5F8AF0B2-3AF3-4BE4-B5D1-9030F2605FFD@yahoo.com> <5a24eb16-078f-15c5-dcd4-ecef33d15ac7@FreeBSD.org> <03AF30DA-A632-4223-908C-9F5250D82079@yahoo.com> <76FC7AFB-DA78-4A44-BC74-4477C9E11413@yahoo.com> From: John Baldwin In-Reply-To: <76FC7AFB-DA78-4A44-BC74-4477C9E11413@yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640991842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2/1TwgQsLNSLvL+0xhpx/h2/bbRy03NSR0LoHMNKldo=; b=CVfXASH+sVXPL3A7IvWUHKJqA72b5w1mKI4vsgsPpaqmkBR+CeJ5ebHyNGppKifupT17TK KVb0PYAPtwzh0hEiiwBqb6bj+VM2Rd3MbRSmpD/bySJzfynCpAo6XUyXPcXIILZG3oqUBp s2QxPl77+4c6JxNVwuFrz8DOweklY04dBkPu+4mjT0N5Jkw4KlNGy2zj4Gt996TIaY0h/j u9G0rvHd/WSG1+nEkGguekmosktzQPQDOf9UxnDXhawbaPUyba4QrOuBmXb1VnI2AnQyIZ UIi3JWYyWY6piQ3KwW+pPb+OjjhXLi5+aonvlnPi28Xf/FlJJoLRKiozdw0Ctg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640991842; a=rsa-sha256; cv=none; b=vfGlfa2QTMnbuIdo1F08aKZTqFDzmdDKZrTcirpVU/PRkwAeuIGN1A9jyfiENBPnh535jn J6Ysj4ffDkNNclRY4LY7uffspX6W3uB1kZCMnQCDj7b56ec84cxsfXOGZ/to2SPfRZFM/A SLsKsy575ZM5LmpDH0Pd9u8kuu6MeZc+drPbnQ5IGfjGdKSk7qZe6raGuRpkujPqW4KUAx yU7MyaM3+iyofZiR6TPt45OiA2VB7+n/ewgInoTqvDjuDyjDu8Tu6Ry9FKipXLQCknw/Be ih8shuVZ/gtprQf/W4KmUt8Oam/zSn9y1vYMO9992Gx2gN33DFdymfSL2PcwoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 12/31/21 2:59 PM, Mark Millard wrote: > On 2021-Dec-31, at 14:28, Mark Millard wrote: > >> On 2021-Dec-30, at 14:04, John Baldwin wrote: >> >>> On 12/30/21 1:09 PM, Mark Millard wrote: >>>> On 2021-Dec-30, at 13:05, Mark Millard wrote: >>>>> This asks a question in a different direction that my prior >>>>> reports about my builds vs. Cy's reported build. >>>>> >>>>> Background: >>>>> >>>>> /usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/lib/libc++.so:GROUP ( /lib/libc++.so.1 /usr/lib/libcxxrt.so >>>>> and: >>>>> lrwxr-xr-x 1 root wheel 23 Dec 29 13:17:01 2021 /usr/lib/libcxxrt.so -> ../../lib/libcxxrt.so.1 >>>>> >>>>> Why did libc++.so.1 not get a: >>>>> >>>>> /usr/lib/libc++.so.1 -> ../../lib/libc++.so.1 >>>> I forgot to remove the .1 on the left hand side: >>>> /usr/lib/libc++.so -> ../../lib/libc++.so.1 >>> >>> Because for libc++.so we don't just symlink to the current version of the library >>> (as we do for most other shared libraries) to tell the compiler what to link against >>> for -lc++, instead we use a linker script that tells the compiler to link against >>> both of those libraries when -lc++ is encountered. >> >> A better identification of what looks odd to me is the >> path variations in: >> >> # more /usr/lib/libc++.so > > Another not great day on my part: That path alone makes > the mix of /lib/ and /usr/lib/ use involved, given the > reference to /lib/libc++.so.1 . That would still be true > if the other path had been /lib/libcxxrt.so . /usr/lib/libc++.so is only used by the compiler/linker when linking a binary. The resulting binary has the associated paths (/lib/libc++.so.1 and /usr/lib/libcxxrt.so.1) in its DT_NEEDED. So it is fine for the .so to be in /usr/lib. This is the same with /usr/lib/libc.so vs /lib/libc.so.7. However, your point about libcxxrt.so.1 is valid. It needs to also be moved to /lib if libc++.so.1 is moved to /lib. Doing so will also require yet another depend-clean.sh fixup (well, probably just adjusting the one I added to check the libcxxrt path instead of libc++ path). -- John Baldwin