<?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>102057</bug_id>
          
          <creation_ts>2012-11-13 00:46:01 -0800</creation_ts>
          <short_desc>Cannot compile QtWebKit 2.3 on Mac</short_desc>
          <delta_ts>2014-01-09 21:06:03 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.7</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>88186</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Bobber">bobber.cheng</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>allan.jensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>tobias.netzel</cc>
    
    <cc>zeno</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>765361</commentid>
    <comment_count>0</comment_count>
    <who name="Bobber">bobber.cheng</who>
    <bug_when>2012-11-13 00:46:01 -0800</bug_when>
    <thetext>Cannot compile QtWebKit 2.3 on Mac due to dependency of qt5 in following files:
Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp
Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>765378</commentid>
    <comment_count>1</comment_count>
    <who name="Bobber">bobber.cheng</who>
    <bug_when>2012-11-13 01:11:18 -0800</bug_when>
    <thetext>When compling with --debug after removing dependecy of qt5, got following error.

/usr/bin/ranlib: archive member: libWebCore.a(JSTreeWalkerCustom.o) size too large (archive member extends past the end of the file)
ar: internal ranlib command failed

$ ls -lh WebKitBuild/Debug/Source/WebCore/libWebCore.a
-rw-r--r--  1 set  staff   4.3G Nov 13 17:03 WebKitBuild/Debug/Source/WebCore/libWebCore.a

refer to https://bugreports.qt-project.org/browse/QTBUG-20619.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>765401</commentid>
    <comment_count>2</comment_count>
    <who name="Zeno Albisser">zeno</who>
    <bug_when>2012-11-13 02:02:25 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; When compling with --debug after removing dependecy of qt5, got following error.
&gt; 
&gt; /usr/bin/ranlib: archive member: libWebCore.a(JSTreeWalkerCustom.o) size too large (archive member extends past the end of the file)
&gt; ar: internal ranlib command failed

