Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Apr 2025 09:05:47 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        toolchain@freebsd.org
Subject:   Re: c++ error when trying to build releng/14.2 on 'main' host
Message-ID:  <a363b152-d59f-4532-9766-552fe600765f@FreeBSD.org>
In-Reply-To: <c0188a88-2cb2-4df8-b14e-e205729dfe9a@FreeBSD.org>
References:  <c92f6024-15d2-4b8f-88c5-0009da03d2f7@FreeBSD.org> <CALH631=19GcN0fED8hJswiXTKwyyJJJHHbeufNbkvF%2BHHU56Pw@mail.gmail.com> <32668b30-726c-4d38-aaab-bba480558e57@freebsd.org> <08C3C7A9-5378-4B72-8F30-C253CF6D4B55@FreeBSD.org> <954033b4-3f8d-4683-97c2-f0ce75eecf47@FreeBSD.org> <1f477096-9f1f-442c-8165-733e0f2f5b4f@FreeBSD.org> <c0188a88-2cb2-4df8-b14e-e205729dfe9a@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

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


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a363b152-d59f-4532-9766-552fe600765f>