Bug 695491

Summary: Problem with parallel make
Product: GhostPCL Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: PCL interpreterAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED FIXED    
Severity: normal CC: chris.liddell
Priority: P4    
Version: master   
Hardware: PC   
OS: All   
Customer: Word Size: ---

Description Marcos H. Woehrmann 2014-09-16 13:39:26 UTC
Running 'make pcl-debug -j12' on the current code occasionally results in the following error:

.
.
.
cp ./debugobj/libtiff_0.dev ./debugobj/libtiff.dev
./debugobj/aux/echogs -e .dev -a-  ./debugobj/pdfwrite ./debugobj/gdevpdfg.o
cp ./debugobj/pconf.h ./debugobj/pconfig.h
cp ./debugobj/pconf.h ./debugobj/pconfig.h
./debugobj/aux/echogs -e .dev -a-  ./debugobj/pdfwrite ./debugobj/gdevpdfi.o ./debugobj/gdevpdfj.o ./debugobj/gdevpdfk.o
cp: cannot create regular file `./debugobj/pconfig.h': File exists
./debugobj/aux/echogs -e .dev -a-  ./debugobj/pdfwrite ./debugobj/gdevpdfm.o
gcc -DDEBUG -ggdb -g3 -O0  -Wall -Wundef -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wwrite-strings -Wno-strict-aliasing -fno-builtin -fno-common -DH
AVE_MKSTEMP=1 -DHAVE_SSE2 -DHAVE_BSWAP32 -DHAVE_BYTESWAP_H -DHAVE_SYS_TIME_H=1 -DHAVE_FSEEKO -DHAVE_INTTYPES_H=1 -DHAVE_MKSTEMP64 -DHAVE_FILE64 -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned int"  -DPCL_INCLUDED   -I../pcl -I./debugobj -I../pl -I../gs/base -c ../pcl/pctop.c -o ./debugobj/pctop.o
make[2]: *** [debugobj/pxtop.o] Error 1
make[2]: *** Waiting for unfinished jobs....


I've looked into this and the problem is that building of both debugobj/plimpl.o and debugobj/pctop.o runs the command:

  cp ./debugobj/pconf.h ./debugobj/pconfig.h

and since these are built in parallel one of the copies fails.


Here's the relevant output from "make pcl-debug":

gcc -DDEBUG -ggdb -g3 -O0  -Wall -Wundef -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wwrite-strings -Wno-strict-aliasing -fno-builtin -fno-common -DHAVE_MKSTEMP=1 -DHAVE_SSE2 -DHAVE_BSWAP32 -DHAVE_BYTESWAP_H -DHAVE_SYS_TIME_H=1 -DHAVE_FSEEKO -DHAVE_INTTYPES_H=1 -DHAVE_MKSTEMP64 -DHAVE_FILE64 -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned int"  -DPCL_INCLUDED   -I../pl -I../gs/base -I../gs/devices -I./debugobj -c ../pl/plimpl.c -o ./debugobj/plimpl.o
cp ./debugobj/pconf.h ./debugobj/pconfig.h

gcc -DDEBUG -ggdb -g3 -O0  -Wall -Wundef -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wwrite-strings -Wno-strict-aliasing -fno-builtin -fno-common -DHAVE_MKSTEMP=1 -DHAVE_SSE2 -DHAVE_BSWAP32 -DHAVE_BYTESWAP_H -DHAVE_SYS_TIME_H=1 -DHAVE_FSEEKO -DHAVE_INTTYPES_H=1 -DHAVE_MKSTEMP64 -DHAVE_FILE64 -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned int"  -DPCL_INCLUDED   -I../pcl -I./debugobj -I../pl -I../gs/base -c ../pcl/pctop.c -o ./debugobj/pctop.o
cp ./debugobj/pconf.h ./debugobj/pconfig.h



I've tried fixing this by editing various .mak files but my solutions didn't work and are messy.
Comment 1 Chris Liddell (chrisl) 2014-09-17 06:30:21 UTC
Fixed in:
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=d4c1bd25
Comment 2 Chris Liddell (chrisl) 2014-09-17 06:30:59 UTC
(In reply to Chris Liddell from comment #1)
> Fixed in:
> http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=d4c1bd25

Actually, I should have said "I believe it's fixed" - please reopen if it continues to be a problem.