Which version of XCode (command line tools) do you use?
You get this error because your archive libWebCore.a is getting bigger than 4GB.
This was a bug in the Mac tool chain (libtool).
You might need to update these. This bug has been fixed in XCode 4.4.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>765440</commentid>
    <comment_count>3</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2012-11-13 03:10:24 -0800</bug_when>
    <thetext>(In reply to comment #0)
&gt; Cannot compile QtWebKit 2.3 on Mac due to dependency of qt5 in following files:
&gt; Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
&gt; Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp
&gt; Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp

You can work around this by in Tools/qmake/mkspecs/features/features.prf commenting out the line &quot;mac: DEFINES += WTF_USE_GRAPHICS_SURFACE=1&quot;. Until those files have been ported (if even possible), I gues we do not support &quot;graphics surface&quot; in QtWebKit 2.3. 

I guess we will have the same problem on win32, though only if Qt has been configured with opengles2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>770525</commentid>
    <comment_count>4</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2012-11-19 02:45:06 -0800</bug_when>
    <thetext>I have made graphics surface depend on Qt5. The code looks portable, but it will require some testing and one or two work-arounds, so disabling it for now seems better since it is a new feature anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>774303</commentid>
    <comment_count>5</comment_count>
    <who name="Bobber">bobber.cheng</who>
    <bug_when>2012-11-23 01:27:30 -0800</bug_when>
    <thetext>Hi Allan,

Your change is good, but there is new compiling error for Source/WebCore/plugins/mac/PluginPackageMac.cpp. Please make following change to compile it:
WTF::RetainPtr&lt;CFStringRef&gt; homeDir = adoptCF(homeDirectoryPath().createCFString());
to
WTF::RetainPtr&lt;CFStringRef&gt; homeDir(homeDirectoryPath().createCFString());


WTF::RetainPtr&lt;CFStringRef&gt; path(AdoptCF, m_path.createCFString());
to
WTF::RetainPtr&lt;CFStringRef&gt; path(m_path.createCFString());

Thanks,
Bobber</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>774328</commentid>
    <comment_count>6</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2012-11-23 02:22:33 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; WTF::RetainPtr&lt;CFStringRef&gt; path(AdoptCF, m_path.createCFString());
&gt; to
&gt; WTF::RetainPtr&lt;CFStringRef&gt; path(m_path.createCFString());
&gt; 
I don&apos;t understand this change. The constructor pattern WTF::RetainPtr&lt;CFStringRef&gt; (AdoptCF,  CFString) is used everywhere. Why would this one place cause compile error when the rest does not?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>877765</commentid>
    <comment_count>7</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2013-04-18 02:38:11 -0700</bug_when>
    <thetext>Yes, that last change is needed as well, no matter if I understand it or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>877835</commentid>
    <comment_count>8</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2013-04-18 05:41:52 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; Yes, that last change is needed as well, no matter if I understand it or not.

Fixed in the upcoming 2.3.2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878224</commentid>
    <comment_count>9</comment_count>
    <who name="Bobber">bobber.cheng</who>
    <bug_when>2013-04-18 21:56:08 -0700</bug_when>
    <thetext>Release version is ok now, but I still cannot compile debug version On Mac even with clang or XCode 4.6.2. Errow is that archive libWebCore.a is getting bigger than 4GB.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878431</commentid>
    <comment_count>10</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2013-04-19 07:38:13 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; Release version is ok now, but I still cannot compile debug version On Mac even with clang or XCode 4.6.2. Errow is that archive libWebCore.a is getting bigger than 4GB.

Does it help if you build with -qmake=&apos;CONFIG+=production_build&apos; ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878432</commentid>
    <comment_count>11</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2013-04-19 07:38:29 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #9)
&gt; &gt; Release version is ok now, but I still cannot compile debug version On Mac even with clang or XCode 4.6.2. Errow is that archive libWebCore.a is getting bigger than 4GB.
&gt; 
&gt; Does it help if you build with -qmake=&apos;CONFIG+=production_build&apos; ?

sorry -qmakearg</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878948</commentid>
    <comment_count>12</comment_count>
    <who name="Bobber">bobber.cheng</who>
    <bug_when>2013-04-21 20:31:19 -0700</bug_when>
    <thetext>Thanks for your advise, Allan. But -qmake=&apos;CONFIG+=production_build&apos; still doesn&apos;t reduce libWebCore.a less 4GB. Here is detail:

$ Tools/Scripts/build-webkit --qt --no-video --no-sql-database --no-icon-database --no-webgl  --no-3d-rendering --makeargs=&quot;-j4&quot; --debug --no-webkit2 --qmakearg=&quot;CONFIG+=production_build&quot; -spec unsupported/macx-clang
.....
/usr/bin/ranlib: archive: libWebCore.a truncated or malformed (archive header of next member extends past the end of the file)
ar: internal ranlib command failed
make[3]: *** [debug/libWebCore.a] Error 1
make[2]: *** [sub-Target-pri-make_default-ordered] Error 2
make[1]: *** [sub-Source-WebCore-WebCore-pro-make_default-ordered] Error 2
make: *** [incremental] Error 2

$ ls -lh WebKitBuild/Debug/Source/WebCore/libWebCore.a
-rw-r--r--  1 set  staff   4.3G Apr 22 11:20 WebKitBuild/Debug/Source/WebCore/libWebCore.a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>879042</commentid>
    <comment_count>13</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2013-04-22 02:30:35 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; Thanks for your advise, Allan. But -qmake=&apos;CONFIG+=production_build&apos; still doesn&apos;t reduce libWebCore.a less 4GB. Here is detail:
&gt; 
&gt; $ Tools/Scripts/build-webkit --qt --no-video --no-sql-database --no-icon-database --no-webgl  --no-3d-rendering --makeargs=&quot;-j4&quot; --debug --no-webkit2 --qmakearg=&quot;CONFIG+=production_build&quot; -spec unsupported/macx-clang
&gt; .....
&gt; /usr/bin/ranlib: archive: libWebCore.a truncated or malformed (archive header of next member extends past the end of the file)
&gt; ar: internal ranlib command failed
&gt; make[3]: *** [debug/libWebCore.a] Error 1
&gt; make[2]: *** [sub-Target-pri-make_default-ordered] Error 2
&gt; make[1]: *** [sub-Source-WebCore-WebCore-pro-make_default-ordered] Error 2
&gt; make: *** [incremental] Error 2
&gt; 
&gt; $ ls -lh WebKitBuild/Debug/Source/WebCore/libWebCore.a
&gt; -rw-r--r--  1 set  staff   4.3G Apr 22 11:20 WebKitBuild/Debug/Source/WebCore/libWebCore.a

Ah, so you get around the problem with ANGLE by disabling 3d-rendering. 

This bug though, still sounds like libWebCore.a ends up larger than 4Gbyte.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>901552</commentid>
    <comment_count>14</comment_count>
    <who name="Tobias Netzel">tobias.netzel</who>
    <bug_when>2013-06-18 15:30:37 -0700</bug_when>
    <thetext>I can explain why the adoptCF / createCFString patch is needed (reading about that here reminds me that I&apos;ve still got to file the bug with a fix for that; when I wanted to file it WebKit bugzilla was offline).
createCFString at some point in the past was changed to already return an object of type WTF::RetainPtr&lt;CFStringRef&gt; so all code that called adoptCF() on the return value of createCFString() should have been changed to omit the call to adoptCF(), but it was obviously forgotten. That construct in my case led to crashes because it made the ObjC garbage collector destroy the String shortly after the call, leading to subsequent crashes when trying to access that String.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>903420</commentid>
    <comment_count>15</comment_count>
    <who name="Tobias Netzel">tobias.netzel</who>
    <bug_when>2013-06-25 13:42:23 -0700</bug_when>
    <thetext>Bug 118001 is my bug about adoptCF() being called on the result of createCFString().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>966220</commentid>
    <comment_count>16</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-01-09 21:06:03 -0800</bug_when>
    <thetext>The QT port is no longer part of WebKit.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>