<?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>243759</bug_id>
          
          <creation_ts>2022-08-09 18:05:39 -0700</creation_ts>
          <short_desc>[GTK] Fix build on macOS</short_desc>
          <delta_ts>2022-08-11 23:24: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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>echassiers.09-regards</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1890170</commentid>
    <comment_count>0</comment_count>
    <who name="">echassiers.09-regards</who>
    <bug_when>2022-08-09 18:05:39 -0700</bug_when>
    <thetext>The Cocoa headers under Source/WTF/wtf/spi/cocoa are required to build WebKitGTK on macOS, but they are missing from the released tarballs.

It will also be convenient to package all headers under Source/WTF/wtf/spi.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890273</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-08-10 06:52:32 -0700</bug_when>
    <thetext>That can&apos;t be right because the spi is the Apple public API. That should not be required for building WebKitGTK, which has a different public API.

I&apos;m afraid that you&apos;ll have to untangle whatever dependencies are involved here: no WebKit developers work on WebKitGTK for macOS, so it&apos;s up to the people who try to build and use it to figure out how to keep it working. Sorry....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890276</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-08-10 06:56:23 -0700</bug_when>
    <thetext>You can find the manifest used to build the tarballs in Tools/gtk/manifest.txt.in. Notice that all cocoa/ and even mac/ directories are excluded from the tarball. Should be somehow possible to continue to do that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890289</commentid>
    <comment_count>3</comment_count>
    <who name="">echassiers.09-regards</who>
    <bug_when>2022-08-10 08:00:28 -0700</bug_when>
    <thetext>Yeah, but Source/WTF/wtf/spi/darwin/ is included somehow...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890290</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-08-10 08:09:56 -0700</bug_when>
    <thetext>I think we do want to include darwin/ directories because those are required to build on macOS. We should probably add spi/ to the list of directories to exclude, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890291</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-08-10 08:10:59 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #4)
&gt; I think we do want to include darwin/ directories because those are required
&gt; to build on macOS. We should probably add spi/ to the list of directories to
&gt; exclude, though.

(BTW, I&apos;m just guessing about this. You&apos;re more familiar with macOS than I am. But I am fairly sure we don&apos;t want anything under spi/ to be built.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890300</commentid>
    <comment_count>6</comment_count>
    <who name="">echassiers.09-regards</who>
    <bug_when>2022-08-10 09:14:24 -0700</bug_when>
    <thetext>I found that in the files

Source/WTF/wtf/WTFConfig.cpp (Bug #222086)
Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp (Bug #235720)

Cocoa headers are included with an #if OS(DARWIN) instead of #if PLATFORM(COCOA), and that seems problematic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890396</commentid>
    <comment_count>7</comment_count>
    <who name="">echassiers.09-regards</who>
    <bug_when>2022-08-10 14:23:55 -0700</bug_when>
    <thetext>(In reply to echassiers.09-regards from comment #6)
&gt; I found that in the files
&gt; 
&gt; Source/WTF/wtf/WTFConfig.cpp (Bug #222086)
&gt; Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp (Bug #235720)
&gt; 
&gt; Cocoa headers are included with an #if OS(DARWIN) instead of #if
&gt; PLATFORM(COCOA), and that seems problematic.

And these are effectively the only files that need to be fixed. Tested on my own machine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890401</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-08-10 14:35:09 -0700</bug_when>
    <thetext>If you have a fix that works, want to try submitting a pull request?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890404</commentid>
    <comment_count>9</comment_count>
    <who name="">echassiers.09-regards</who>
    <bug_when>2022-08-10 14:46:09 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #8)
&gt; If you have a fix that works, want to try submitting a pull request?

I have a patch in my GitHub repo that fixes WTF errors when building WebKitGTK, which might seem too immature since I&apos;m not aware of the Contributing Code.

https://github.com/wegank/nur-packages/blob/6f9b8a3e25157be742df286f93c3f0a3648cc4eb/pkgs/development/libraries/webkitgtk/fix-wtf-errors-on-darwin.patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890407</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-08-10 14:50:54 -0700</bug_when>
    <thetext>That actually looks good to me. Seems you&apos;ve disentangled things nicely.

If you aren&apos;t comfortable with submitting your own pull request on GitHub, I can submit it for you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890412</commentid>
    <comment_count>11</comment_count>
    <who name="">echassiers.09-regards</who>
    <bug_when>2022-08-10 15:00:48 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #10)
&gt; That actually looks good to me. Seems you&apos;ve disentangled things nicely.
&gt; 
&gt; If you aren&apos;t comfortable with submitting your own pull request on GitHub, I
&gt; can submit it for you.

Oh, I&apos;d really appreciate it if you could do me a favour.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890725</commentid>
    <comment_count>12</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-08-11 15:33:43 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/3246</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890727</commentid>
    <comment_count>13</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-08-11 15:37:32 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #1)
&gt; That can&apos;t be right because the spi is the Apple public API. That should not
&gt; be required for building WebKitGTK, which has a different public API.

It turns out this was an altogether different SPI. Confusing. Whatever. :)

I guess &quot;SPI&quot; is just a different way of saying &quot;API&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890818</commentid>
    <comment_count>14</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-08-11 23:24:17 -0700</bug_when>
    <thetext>Committed 253367@main (6bb3f1342f34): &lt;https://commits.webkit.org/253367@main&gt;

Reviewed commits have been landed. Closing PR #3246 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>