>Number:         6603
>Category:       system
>Synopsis:       parallel build fails for csh
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Fri May 13 19:50:01 GMT 2011
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
        "make -j2" in /usr/src/bin/csh fails due to missing dependencies
        on generated header files const.h and error.h.
>How-To-Repeat:
        $ cd /usr/src/bin/csh
        $ make -j2
        --- char.o ---
        --- const.o ---
        --- char.o ---
        cc -O2 -I/usr/src/bin/csh -I. -DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS  
-Werror   -c char.c
        --- const.o ---
        cc -O2 -I/usr/src/bin/csh -I. -DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS  
-Werror   -c const.c
        In file included from const.c:37:0:
        csh.h:87:19: fatal error: const.h: No such file or directory
        compilation terminated.
        *** [const.o] Error code 1
        1 error

        make: stopped in /usr/src/bin/csh

        (There may be slight differences as I'm reporting this from a
        Debian system.)

        This doesn't happen in non-parallel mode as alloc.o does depend
        on const.h and error.h, and normally gets built first.

        It also doesn't happen if "make depend" is run beforehand, but
        I think explicit dependencies would still be a good idea.
>Fix:
        With the exception of char.c, all csh sources include csh.h,
        which in turn includes const.h and error.h, so a simple fix is
        to make all ${OBJS} depend on them as well:

--- src/bin/csh/Makefile~
+++ src/bin/csh/Makefile
@@ -38,6 +38,6 @@
            sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
            sort >> $@
 
-.depend alloc.o: const.h error.h 
-
 .include <bsd.prog.mk>
+
+.depend ${OBJS}: const.h error.h 


>Release-Note:
>Audit-Trail:
>Unformatted:

Reply via email to