Bug 280192 - `make installworld' failes with: install: h_raw: No such file or directory
Summary: `make installworld' failes with: install: h_raw: No such file or directory
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Mark Johnston
URL:
Keywords:
Depends on: 203094
Blocks:
  Show dependency treegraph
 
Reported: 2024-07-08 14:22 UTC by Wolfram Schneider
Modified: 2024-07-14 16:44 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schneider freebsd_committer freebsd_triage 2024-07-08 14:22:59 UTC
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
--------------------------------------
Comment 1 Wolfram Schneider freebsd_committer freebsd_triage 2024-07-08 14:25:56 UTC
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)
Comment 2 Wolfram Schneider freebsd_committer freebsd_triage 2024-07-08 14:30:15 UTC
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.
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2024-07-12 17:36:47 UTC
I believe I fixed this in main with 8164d511d6a6053df82911e7d4ebb34fff3d765c and the follow-up da925fcebf397cc3bfc74b7aa9757efd6231aa00.
Comment 4 Wolfram Schneider freebsd_committer freebsd_triage 2024-07-13 08:27:44 UTC
(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!