<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>178283</bug_id>
          
          <creation_ts>2017-10-13 13:37:34 -0700</creation_ts>
          <short_desc>[WPE] Fontconfig fails build in JHBuild with “error: conflicting types for ‘FcObjectTypeHash’”</short_desc>
          <delta_ts>2017-10-13 15:04:20 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>clopez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>lforschler</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1360201</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-10-13 13:37:34 -0700</bug_when>
    <thetext>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’
      &quot;aspect&quot;,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);
      ^~~~~~~~~~~~~~~~~~</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1360202</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-10-13 13:38:05 -0700</bug_when>
    <thetext>Interestingly enough, the JHBuild for the GTK+ port uses exactly
the same version of Fontconfig, but there it builds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1360205</commentid>
    <comment_count>2</comment_count>
      <attachid>323738</attachid>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-10-13 13:45:21 -0700</bug_when>
    <thetext>Created attachment 323738
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1360212</commentid>
    <comment_count>3</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2017-10-13 13:54:19 -0700</bug_when>
    <thetext>Could this be a ccache issue?

What&apos;s the target architecture? Is it an issue with how FC_GPERF_SIZE_T is deduced?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1360226</commentid>
    <comment_count>4</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-10-13 14:15:48 -0700</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #3)
&gt; Could this be a ccache issue?
&gt; 
&gt; What&apos;s the target architecture? Is it an issue with how FC_GPERF_SIZE_T is
&gt; deduced?

The target architecture is x86-64 (my work laptop). I added the
‘supports-non-srcdir-builds=&quot;no&quot;’ because I noticed that the JHBuild
module set for the GTK+ port has that, and that made Fontconfig build
successfully.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1360228</commentid>
    <comment_count>5</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-10-13 14:20:19 -0700</bug_when>
    <thetext>(In reply to Adrian Perez from comment #4)
&gt; (In reply to Zan Dobersek from comment #3)
&gt; &gt; Could this be a ccache issue?
&gt; &gt; 
&gt; &gt; What&apos;s the target architecture? Is it an issue with how FC_GPERF_SIZE_T is
&gt; &gt; deduced?
&gt; 
&gt; The target architecture is x86-64 (my work laptop). I added the
&gt; ‘supports-non-srcdir-builds=&quot;no&quot;’ because I noticed that the JHBuild
&gt; module set for the GTK+ port has that, and that made Fontconfig build
&gt; 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
    &quot;fcobjshash.gperf&quot; 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&apos;t work with
srcdir!=builddir.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1360248</commentid>
    <comment_count>6</comment_count>
      <attachid>323738</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-10-13 15:03:46 -0700</bug_when>
    <thetext>Comment on attachment 323738
Patch

Clearing flags on attachment: 323738

Committed r223301: &lt;https://trac.webkit.org/changeset/223301&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1360249</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-10-13 15:03:47 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1360250</commentid>
    <comment_count>8</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-10-13 15:04:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/34986650&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>323738</attachid>
            <date>2017-10-13 13:45:21 -0700</date>
            <delta_ts>2017-10-13 15:03:46 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-178283-20171013234519.patch</filename>
            <type>text/plain</type>
            <size>1446</size>
            <attacher name="Adrian Perez">aperez</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjIzMjk5CmRpZmYgLS1naXQgYS9Ub29scy9DaGFuZ2VMb2cg
Yi9Ub29scy9DaGFuZ2VMb2cKaW5kZXggMGU4MTBhYjhkM2ZmMzUzNDhkMmE0NTZmYzBmMzRhNDBj
YzIyNTkwZC4uYzMzNmVhNzI3YjczOTY2NWZhYTMyMTRhMjM4ZGNlZjEyODEwYjk0MCAxMDA2NDQK
LS0tIGEvVG9vbHMvQ2hhbmdlTG9nCisrKyBiL1Rvb2xzL0NoYW5nZUxvZwpAQCAtMSwzICsxLDEz
IEBACisyMDE3LTEwLTEzICBBZHJpYW4gUGVyZXogZGUgQ2FzdHJvICA8YXBlcmV6QGlnYWxpYS5j
b20+CisKKyAgICAgICAgW1dQRV0gRm9udGNvbmZpZyBmYWlscyBidWlsZCBpbiBKSEJ1aWxkIHdp
dGgg4oCcZXJyb3I6IGNvbmZsaWN0aW5nIHR5cGVzIGZvciDigJhGY09iamVjdFR5cGVIYXNo4oCZ
4oCdCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNzgy
ODMKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICAqIHdw
ZS9qaGJ1aWxkLm1vZHVsZXM6IEZsYWcgRm9udGNvbmZpZyB0byBiZSBidWlsdCBpbnNpZGUgdGh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