From nobody Wed May 31 09:06:54 2023 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 4QWNgp5RS9z4YMlQ for ; Wed, 31 May 2023 09:07:18 +0000 (UTC) (envelope-from dim@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 4QWNgp4rNqz3RH0; Wed, 31 May 2023 09:07:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685524038; 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: in-reply-to:in-reply-to:references:references; bh=UJE8h+xpt7XS1ew/ilSHMCU5ps5X5j1hL6+kwRTBk2A=; b=DxxMyMEi5n3H4udJtoWj5Gx96gWelqD73Jj4vZruUAAeJpgKOpqjQG+H3I692Rj66CM/h0 iRDllKKpmsztd4HGljCHfDoBGPq9VVI1gd9wQkcWGK7/qrlQYUOYT9Jcw50pECxiwOC168 n/MF9s+Ds52QzX4IbIUSqOdHAtChws5x4KovFt1HAoLQ4E9oDfW6frGMZ1TGvFh4+JgICP abxPqj1T7j1RlnTuA9IAWhvrXzLNm7nIKXLb7s1ij6RYa6XLzPD4F7iR4AOMGgPCr2l0/d 559Vg44pWFOu+qJzrgRrhKpa8PqAmZ7C71EqScbEAJzfszBTnoxnpmISaheG+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685524038; 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: in-reply-to:in-reply-to:references:references; bh=UJE8h+xpt7XS1ew/ilSHMCU5ps5X5j1hL6+kwRTBk2A=; b=Ehh53InBz0g782azmI1bsYMduDVeX02oHHCovra9c9n54QVkiUt8hu+zEeiBNmPeLjBffV 6YS53UWdVzYidycawn+xS4aERnXII1xd/eNj0HMhToBIy9Hnf0qSTouazV7SsCsYgIcuVf OEC5GKo0oeTwm8qRB8eiyNVSalNkP2hqZcH6pu5IRsB+Je/uddjdCK21dwvVkQOKxjEBLh PIkfEguR30kqdj+aaq1eMItaC0beKbgmh+VawSmIfdXwiIg36dzLbGaUYY2k8SJpODmOUE ckKkud7Ws5El39cbw/zM8nf4Gbe7AvoeuAEKXNJbqdzjZT1PmS6AKpIkILIEDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685524038; a=rsa-sha256; cv=none; b=jdEV6Rvw3QHFIKIQ2E+JEqyeKMY9eSj9QNV7Svp29RRHJSZYLcwVJ/I/ju2JkS7cPpuEHw Dw8zfUOiAl4PeA2S6Dlgpe1hjp+BiHMDNm6bLhIfbqBBwy2j1m72cCShDQmrleJpKsDMpD saNyjUYlEW4YhC3YEgzKX66akhcbdGZmakRuvnHd+Y4YxFuKDJ74NcNRMgo8xyizXYCYcZ LgWhg7nCv/ouTgOjRLROqeYpnim2miSgaBtq/MRSKwAzwRXBTw2Qa0D4Sxgyn3BImJuWg9 P/AgwfRd+NMthfTlk4/4QJ3FGqNQh+A75vt4f1eAmYUfypwTWUUeRCa/hY1qNg== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QWNgp32ydz12W0; Wed, 31 May 2023 09:07:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (92-111-45-100.static.v4.ziggozakelijk.nl [92.111.45.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DCF644282C; Wed, 31 May 2023 11:07:16 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_4608D242-A0FB-4C83-BF73-C11493593DAA"; protocol="application/pgp-signature"; micalg=pgp-sha1 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 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: "make hierarchy" from main tree breaks c++ headers on older branches with unclear errors if "make install world" is interrupted From: Dimitry Andric In-Reply-To: Date: Wed, 31 May 2023 11:06:54 +0200 Cc: FreeBSD Current Message-Id: <8CD00413-E6B3-4DBA-8A71-CAFA647DF2FF@FreeBSD.org> References: <0DA92266-62F8-439E-9C56-44106A6B0073@FreeBSD.org> To: Enji Cooper X-Mailer: Apple Mail (2.3731.600.7) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_4608D242-A0FB-4C83-BF73-C11493593DAA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 31 May 2023, at 01:07, Enji Cooper wrote: >=20 >> On May 28, 2023, at 3:53 AM, Dimitry Andric wrote: >> On 28 May 2023, at 07:18, Enji Cooper wrote: >>>=20 >>> I just tried to run =E2=80=9Cmake hierarchy=E2=80=9D from a main = tree on a 13.2-RELEASE system, and doing so completely broke my headers. >>> It took me about 30 minutes to figure out what happened=E2=80=A6 = /usr/include/c++/v1/__string was a header, whereas on :main it=E2=80=99s = a directory?! >>=20 >> Yes, upstream libc++ has split up large headers into multiple = components, in particular __string and __type_traits. >>=20 >> Since we had a file named __string, it had to be somehow replaced by = a directory. This is what the distrib-cleanup target in the top-level = Makefile does: >>=20 >> https://github.com/DimitryAndric/freebsd-src/commit/6b13b4a095e3 >>=20 >> Afterwards, the replacement directory named __string is created as = part of the regular mtree commands. >>=20 >>=20 >> ... >>> I reinstalled the headers by going to lib/libc++ in my releng/13.2 = tree, building, and installing all of the 13.2-RELEASE headers. >>> This change has been live for almost a year now on :main =E2=80=94 = is this a known caveat when doing a source-based upgrade from = 13.2-RELEASE* to 14.0-CURRENT, i.e., that the installworld (if = interrupted) could break the c++ compiler? >>=20 >> I think it should already be quite clear that interrupting = installworld is risky. If you were just in the middle of replacing libc = or rtld, and those were half-written, your system will be completely = hosed. (I am speaking from experience. :) The same goes for any system = headers or libraries, not only the C++ ones. If you have a = half-installed tree, it should not be used for anything except = attempting another installworld. >=20 > That=E2=80=99s a fair point, however, given that this follows the = standard installation workflow=E2=80=A6 > 1. etcupdate pre-run. > 2. install kernel > 3. reboot > 4. make installworld > 5. etcupdate post-run > =E2=80=A6 this could surprise end-users. In particular, the C++ = compiler will be broken between step 1 and step 4. How so? The deletion of the old __string file is done as part of = installworld, i.e. in step 4, not in any of the earlier steps. The only = case where you can have problems is when you start installworld, let it = run until it has completed its distrib-cleanup target, and then = interrupt it before it can install the new headers. -Dimitry --Apple-Mail=_4608D242-A0FB-4C83-BF73-C11493593DAA Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZHcOLgAKCRCwXqMKLiCW o5q1AJ0fT55YKDi0rZXKU1I/I+wJjp8Z7QCgkm+b/IZs0WPBSoXWNm4IcMpLsL4= =sBDQ -----END PGP SIGNATURE----- --Apple-Mail=_4608D242-A0FB-4C83-BF73-C11493593DAA--