| Summary: | /usr/bin/rs compile fails after udate to c++ | ||
|---|---|---|---|
| Product: | Base System | Reporter: | rkoberman |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Some People | CC: | dan.kotowski, devel, herbert, jhb, lwhsu, me, sjg, swills, wosch |
| Priority: | --- | ||
| Version: | CURRENT | ||
| Hardware: | amd64 | ||
| OS: | Any | ||
|
Description
rkoberman
2022-11-19 23:53:49 UTC
Is your src checkout in sync and clean? What's the output of git rev-parse HEAD git status git diff in src? uname -a? (In reply to Herbert J. Skuhra from comment #1) # git rev-parse HEAD 424bf1d5ca5bdba0597b546ec3931eb05bfabcab # git status On branch main Your branch is up to date with 'origin/main'. nothing to commit, working tree clean # git diff # Do you build with NO_CLEAN/WITHOUT_CLEAN? Does it work if you run: cd /usr/src/usr.bin/rs make cleandir or wipe /usr/obj? Here it works: --- rs.o --- c++ -target x86_64-unknown-freebsd14.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -fno-common -fPIE -mretpoline -MD -MF.depend.rs.o -MTrs.o -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-variable -Qunused-arguments -fPIE -mretpoline -Wno-c++11-extensions -c /usr/src/usr.bin/rs/rs.cc -o rs.o (In reply to Herbert J. Skuhra from comment #3) Build was "nice make -j12 buildworld" Did not delete existing /usr/obj. Since last update on 11/8, I just did: # git pull --ff-only # nice make -j12 buildworld Today, after cleandir in usr.bin/rs, I did: # make -j12 -DNO_CLEAN buildworld This completed successfully. No idea what the cleandir did, bur some depend or config file must have survived the cleaning in the initial buildworld. Unless there are additional reports in the next day or two, I'll close the ticket. I saw the same bug yesterday. 1) Get the fresh tree to the new dir /usr/src: git clone --branch main https://git.FreeBSD.org/src.git /usr/src 2) make buildworld 3) stop at No such file or directory: '/usr/src/usr.bin/rs/rs.c 4) /usr/src/usr.bin/rs # make clean ===> tests (clean) rm -f rs_test rs_test.tmp Kyuafile Kyuafile.tmp rm -rf checkdir rm -f rs.o rs.bc rs.ll rs.full.bc rs.full.ll rs rs.bc rs.ll rs.full rs.debug rs.o rs.bc rs.ll rs.1.gz rs.1.cat.gz 5) make -DNO_CLEAN buildworld and world built successfully. So it's no relation with old builds, because it was first build in fresh /usr/src. (In reply to devel from comment #5) Doing a fresh git clone doesn't ensure that /usr/obj is empty. The only way make(1) could possibly know to look for rs.c is if it found a generated .depend file in /usr/obj that contained a reference to rs.c. One question though is if you are using meta mode by chance? I don't know if somehow the implicit SRCS breaks. bsd.prog.mk has logic to assume <foo>.cc instead of <foo>.c for the default value of SRCS if PROG_CXX is used instead of PROG. I see a somewhat dubious check for PROG_CXX (seems like it should be checking something else?) in local.dirdeps.mk, but aside from that I can't see any way that make would think the implicit source was rs.c instead of rs.cc. (In reply to John Baldwin from comment #6) Re meta mode; I don't think so, the build log would contain only `Building ${OBJDIR}/rs.o` all the detailed info would be in `rs.o.meta` The errors would of course be repeated in the log too, but it would look quite different. As for `local.dirdeps.mk` that is only relevant when using MK_DIRDEPS_BUILD=yes which is not the case for targets like `buildworld` *** Bug 268414 has been marked as a duplicate of this bug. *** I had the same problem when I upgraded an older FreeBSD 14-current machine from September. The solution was to remove /usr/obj cd /usr/src/usr.bin/rs make cleandir make cd /usr/src make -DNO_CLEAN buildworld -- Does the trick... however, "make install" did not finish yet : ) [root@x /usr/src] cd /usr/src/usr.bin/rs [root@x /usr/src] make cleandir [root@x /usr/src] make [root@x /usr/src] cd /usr/src [root@x /usr/src] make -DNO_CLEAN buildworld [root@x /usr/src] # uname -a FreeBSD x.y.z 14.0-CURRENT FreeBSD 14.0-CURRENT #34 main-n258976-93381ae06bb0: Wed Nov 2 11:30:41 MSK 2022 ... [root@x /usr/src] # make buildkernel KERNCONF=CUSTOMx && make installkernel KERNCONF=CUSTOMx && make installworld && reboot ... (no mergemastering, cause UPDATING says nothing) [root@x ~]# uname -a FreeBSD x.y.z 14.0-CURRENT FreeBSD 14.0-CURRENT #35 main-n259865-b079ca8593ed: Tue Dec 27 18:32:34 MSK 2022 root@x.y.z:/usr/obj/usr/src/amd64.amd64/sys/CUSTOMx amd64 [root@x ~]# ---- It worked fine (In reply to Alex.V from comment #11) dirty copy-paste, sorry After more investigating, I think the case that was broken was doing a 'make buildworld' without NO_CLEAN=yes after a different commit I made to make MK_CXX conditional on bsd.compiler.mk. The issue was kind of the inverse of b9cb80883bce6dc992cf05ae2e59089a60d311ec. Same issue, but applied to the !NO_CLEAN case. It has been rendered OBE though by the removal of the MK_CXX option in ac4c695ad61e81d00cff2a03202a4afe94a92513. MARKED AS SPAM MARKED AS SPAM |