From nobody Fri Apr 11 09:29:22 2025 X-Original-To: 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 4ZYrx04mS0z5svVH for ; Fri, 11 Apr 2025 09:29:24 +0000 (UTC) (envelope-from avg@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZYrx03hGXz3Vc4; Fri, 11 Apr 2025 09:29:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1744363764; 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:autocrypt:autocrypt; bh=iASWEPaEtM4rueE+7WAGUaQrAjtfaJa1P8CS1H4wdrE=; b=jGd7vyzLqKQpJ6vAc5n+rlQrmcIq+RXKnJZNNfrW4HhKaofaWhYWEuvE+Qzx52YrqjBUBF 9XbQzmJvfo2L//QGUOT6kIGqNdWujjf0pKDRIpWyuA5z/V9rPGipicekwikz/YI1pwzyTF oVdApkHGqmviVfH2HkANPyJFCu8TCPO7XOORHfukL+auWVIJT/HkPVVPTDFcOFgTh8LIDX KXEQFziit32fcR7qxqsIczMFWrpDtHPAnbpUkhhCyxnEdvyydY2XLjB2LudFYtPiERV8WW CgqzVEwE3Rh+Bj233obzoCSXrr9y8s2Qpl2UAUSJjPeUWwga2Ej2Q5yA6KxqsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1744363764; a=rsa-sha256; cv=none; b=a1PgMzEEJ9IYF1OA3BxZPNmmGsePql41HIu22b3AOx+E0Yx8DNljBnfAyXLf+IUx1/gT+D b6P5QEW6JN+F/dO26BJ6TDw1TcsRZaQ5bEQC+whcRJXs4JoAQcPk4uErgYIBpu7wcDpUxq wlGMGiIEo3aUOCxkAjmpFcqoxJGBPq7LgYhBNA5Z6ZnkatI53Jd34eZmE6XzSWd7mMtT84 cUx/268NzBixaflyB+LXWEyyXhefHWy4IsEh67sEDnd+Qxm+DozuPD0FKlGusuf0GgiiiM X2rmCDdMHbL+BOdwyoYTKmZheLp7ohKBxtug1Rd65NqIvagx/gexujw+TgoQLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1744363764; 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:autocrypt:autocrypt; bh=iASWEPaEtM4rueE+7WAGUaQrAjtfaJa1P8CS1H4wdrE=; b=NJY9OT0pmdX1PdFsJeTZ6Ru07BusVaBxhIjPRdZsuBGJwXbpYGPpE9Nm+d1RQK2yX9u11y KkL6vZq0G45O6nmYlFkjCs5vpNuEYphKfy+zt9ItPuCoXyrSrvV4w4wmuZZmUCJtVcAHmt MAHW2jgp8MPZF1m4YfQ7cAj9jUbPfXBX64NOxz/7rT+OO8ZXaqad11eVUHEYeoQ6Age9Xc Ydab5TZonigjstZyGPIpCtfjESgvw8qw5gFzaUZe1anmiDfiI/rB5cJDxvHmQCeqM0RHmS sn+4NH20bXWlFOrzZa93PvfjqEJoSSf2fnfitoIXZAKKma+sPN3RnzhDXPXCJA== Received: from [192.168.0.88] (unknown [93.188.39.137]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZYrx00KQlz9Wb; Fri, 11 Apr 2025 09:29:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <058958c0-9024-4444-846c-7255cd367ea2@FreeBSD.org> Date: Fri, 11 Apr 2025 12:29:22 +0300 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 Thunderbird Subject: WITHOUT_CLANG + WITH_CLANG_BOOTSTRAP seems to be broken Content-Language: en-US References: From: Andriy Gapon Autocrypt: addr=avg@FreeBSD.org; keydata= xsDNBGcKrHEBDADRvwQOK0b/yo4ys5cs6bOQMhEh4xtfbaZ/CU00cpPgUip3sOZCdrtMWlRC g25z97prxE9pKueZi+HXDhIPpa9xl14ghqF4oYScuJ1i18HyiOH2y5Q3Vv/TtFiSzicd3EAu QgS3jVidpgDSPDdj2Yz3UxYpZ+PuFl6nOnvCvqOFcjUlzKCyPaiN2b86l1Nscmhnc+zQ/faB erUOEFEDQbWMA5YfXi8HrbeR16hfRfGt7E0aMDlIj9FIPIq71UWMN9CimPgs4+rbNr1MAlLa z4GxSDhVYZEY5rqtCzr+PLXboRQWnaUwXl0/biw9enf17NHdYv1SNAFTX2eC4dZ3qBVI74dS PgNprm+PMfz+6Hhs/dAv+Nan5nVhg3EFIjYTiy0MnjMSq8uI0v0ykpAGAcJJ5xl6d23aLxgN 6f0z6pJRCO0hGPgU7UzvFD0MxJxmbzqdT1R51KDan1oD41b+tjl2LMBuCDCoB0U44Pu0zLdp xMfFTxCXtwIYKIUxwd28jwMAEQEAAc0eQW5kcml5IEdhcG9uIDxhdmdARnJlZUJTRC5vcmc+ wsENBBMBCAA3FiEEmXvSmjiQFHPVOpLnzDOt5NLj67sFAmcKrHEFCQeEzgACGwM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LNcmbOvuu1TEXBJhjQARAQAB wsD8BBgBCAAmFiEEmXvSmjiQFHPVOpLnzDOt5NLj67sFAmcKrHMFCQeEzgACGwwACgkQzDOt 5NLj67sUCAv5AXqgWnYN9EblapMbZjkiqL8pZQ0GNqh+Pg9FwbyULxjtRTO6rD4D0IxizByb ef+neeUNyYlagt5nfKMysEr0SU/gHKCi8vyTF/63ukMrGUNGmJJxrndl5ZYKC6j6eX7twrZF L1Uvlmn6FnQ22red5kHO93fDjG4zaDIZvHfwj7kzjZ4tpC7Byinf88s14mdZeScc0PnU2hj4 UGYju/wg2FF4YxaZYhcmdTiRYY0Wx85XSMZv19pnn78sadEuRvfRd4JTmw++j1xGXeqQGWzz /CTG5/Ex9GAkQ02hZbmi236byDXoet4G8TEyOph9QFVkV9bNd0jQZaFZPGEj4PSPUYGAF7s5 xJaNGgctC3aZ7WjEv1FBoo44XCU4xcjJ1wZQUrHxRhx6TW0Jtcl0U9qfKFW30TSPo6RyiXuj X4ltWKAtjoXB8nUmEJckaz7IRu2b4pXDeazZuz5JBygUs10yJjDxh2vFQZo0KaBAPx9MZlPn gpPTjT15L8xGftEjQXF6 To: FreeBSD Current Cc: Alex Richardson In-Reply-To: X-Forwarded-Message-Id: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I think that WITHOUT_CLANG + WITH_CLANG_BOOTSTRAP (the latter is the default and doesn't need to be explicit) is supposed to work. I think that the combination should result in building clang as a cross-tool for the rest of the build, but not building clang for the target. However, it seems that the combination is broken at the moment in that the cross-tool clang is not getting built and the host clang gets used for the build. I have recently discovered this issue while trying to build releng/14.2 on a main (aka 15-CURRENT) host with WITHOUT_CLANG in src.conf. Host and target architectures are the same, amd64. 14.2 has clang 18 as a compiler, while main has clang 19. The same problem exists for WITHOUT_TOOLCHAIN as well. I think that this used to work. Or maybe I was just lucky and the compilers were either the same or sufficiently compatible that the host compiler could compile the branch code. I think that .if ${MK_CLANG} != "no" SUBDIR+= clang .endif in usr.bin/clang/Makefile is the reason why the cross-tool clang is not built when WITHOUT_CLANG is set. A bit more of info is in the forwarded message and the thread to which it belongs. What's curious is that those lines are there since commit 8e1c989abbd1db4 "Don't build and install {llvm,clang,lldb}-tblgen for the target", but I only noticed the problem a few days ago. And apparenlty nobody else has seen it. I'd imagine that the reported configuration is not too exotic. So, not sure what and when get broken. It could also be something with my build environment... -------- Forwarded Message -------- Subject: Re: c++ error when trying to build releng/14.2 on 'main' host Date: Thu, 10 Apr 2025 09:05:47 +0300 From: Andriy Gapon To: Dimitry Andric CC: toolchain@freebsd.org On 09/04/2025 8:28 pm, Andriy Gapon wrote: > What's interesting is that I saw this during the build (make with -s option): > -------------------------------------------------------------- > >>> stage 3: cross tools > -------------------------------------------------------------- > ===> lib/clang (obj,all,install) > ===> lib/clang/libllvm (all) > ===> lib/clang/libllvm (install) > ===> usr.bin/clang (obj,all,install) > ===> usr.bin/clang/lld (obj,all,install) When I compared this to other builds, I noticed a missing bit: ===> usr.bin/clang/clang (all) ===> usr.bin/clang/clang (install) usr.bin/clang/Makefile has this near the top: .if ${MK_CLANG} != "no" SUBDIR+= clang .endif If I read this right, it means that the actual clang is not built/installed if WITHOUT_CLANG is configured. Even in the cross-tools stage! I am not sure how it worked before as I do not see any recent changes in that direct area. Not sure when and what went wrong. Maybe it's something in one of .mk include files, maybe something in my environment. As hack I tried this change and it seems to have helped: --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -787,6 +787,7 @@ # TOOLS_PREFIX set in BMAKE XMAKE= ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + MK_CLANG=${MK_CLANG_BOOTSTRAP} \ MK_LLDB=no \ MK_LLVM_BINUTILS=no \ MK_TESTS=no I hope that more knowledgeable people can see what the problem could be, wherever it is. > ===> lib/libelftc (obj,all,install) > ===> lib/libpe (obj,all,install) > ===> usr.bin/elfctl (obj,all,install) > ===> usr.bin/elfdump (obj,all,install) > ===> usr.bin/objcopy (obj,all,install) > ===> usr.bin/nm (obj,all,install) > ===> usr.bin/size (obj,all,install) > ===> usr.bin/strings (obj,all,install) > ===> usr.bin/addr2line (obj,all,install) > ===> cddl/lib/libctf (obj,all,install) > ===> cddl/lib/libspl (obj,all,install) > ===> cddl/usr.bin/ctfconvert (obj,all,install) > ===> cddl/usr.bin/ctfmerge (obj,all,install) > ===> stand/usb/tools (obj,all,install) -- Andriy Gapon