Bug 101514

Summary: fontconfig build problem on FC_GPERF_SIZE_T=size_t systems
Product: fontconfig Reporter: Thomas Klausner <tk>
Component: libraryAssignee: fontconfig-bugs
Status: RESOLVED DUPLICATE QA Contact: Behdad Esfahbod <freedesktop>
Severity: major    
Priority: medium CC: akira
Version: 2.12   
Hardware: All   
OS: NetBSD   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch fixing the problem

Description Thomas Klausner 2017-06-20 11:40:53 UTC
Created attachment 132084 [details]
Patch fixing the problem

Configure detects FC_GPERF_SIZE_T. When this type is size_t, the build fails because the prototypes in fcobjshash.h do not match the functions in fcobjs.c:

In file included from fcobjs.c:33:0:
fcobjshash.gperf:28:1: error: conflicting types for 'FcObjectTypeHash'
 "aspect",FC_ASPECT_OBJECT
 ^
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 fcobjs.c:33:0:
fcobjshash.gperf:172:1: error: conflicting types for 'FcObjectTypeLookup'
fcobjs.c:31:1: note: previous declaration of 'FcObjectTypeLookup' was here
 FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len);

The attached patch fixes the build for me; I think the file is generated though, so you probably need to fix this differently.
Comment 1 Thomas Klausner 2017-06-20 11:41:20 UTC
(That's with fontconfig-2.12.3; 2.12.1 did not have this problem.)
Comment 2 Akira TAGOH 2017-06-20 12:18:02 UTC
already fixed in git. for a workaround, try removing both fcobjshash.gperf and fcobjshash.h. you'll see the updated files after the running of the configure script is finished.

*** This bug has been marked as a duplicate of bug 101280 ***

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.