I build and install my FreeBSD 14.1-stable machine usually with "WITHOUT_TOOLCHAIN=yes" because it is 3 times faster and the toolchain don't changes often. Since some month it failed in `make installworld' (cd /home/projects/freebsd-src/lib/libc/tests/ssp && DEPENDFILE=.depend.h_raw NO_SUBDIR=1 make -f /home/projects/ freebsd-src/lib/libc/tests/ssp/Makefile _RECURSING_PROGS=t PROG=h_raw install) install -s -o root -g wheel -m 555 h_raw /usr/tests/lib/libc/ssp/h_raw install: h_raw: No such file or directory *** Error code 71 how to repeat: -------------------------------------- !/bin/sh PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin"; export PATH cd /usr/src rm -rf /usr/obj make -j $(nproc) "WITHOUT_TOOLCHAIN=yes" buildworld make -j $(nproc) buildkernel installkernel make "WITHOUT_TOOLCHAIN=yes" installworld --------------------------------------
The problem goes away if I revert 9e6098a91168e4c90f6d38295f2876fe0e0fe190 cd /usr/src git show 9e6098a91168e4c90f6d38295f2876fe0e0fe190 | patch -p1 commit 9e6098a91168e4c90f6d38295f2876fe0e0fe190 Author: Dimitry Andric <dim@FreeBSD.org> Date: Thu Apr 25 17:05:29 2024 +0200 Skip building libclang_rt when WITHOUT_CLANG is used As noted in bug 277096, when building a pkgbase repository using WITHOUT_CROSS_COMPILER and WITHOUT_TOOLCHAIN (which sets WITHOUT_CLANG), the following residual files are left over: /usr/lib/clang/18/lib/freebsd/libclang_rt.asan-x86_64.so /usr/lib/clang/18/share/asan_ignore_list.txt /usr/lib/clang/18/share/cfi_ignore_list.txt /usr/lib/clang/18/share/msan_ignore_list.txt This is because the lib/libclang_rt directory is still descended into, even if WITHOUT_CLANG is used. Fix it by not descending into the libclang_rt directory in that case. PR: 277096 Reported by: Siva Mahadevan <me@svmhdvn.name> MFC after: 3 days (cherry picked from commit 514773a5486d1fa4f2d5acb5af1766965c20765b)
I see that `make buildworld' detects a problem, ignore it and reports success --- all_subdir_lib --- --- all_subdir_lib/libc/tests/ssp --- ===> lib/libc/tests/ssp (all) make[6]: "/usr/src/lib/libc/tests/ssp/Makefile" line 40: Could not find runtime library /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/clang/18/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a, skipping h_raw However, `make installworld' expect that everything was build successfully. I see two possible solutions. if `make buildworld' detects an error, it should failed with non-zero exit status make installworld needs to implement the same logic to ignore the error as buildworld does.
I believe I fixed this in main with 8164d511d6a6053df82911e7d4ebb34fff3d765c and the follow-up da925fcebf397cc3bfc74b7aa9757efd6231aa00.
(In reply to Mark Johnston from comment #3) The error goes away if I apply 8164d511d6a6053df82911e7d4ebb34fff3d765c and da925fcebf397cc3bfc74b7aa9757efd6231aa00 to the stable/14 branch. Can we do a MFC please? Thanks!
(In reply to Wolfram Schneider from comment #4) Done: https://cgit.freebsd.org/src/commit/?id=4ea42d9d468b9ce25871190229b3f0cae69ac909 https://cgit.freebsd.org/src/commit/?id=a3e706fd422ae1b213bad5834b703cb48b07b691