Current stable/14 source can't be build if you have following environment: CC=clang19 CXX=clang++19 CPP=clang-cpp19 Here is short output: -------------------------------------------------------------- >>> stage 4.3.1: building lib32 shim libraries -------------------------------------------------------------- mtree -deUW -f /usr/src/etc/mtree/BSD.lib32.dist -p /usr/obj/usr/src/amd64.amd64/tmp/usr >/dev/null mtree -deUW -f /usr/src/etc/mtree/BSD.lib32.dist -p /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/debug/usr >/dev/null cd /usr/src; WORLDTMP=/usr/obj/usr/src/amd64.amd64/tmp MAKEFLAGS="-m /usr/src/tools/build/mk -m /usr/src/share/mk" make -f Makefile.inc1 DESTDIR= OBJTOP=/usr/obj/usr/src/amd64.amd64/obj-lib32 OBJROOT='${OBJTOP}/' UNIVERSE_TOOLCHAIN_PATH= MAKEOBJDIRPREFIX= -DNO_LINT -DNO_CPU_CFLAGS MK_ASAN=no MK_CTF=no MK_RETPOLINE=no MK_SSP=no MK_UBSAN=no MK_WERROR=no _lc_build-tools cd /usr/src/lib/ncurses/tinfo; make DIRPRFX=lib/ncurses/tinfo/ build-tools cd /usr/src/lib/libmagic; make DIRPRFX=lib/libmagic/ build-tools clang19 -O2 -pipe -fno-common -DMAGIC='"/usr/share/misc/magic"' -DHAVE_CONFIG_H -I/usr/src/lib/libmagic -I/usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libmagic -I/usr/src/contrib/file/src -DNDEBUG -g -gz=zlib -MD -MF.depend.mkmagic -MTmkmagic -std=gnu99 -Wno-format-zero-length -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wdate-time -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Qunused-arguments -I/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include -DCOMPILE_ONLY -Wl,-zrelro -L/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/lib -o mkmagic /usr/src/contrib/file/src/apprentice.c /usr/src/contrib/file/src/cdf_time.c /usr/src/contrib/file/src/encoding.c /usr/src/contrib/file/src/funcs.c /usr/src/contrib/file/src/magic.c /usr/src/contrib/file/src/print.c -legacy /bin/sh: clang19: not found *** Error code 127 Stop. make[3]: stopped in /usr/src/lib/libmagic *** Error code 1 Stop. make[2]: stopped in /usr/src *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src root@classic:/usr/src # clang19 -v clang version 19.1.3 (https://git.freebsd.org/ports.git a34c378a051d3df7767855bb37fc359924f4dcc1) Target: x86_64-portbld-freebsd14.2 Thread model: posix InstalledDir: /usr/local/llvm19/bin
Setting CC/CXX/CPP to clang19 is not expected to work for buildworld. It might work if you set the full path, but the supported way is to set CROSS_TOOLCHAIN=llvm19 which sources /usr/local/share/toolchains/llvm19.mk in the right places. I'm not entirely sure why PATH is restricted this late in the build process, but clearly it is. All that being said, I'm not sure all the build fixes have been MFCd so the build may still fail.
(In reply to Brooks Davis from comment #1) Thanks for your answer. Actually this means that I must not set this variables in my environment, when I want to build world/kernel.
(In reply to Jordan Ostreff from comment #2) That is correct.