NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/58771: missing dependency breaks parallel build



>Number:         58771
>Category:       toolchain
>Synopsis:       missing dependency breaks parallel build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 22 18:30:00 +0000 2024
>Originator:     Thomas Klausner
>Release:        NetBSD 10.99.12
>Organization:

>Environment:
	
	
Architecture: x86_64
Machine: amd64
>Description:
Sometimes, parallel builds fail because of:

--- /usr/obj/amd64.gcc.20240411/usr/include/krb5/krb5_asn1.h ---
*** Failed target: /usr/obj/amd64.gcc.20240411/usr/include/krb5/krb5_asn1.h
*** Failed commands:
        @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 ||  (${_MKSHMSG_INSTALL} ${.TARGET};  ${_MKSHECHO} "${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP}  -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}" &&  ${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP}  -m ${NONBINMODE} ${.ALLSRC} ${.TARGET})
        => @cmp -s krb5_asn1.h /usr/obj/amd64.gcc.20240411/usr/include/krb5/krb5_asn1.h > /dev/null 2>&1 ||  (echo '#  ' "install " /usr/obj/amd64.gcc.20240411/usr/include/krb5/krb5_asn1.h;  echo "/usr/obj/tools.gcc/bin/x86_64--netbsd-install  -N /usr/src/etc -c  -r -o root -g wheel  -m 444 krb5_asn1.h /usr/obj/amd64.gcc.20240411/usr/include/krb5/krb5_asn1.h" &&  /usr/obj/tools.gcc/bin/x86_64--netbsd-install  -N /usr/src/etc -c  -r -o root -g wheel  -m 444 krb5_asn1.h /usr/obj/amd64.gcc.20240411/usr/include/krb5/krb5_asn1.h)
*** [/usr/obj/amd64.gcc.20240411/usr/include/krb5/krb5_asn1.h] Error code 1
nbmake[4]: stopped in /usr/src/crypto/external/bsd/heimdal/lib/libasn1

Reading 'make -n includes' in src/crypto/external/bsd/heimdal/lib/libasn1, I see:

/usr/obj/tools/bin/nbasn1_compile                        --one-code-file                 --option-file=/disk/storage-202004/archive/foreign/src/crypto/external/bsd/heimdal/dist/lib/asn1/krb5.opt       /disk/storage-202004/archive/foreign/src/crypto/external/bsd/heimdal/dist/lib/asn1/krb5.asn1 krb5_asn1
/usr/obj/tools/bin/nbsed -E                                              -e 's,#include <(.*)_asn1\.h>,#include <krb5/\1_asn1.h>,'       2> /dev/null < krb5_asn1.hx > krb5_asn1.h
...
cmp -s krb5_asn1.h /usr/include/krb5/krb5_asn1.h > /dev/null 2>&1 ||  (echo '#  ' "install " /usr/include/krb5/krb5_asn1.h;  echo "/usr/obj/tools/bin/x86_64--netbsd-install  -N /disk/storage-202004/archive/foreign/src/etc -c  -r -o root -g wheel  -m 444 krb5_asn1.h /usr/include/krb5/krb5_asn1.h" &&  /usr/obj/tools/bin/x86_64--netbsd-install  -N /disk/storage-202004/archive/foreign/src/etc -c  -r -o root -g wheel  -m 444 krb5_asn1.h /usr/include/krb5/krb5_asn1.h)


I tried reading src/crypto/external/bsd/heimdal/Makefile.rules.inc but
I couldn't find the dependency that states that krb5_asn1.h is a file
that is generated by the (sed after the) nbasn1_compile command.

AFAICT, this is the block that's generating the header file:

.if exists(${src:.asn1=.opt})
${src:.asn1=.ts}: ${src} ${src:.asn1=.opt} ${TOOL_ASN1_COMPILE}
        @touch $@
        ${TOOL_ASN1_COMPILE}                    \
                ${ASN1_OPTS.${src}}             \
                --option-file=${.ALLSRC:[2]}    \
                ${.ALLSRC:[1]} ${src:.asn1=_asn1}
        @${TOOL_SED} -E                                                 \
            -e 's,#include <(.*)_asn1\.h>,#include <krb5/\1_asn1.h>,'   \
            2> /dev/null < ${src:.asn1=_asn1.hx} > ${src:.asn1=_asn1.h}
        @cmp -s ${src:.asn1=_asn1-priv.hx} ${src:.asn1=_asn1-priv.h}    \
            2> /dev/null ||                                             \
            cp ${src:.asn1=_asn1-priv.hx} ${src:.asn1=_asn1-priv.h}
.else
${src:.asn1=.ts}: ${src} ${TOOL_ASN1_COMPILE}
        @touch $@
        ${TOOL_ASN1_COMPILE}                    \
                ${ASN1_OPTS.${src}}             \
                ${.ALLSRC:[1]} ${src:.asn1=_asn1}
        @${TOOL_SED} -E                                                 \
            -e 's,#include <(.*)_asn1\.h>,#include <krb5/\1_asn1.h>,'   \
            2> /dev/null < ${src:.asn1=_asn1.hx} > ${src:.asn1=_asn1.h}
        @cmp -s ${src:.asn1=_asn1-priv.hx} ${src:.asn1=_asn1-priv.h}    \
            2> /dev/null ||                                             \
            cp ${src:.asn1=_asn1-priv.hx} ${src:.asn1=_asn1-priv.h}
.endif

and it only has the .ts file on the left hand side of the dependency.

>How-To-Repeat:
Run build.sh -j 16, be unlucky.
>Fix:
not provided.

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index