Bug 252910 - world/kernel build error in svn 369076
Summary: world/kernel build error in svn 369076
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.2-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-22 10:05 UTC by Jordan Ostreff
Modified: 2021-01-22 16:28 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Ostreff 2021-01-22 10:05:04 UTC
When executing building world/kernel toward mentioned svn release 369076 with "make buildworld && make buildkernel && make installkernel && make installworld && mergemaster" error occurs:

cc  -O2 -pipe -fno-common -I. -I/usr/src/usr.bin/localedef -I/usr/src/lib/libc/locale -I/usr/src/lib/libc/stdtime  -g -MD  -MF.depend.wide.o -MTwide.o -std=gnu99 -Wno-format-zero-length  -Qunused-arguments  -I/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include -c /usr/src/usr.bin/localedef/wide.c -o wide.o
cc -O2 -pipe -fno-common -I. -I/usr/src/usr.bin/localedef -I/usr/src/lib/libc/locale -I/usr/src/lib/libc/stdtime -g -std=gnu99 -Wno-format-zero-length -Qunused-arguments -I/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include  -static  -L/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/lib -o localedef.full charmap.o collate.o ctype.o localedef.o messages.o monetary.o numeric.o parser.o scanner.o time.o wide.o  -legacy
objcopy --only-keep-debug localedef.full localedef.debug
objcopy --strip-debug --add-gnu-debuglink=localedef.debug  localedef.full localedef
sh /usr/src/tools/install.sh  -s -o root -g wheel -m 555   localedef /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin/localedef
sh /usr/src/tools/install.sh  -o root -g wheel -m 444  localedef.debug /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/lib/debug/usr/bin/localedef.debug
mkdir -p /usr/obj/usr/src/amd64.amd64/tmp/usr /usr/obj/usr/src/amd64.amd64/tmp/lib/casper /usr/obj/usr/src/amd64.amd64/tmp/lib/geom
mtree -deUW -f /usr/src/etc/mtree/BSD.usr.dist  -p /usr/obj/usr/src/amd64.amd64/tmp/usr >/dev/null
mtree -deUW -f /usr/src/etc/mtree/BSD.include.dist  -p /usr/obj/usr/src/amd64.amd64/tmp/usr/include >/dev/null
ln -sf /usr/src/sys /usr/obj/usr/src/amd64.amd64/tmp
mtree -deUW -f /usr/src/etc/mtree/BSD.debug.dist  -p /usr/obj/usr/src/amd64.amd64/tmp/usr/lib >/dev/null
cd /usr/src; MACHINE_ARCH=amd64  MACHINE=amd64  CPUTYPE=native CC="cc -target x86_64-unknown-freebsd12.2 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" CXX="c++  -target x86_64-unknown-freebsd12.2 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin"  CPP="cpp -target x86_64-unknown-freebsd12.2 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin"  AS="as" AR="ar" LD="ld" LLVM_LINK=""  NM=nm OBJCOPY="objcopy"  RANLIB=ranlib STRINGS=  SIZE="size"  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin  SYSROOT=/usr/obj/usr/src/amd64.amd64/tmp make  -f Makefile.inc1  BWPHASE=cleanobj  DESTDIR=/usr/obj/usr/src/amd64.amd64/tmp _cleanobj_fast_depend_hack
>>> Deleting stale dependencies...
/bin/sh: Syntax error: end of file unexpected (expecting "fi")
*** Error code 2
*** Error code 1
*** Error code 1
Comment 1 Kristof Provost freebsd_committer 2021-01-22 10:09:55 UTC
That may be my fault. 

Can you test if this patch fixes it:

diff --git a/Makefile.inc1 b/Makefile.inc1
index ca842d182af2..86b9de6d1826 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1005,9 +1005,9 @@ _cleanobj_fast_depend_hack: .PHONY
 .for f in pf_ruleset
        @if [ -e "${OBJTOP}"/sbin/pfctl/.depend.${f}.o ] && \
            egrep -qw "sys/netpfil/pf/${f}.c" \
-           "${OBJTOP}"/sbin/pfctl/.depend.${f}.o; then
-                       echo "Removing old ${f} dependency file"
-                       rm -rf "${OBJTOP}"/sbin/pfctl/.depend.${f}.o
+           "${OBJTOP}"/sbin/pfctl/.depend.${f}.o; then \
+                       echo "Removing old ${f} dependency file" \
+                       rm -rf "${OBJTOP}"/sbin/pfctl/.depend.${f}.o \
        fi
 .endfor
Comment 2 commit-hook freebsd_committer 2021-01-22 16:27:59 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=5511192538198cf1d5d3a9b3ab802f2af59c798e

commit 5511192538198cf1d5d3a9b3ab802f2af59c798e
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2021-01-22 16:24:07 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2021-01-22 16:25:38 +0000

    Fix dependency cleanup hack for pf_ruleset.c

    In 4046f57601eaa0bcd1ec8496e1280939b948aa46 we added a dependency
    cleanup to cope with the pf_ruleset.c changes.

    This commit failed to include '; \' at the end of the shell lines in the
    make target, causing build failures.

    PR:             252910

 Makefile.inc1 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)