Bug 702364

Summary: Parallel make fails due to missing make dependency on echogs
Product: Ghostscript Reporter: Benno Fünfstück <ghostscript>
Component: Build ProcessAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 9.50   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---

Description Benno Fünfstück 2020-04-26 15:10:26 UTC
Similar to https://bugs.ghostscript.com/show_bug.cgi?id=695491, on Ghostscript 9.50, the following error happens nondetermistically when using parallel make:

    ...
    cp ./obj/gdevp14_0.o ./obj/gdevp14.o
    cp ./obj/gsicc_lcms2_1.o ./obj/gsicc_lcms2.o
    cp ./obj/gsicc_create_1.o ./obj/gsicc_create.o
    cp ./obj/szlibc_1.o ./obj/szlibc.o
    cp ./obj/szlibe_1.o ./obj/szlibe.o
    cp ./obj/gdevfpng_1.o ./obj/gdevfpng.o
    cp ./obj/gdevgprf_1.o ./obj/gdevgprf.o
    ./obj/aux/echogs -e .dev -w- -l-dev -b -s -l-include -l./obj/page -l-obj ./obj/bj10v ./obj/gdev10v.o ./obj/gdevprn.o
    /nix/store/qa79fvrbxrgxx9pl1yqjmv82183z6n4s-bash-4.4-p23/bin/bash: ./obj/aux/echogs: No such file or directory
    make: *** [contrib/contrib.mak:1041: obj/bj10v.dev] Error 127

The full log (https://nix-cache.s3.amazonaws.com/log/cipfiqfzmvw01j53kj6nfcwhzx6fhrhm-ghostscript-9.50.drv) shows that `obj/aux/echogs` has not been built at that point.

The reason is the following rule in `contrib/contrib.mak`, which calls `$(SETPDEV)` (expanding to echogs), does not depend on the echogs executable:

$(DD)bj10v.dev : $(bj10v_) \
                           $(CONTRIB_MAK) $(MAKEDIRS)
        $(SETPDEV) $(DD)bj10v $(bj10v_)

This issue does not only affect bj10v, but also a lot of other rules in contrib/contrib.mak which call SETPDEV.
Comment 1 Chris Liddell (chrisl) 2020-04-27 11:49:14 UTC
Fixed (hopefully) in:

http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=1b4c3669a20c


Thanks for reporting that.