<div dir="ltr">Hi!<div><br></div><div>I recently stumbled upon the need to build webkitgtk-2.4.9 on OS X (as that is the last version with which the Cabal package webkitgtk3 seems to build with). There was only 2.10.4 in Homebrew, however there was a working 2.4.9 in MacPorts. The MacPorts version however uses a version of iconv which prevents me from compiling Homebrew stuff against the that webkitgtk-2.4.9, so I ended up developing a Homebrew webkitgtk-2.4.9 formula.</div><div><br></div><div>I&#39;ve gotten past most obstacles; I&#39;m applying all but one (seemingly irrelevant) patch from the port, and using the same or almost the same flags for configuring and building, but I&#39;m not entirely sure everything&#39;s as it&#39;s supposed to be. In any case, when calling `make install` or `make V=1` (the macport seems to call `gmake V=1`, but the `make` on my system already seems to be GNU&#39;s), after quite a bit of waiting I get:</div><div><br></div><div><span><p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(7,24,6)"><span style="color:#9c9aff">==&gt;</span> Downloading <a href="http://webkitgtk.org/releases/webkitgtk-2.4.9.tar.xz">http://webkitgtk.org/releases/webkitgtk-2.4.9.tar.xz</a></p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">Already downloaded: /Library/Caches/Homebrew/webkitgtk249-2.4.9.tar.xz</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(7,24,6)"><span style="color:#9c9aff">==&gt;</span> Patching</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/WebCore/platform/text/TextCodecUTF8.h</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/WTF/wtf/Assertions.h</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/WebCore/platform/audio/FFTFrame.h</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/WTF/wtf/FastMalloc.cpp</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/WTF/wtf/Platform.h</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/JavaScriptCore/GNUmakefile.am</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/autotools/FindDependencies.m4</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">Hunk #1 succeeded at 104 with fuzz 2 (offset -4 lines).</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/WebCore/plugins/PluginView.cpp</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/WebCore/plugins/PluginView.h</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/WebCore/<a href="http://GNUmakefile.list.am">GNUmakefile.list.am</a></p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/JavaScriptCore/API/JSBasePrivate.h</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/JavaScriptCore/API/JSContextRef.h</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/JavaScriptCore/API/JSContextRefPrivate.h</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/JavaScriptCore/API/JSObjectRef.h</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/JavaScriptCore/API/JSValueRef.h</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">patching file Source/JavaScriptCore/offlineasm/offsets.rb</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">Hunk #1 succeeded at 108 with fuzz 1 (offset -1 lines).</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">-ftemplate-depth=256</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">-ftemplate-depth=256 -Wno-c++11-extensions</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(7,24,6)"><span style="color:#9c9aff">==&gt;</span> ./configure --enable-dependency-tracking --disable-webkit2 --enable-svg --disable-geolocation --disable-jit --enable-x11-target=no --enable-quartz-target=yes --enable-wayland-target=no --enable-introspection --prefix=/usr/local/Cellar/webkitgtk249/2.4.9 --disable-webgl --disable-web-audio --disable-video</p><p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(7,24,6)"><span style="color:#9c9aff">==&gt;</span> make V=1</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">Last 15 lines from /Users/erik/Library/Logs/Homebrew/webkitgtk249/02.make:</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp:103:44: error: cannot initialize a parameter of type &#39;WebCore::GraphicsLayerClient *&#39; with an rvalue of type &#39;WebKit::AcceleratedCompositingContext *&#39;</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">    m_rootLayer = GraphicsLayer::create(0, this);</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">                                           ^~~~</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">./Source/WebCore/platform/graphics/GraphicsLayer.h:231:93: note: passing argument to parameter here</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">    static std::unique_ptr&lt;GraphicsLayer&gt; create(GraphicsLayerFactory*, GraphicsLayerClient*);</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">                                                                                            ^</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp:108:60: error: cannot initialize a parameter of type &#39;WebCore::GraphicsLayerClient *&#39; with an rvalue of type &#39;WebKit::AcceleratedCompositingContext *&#39;</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">    m_nonCompositedContentLayer = GraphicsLayer::create(0, this);</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">                                                           ^~~~</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">./Source/WebCore/platform/graphics/GraphicsLayer.h:231:93: note: passing argument to parameter here</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">    static std::unique_ptr&lt;GraphicsLayer&gt; create(GraphicsLayerFactory*, GraphicsLayerClient*);</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">                                                                                            ^</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">4 errors generated.</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">make[1]: *** [Source/WebKit/gtk/WebCoreSupport/libwebkitgtk_3_0_la-AcceleratedCompositingContextGL.lo] Error 1</p>
<p style="margin:0px;font-size:8px;line-height:normal;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(7,24,6)">make: *** [all] Error 2</p><div><br></div></span></div><div>If there&#39;s anyone on this mailing list that could potentially help me diagnose and solve the issue, that would be really appreciated!</div><div><br></div><div>The Homebrew formula I&#39;m developing can be seen here; the code should be self-explanatory:</div><div>* <a href="http://lpaste.net/8783617611091935232">http://lpaste.net/8783617611091935232</a></div><div><br></div><div>The MacPorts port I&#39;m basing off of is here; the Tcl code is slightly hard to read for anyone not used to Tcl (incl. myself) but it should give an idea of a successful compilation of webkitgtk-2.4.9 can be achieved on OS X:</div><div>* <a href="https://svn.macports.org/repository/macports/trunk/dports/www/webkit-gtk/Portfile">https://svn.macports.org/repository/macports/trunk/dports/www/webkit-gtk/Portfile</a></div><div><br></div><div>— I&#39;m really not seeing what I&#39;m missing; there must be something in the Portfile that is causing the compilation to succeed there, and not in my formula, but it&#39;s not something obvious to me.</div><div><br></div><div>Best regards,</div><div>Erik Allik</div></div>