RESOLVED FIXED178283
[WPE] Fontconfig fails build in JHBuild with “error: conflicting types for ‘FcObjectTypeHash’”
https://bugs.webkit.org/show_bug.cgi?id=178283
Summary [WPE] Fontconfig fails build in JHBuild with “error: conflicting types for ‘F...
Adrian Perez
Reported 2017-10-13 13:37:34 PDT
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); ^~~~~~~~~~~~~~~~~~
Attachments
Patch (1.41 KB, patch)
2017-10-13 13:45 PDT, Adrian Perez
no flags
Adrian Perez
Comment 1 2017-10-13 13:38:05 PDT
Interestingly enough, the JHBuild for the GTK+ port uses exactly the same version of Fontconfig, but there it builds.
Adrian Perez
Comment 2 2017-10-13 13:45:21 PDT
Zan Dobersek
Comment 3 2017-10-13 13:54:19 PDT
Could this be a ccache issue? What's the target architecture? Is it an issue with how FC_GPERF_SIZE_T is deduced?
Adrian Perez
Comment 4 2017-10-13 14:15:48 PDT
(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.
Adrian Perez
Comment 5 2017-10-13 14:20:19 PDT
(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.
WebKit Commit Bot
Comment 6 2017-10-13 15:03:46 PDT
Comment on attachment 323738 [details] Patch Clearing flags on attachment: 323738 Committed r223301: <https://trac.webkit.org/changeset/223301>
WebKit Commit Bot
Comment 7 2017-10-13 15:03:47 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2017-10-13 15:04:20 PDT
Note You need to log in before you can comment on or make changes to this bug.