Bug 1202

Summary: ghostscript do_compile fail on autobuilder for crownbay-noemgd and qemux86-64
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jiajun Xu <jiajun.xu>
Component: coreAssignee: Kai Kang <kai.kang>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: dvhart, elizabeth.flanagan, ke.yu, liang.li2, liangliang.wang, liezhi.yang, meta.mr.watcher, meta.watcher, richard.purdie, sgw, wenhuax.fan, yi.zhao
Version: unspecified   
Target Milestone: 1.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jiajun Xu 2011-06-28 01:31:20 UTC
Tree/Branch: Poky/Master
Poky Commit: a1f79a7896b6411669b3ccada6204d2695e80fc5

On autobuilder, latest build for crownbay-noemgd and qemux86-64 will fail when do_compile for ghostscript. It cause lsb image build failed. The error does not show up on my local machine.

crownbay-noemgd log: http://autobuilder.pokylinux.org:8010/builders/crownbay-noemgd/builds/7/steps/shell_14/logs/stdio

qemux86-64 log: http://autobuilder.pokylinux.org:8010/builders/nightly-internal/builds/18/steps/shell_16/logs/stdio

The error log is as below:
########
| ./obj/echogs -e .dev -w- -l-obj ./obj/simdi ./obj/imdi.o ./obj/imdi_tab.o
| ./obj/echogs -e .dev -w- -l-dev2 -b -s -l-include -l./obj/page -l-obj ./obj/imdi ./obj/gdevimdi.o
| ./obj/echogs -e .dev -w- -l-dev2 -b -s -l-include -l./obj/page -l-obj ./obj/wtsimdi ./obj/gdevwts.o
| ./obj/echogs -e .dev -a-  ./obj/imdi -include ./obj/sicclib
| ./obj/echogs -e .dev -a-  ./obj/wtsimdi -include ./obj/sicclib
| ./obj/echogs -e .dev -a-  ./obj/imdi -include ./obj/simdi
| ./obj/echogs -e .dev -a-  ./obj/wtsimdi -include ./obj/simdi
| ./obj/genconf ./obj/devs.tr -h ./obj/gconfxx.h -p "%s&s&&" -pl "&-l%s&s&&" -pL "&-L%s&s&&" -ol ./obj/ld.tr
| ./obj/echogs -a ./obj/gconfxx.h
| rm -f ./obj/gconfig.c
| rm -f ./obj/iconfig.c
| ./obj/mkromfs -o ./obj/gsromfs1_.c \
| -X .svn -X CVS -P ./base/../ iccprofiles/* \
|    \
| -c -P ./lib/../Resource/ -d Resource/ CIDFont/ CMap/* ColorSpace/* Decoding/* Encoding/* -b Font/* -c IdiomSet/* ProcSet/* Init/* -P ./lib/../Resource/Init/ -d Resource/Init/ FCOfontmap-PCLPS2 cidfmap gs_cet.ps pdf_cslayer.ps -d lib/ -P ./lib/
| rm -f ./obj/gconfig.h
| cp ./obj/gconfxx.h ./obj/gconfig.h
| cp ./obj/gconfxx.h ./obj/gconfig.h
| cp: cannot create regular file `./obj/gconfig.h': File exists
| cp ./psi/iconf.c ./obj/iconfig.c
| make: *** [obj/gconfig.o] Error 1
| make: *** Waiting for unfinished jobs....
| ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builds2/pokybuild/crownbay-noemgd/build/build/tmp/sysroots/crownbay-noemgd  -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64 -DHAVE_MKSTEMP64 -DHAVE_FONTCONFIG  -DHAVE_SETLOCALE -DHAVE_SSE2 -DHAVE_DBUS -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long long" -O2 -pipe -g -feliminate-unused-debug-types  -I./psi -I./obj -I./obj -I./base  -o ./obj/iconfig.o -c ./obj/iconfig.c
| compression will use 16384 byte blocksize (zlib output buffer 16412 bytes)
|    writing romfs data to './obj/gsromfs1_.c'
| node 'iccprofiles/default_cmyk.icc' len=557168 35 blocks, compressed size=382647
| node 'iccprofiles/default_gray.icc' len=394 1 blocks, compressed size=218
| node 'iccprofiles/default_rgb.icc' len=3144 1 blocks, compressed size=2596
########
Comment 2 Kai Kang 2011-07-04 18:54:45 UTC
(In reply to comment #1)
> I find latest Yocto 1.1 M2 RC1 build has no such issue now.
> crownbay noemgd:
> http://autobuilder.pokylinux.org:8010/builders/crownbay-noemgd/builds/9/steps/shell_14/logs/stdio
> 
> qemux86-64:
> http://autobuilder.pokylinux.org:8010/builders/nightly-internal/builds/21/steps/shell_16/logs/stdio

Where can I check the ghostscript compile log file(log.do_compile.xxxx) for this time? I check the failed build log and guess it is a build machine dependent issue.
Comment 3 Saul Wold 2011-07-19 08:14:33 UTC
This may be a parallel make issue, possibly changing the cp to be 'cp -f'
Comment 4 Kai Kang 2011-07-28 00:43:47 UTC
fix it with commit 052f04e460f8d697083ae4875eb20edaee7748b5

Jiajun, could you please verify it? Thank you!
Comment 5 Jiajun Xu 2011-08-31 18:50:39 UTC
(In reply to comment #4)
> fix it with commit 052f04e460f8d697083ae4875eb20edaee7748b5
> Jiajun, could you please verify it? Thank you!

The issue does not happen with local build and autobuilder. So mark it as fixed.
Comment 6 wenhua.fan 2011-10-26 00:16:21 UTC
*** Bug 1698 has been marked as a duplicate of this bug. ***
Comment 7 wenhua.fan 2011-10-26 00:20:14 UTC
With Yocto1.2 20111023 build, this issue reproduce on nightly-qemux86. Change the bug status to reopened.

Commit information as below:

Tree/branch: poky-contrib/master_under_test
Commit id: 88d7de9aa239bbb47245afc13d3a3e9689e9ebfb

Details log could be found at :

http://autobuilder.yoctoproject.org:8010/builders/nightly-x86/builds/199/steps/shell_79/logs/stdio
Comment 8 wenhua.fan 2011-10-26 00:21:12 UTC
Change the bug status to reopened.
Comment 9 Richard Purdie 2011-11-25 05:05:35 UTC
This is still happening, Perhaps we should patch the makefile:
lib.mak:	$(CP_) $(gconfig_h) $(GLGEN)gconfig.h
to be:
lib.mak:	$(CP_) $(gconfig_h) $(GLGEN)gconfig.h || true
Comment 11 Richard Purdie 2012-03-23 12:47:57 UTC
No, it is not fixed. The patch from July last year has not resolved all the issues and we have had failures occur since then. I've also seen them locally. This bug still exists :(.
Comment 12 Richard Purdie 2012-03-24 09:40:32 UTC
This failed on last night's autobuilder run: http://autobuilder.yoctoproject.org:8010/builders/nightly-x86/builds/417/steps/shell_74/logs/stdio
Comment 14 Kai Kang 2012-03-30 01:39:03 UTC
It seems need patch psi/int.mak too

+--- ghostscript-9.05/psi/int.mak.orig	2012-03-28 14:48:20.082048252 +0800
++++ ghostscript-9.05/psi/int.mak	2012-03-28 14:55:03.142053958 +0800
+@@ -272,7 +272,7 @@
+  $(gconf_h) $(gconfigd_h) $(gsmemory_h) $(gstypes_h)\
+  $(iminst_h) $(iref_h) $(ivmspace_h) $(opdef_h) $(iplugin_h)
+ 	$(RM_) $(PSGEN)iconfig.c
+-	$(CP_) $(gconfig_h) $(PSGEN)gconfig.h
++	$(CP_) $(gconfig_h) $(PSGEN)gconfig.h || true
+ 	$(CP_) $(PSSRC)iconf.c $(PSGEN)iconfig.c
+ 	$(PSCC) $(PSO_)iconfig.$(OBJ) $(C_) $(PSGEN)iconfig.c
+