Bug 16464

Summary: [patch] fontconfig-2.6.0 parallel build still fails
Product: fontconfig Reporter: Peter <pva>
Component: libraryAssignee: Keith Packard <keithp>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: 2.6   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: fontconfig-2.6.0-parallel.patch

Description Peter 2008-06-22 09:08:07 UTC
Created attachment 17294 [details] [review]
fontconfig-2.6.0-parallel.patch

We've receive a bug report about build failure of fontconfig during parallel build:

https://bugs.gentoo.org/show_bug.cgi?id=225079

To explain the problem let me first show you fc-case/Makefile.am sniplet:

TARG=fccase.h

noinst_PROGRAMS=fc-case

fc_case_SRCS= \
        fc-case.c \
        fccaseint.h \
        fccaseread.c

$(TARG): $(STMPL) fc-case$(EXEEXT) $(SCASEFOLDING)
        rm -f $(TARG)
        ./fc-case$(EXEEXT) $(SCASEFOLDING) < $(STMPL) > $(TARG)

ALIAS_FILES = fcalias.h fcaliastail.h

BUILT_SOURCES = $(ALIAS_FILES) $(TARG)

$(ALIAS_FILES):
        touch $(ALIAS_FILES)


In some cases (when touch works slower then other things) rebuilt of fccase.h
($(TARG) in BUILT_SOURCES) starts rebuild of fc-case earlier then touch
finishes and thus the error. This bug is reproducible with make -j N where N
>= 3 (as fccase.h is third in BUILT_SOURCES). To reproduce it even better just
add 'sleep 2' before touch $(ALIAS_FILES) and call make -j3 in fc-case
directory. Suggested patch to fix the issue is in attachment.
Comment 1 Keith Packard 2008-06-22 09:22:55 UTC
Applied in 0e21b5a4d5609a5dd0f332b412d878b6f1037d29, thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.