Full error: In file included from ../../../Source/fontconfig-2.12.4/src/fcobjs.c:33:0: fcobjshash.gperf:28:1: error: conflicting types for ‘FcObjectTypeHash’ "aspect",FC_ASPECT_OBJECT ^~~~~~~~~~~~~~~~ ../../../Source/fontconfig-2.12.4/src/fcobjs.c:28:1: note: previous declaration of ‘FcObjectTypeHash’ was here FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len); ^~~~~~~~~~~~~~~~ In file included from ../../../Source/fontconfig-2.12.4/src/fcobjs.c:33:0: fcobjshash.gperf:172:1: error: conflicting types for ‘FcObjectTypeLookup’ ../../../Source/fontconfig-2.12.4/src/fcobjs.c:31:1: note: previous declaration of ‘FcObjectTypeLookup’ was here FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len); ^~~~~~~~~~~~~~~~~~
Interestingly enough, the JHBuild for the GTK+ port uses exactly the same version of Fontconfig, but there it builds.
Created attachment 323738 [details] Patch
Could this be a ccache issue? What's the target architecture? Is it an issue with how FC_GPERF_SIZE_T is deduced?
(In reply to Zan Dobersek from comment #3) > Could this be a ccache issue? > > What's the target architecture? Is it an issue with how FC_GPERF_SIZE_T is > deduced? The target architecture is x86-64 (my work laptop). I added the ‘supports-non-srcdir-builds="no"’ because I noticed that the JHBuild module set for the GTK+ port has that, and that made Fontconfig build successfully.
(In reply to Adrian Perez from comment #4) > (In reply to Zan Dobersek from comment #3) > > Could this be a ccache issue? > > > > What's the target architecture? Is it an issue with how FC_GPERF_SIZE_T is > > deduced? > > The target architecture is x86-64 (my work laptop). I added the > ‘supports-non-srcdir-builds="no"’ because I noticed that the JHBuild > module set for the GTK+ port has that, and that made Fontconfig build > successfully. Surprise! It was me who disabled non-srcdir builds for Fontconfig in the GTK+ JHBuild module set back in May: http://trac.webkit.org/changeset/216184 The commit log message still applies: “[...] building the module with srcdir!=builddir prevents "fcobjshash.gperf" being regenerated (which is needed) so this is disabled for the Fontconfig module.” TL;DR: The Fontconfig code includes a pregenerated “fcobjhash.gperf” which is out of date and the build rules for it don't work with srcdir!=builddir.
Comment on attachment 323738 [details] Patch Clearing flags on attachment: 323738 Committed r223301: <https://trac.webkit.org/changeset/223301>
All reviewed patches have been landed. Closing bug.
<rdar://problem/34986650>