<?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>17001</bug_id>
          
          <creation_ts>2008-01-24 23:19:23 -0800</creation_ts>
          <short_desc>Build error with Gtk port on Mac OS X (r29781)</short_desc>
          <delta_ts>2008-01-26 02:03:37 -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>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Randall Wood">alexandriasoftware</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dobey</cc>
    
    <cc>mrowe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68192</commentid>
    <comment_count>0</comment_count>
    <who name="Randall Wood">alexandriasoftware</who>
    <bug_when>2008-01-24 23:19:23 -0800</bug_when>
    <thetext>I am attempting to build webkit-gtk on Mac OS X 10.5 (PPC) and am having the following error:

 /usr/bin/g++-4.0 -DHAVE_CONFIG_H -I. -I./JavaScriptCore -I./JavaScriptCore/ForwardingHeaders -I./JavaScriptCore/wtf -I./JavaScriptCore/kjs -I./DerivedSources -DBUILDING_GTK__=1 -DWTF_CHANGES -DXP_UNIX -DNDEBUG -DENABLE_ICONDATABASE=0 -I./JavaScriptCore/bindings -I./WebCore -I./WebCore/ForwardingHeaders -I./WebCore/platform -I./WebCore/platform/network -I./WebCore/platform/graphics -I./WebCore/platform/text -I./WebCore/loader -I./WebCore/loader/icon -I./WebCore/css -I./WebCore/dom -I./WebCore/page -I./WebCore/bridge -I./WebCore/editing -I./WebCore/history -I./WebCore/xml -I./WebCore/html -I./WebCore/bindings/js -I./WebCore/platform/image-decoders -I./WebCore/platform/image-decoders/bmp -I./WebCore/platform/image-decoders/gif -I./WebCore/platform/image-decoders/ico -I./WebCore/platform/image-decoders/jpeg -I./WebCore/platform/image-decoders/png -I./WebCore/platform/image-decoders/xbm -I./WebCore/plugins -I./WebCore/rendering -I./WebCore/bindings/js -DWTF_USE_CURL=1 -I./WebCore/platform/network/curl -DENABLE_DATABASE=1 -I./WebCore/platform/sql -I./WebCore/storage -DENABLE_XPATH=1 -DENABLE_XSLT=1 -I./WebKit/gtk/WebView -DBUILDING_CAIRO__=1 -DBUILD_WEBKIT -I./WebCore/platform/gtk -I./WebCore/platform/graphics/gtk -I./WebCore/platform/graphics/cairo -I./WebCore/loader/gtk -I./WebCore/page/gtk -I./WebKit/gtk/WebCoreSupport -I./WebKit/gtk/WebView -I/opt/local/include -I/opt/local/include -fno-strict-aliasing -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -fvisibility-inlines-hidden -fno-rtti -fno-exceptions -fvisibility=hidden -D_REENTRANT -DXTHREADS -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11/include -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include/libxml2 -O2 -MT WebCore/page/libWebKitGtk_la-Frame.lo -MD -MP -MF WebCore/page/.deps/libWebKitGtk_la-Frame.Tpo -c WebCore/page/Frame.cpp  -fno-common -DPIC -o WebCore/page/.libs/libWebKitGtk_la-Frame.o
/opt/local/include/X11/X.h:108: error: conflicting declaration &apos;typedef XID Cursor&apos;
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QuickdrawTypes.h:269: error: &apos;Cursor&apos; has a previous declaration as &apos;typedef struct Cursor Cursor&apos;
make[1]: *** [WebCore/page/libWebKitGtk_la-Frame.lo] Error 1
make: *** [all] Error 2

Complete logs are at http://homepage.mac.com/rhwood/webkit/r29781/install.log

It seems to me that perhaps something is trying to use QuickDraw because I am on a Mac, despite my wanting to build the gtk version?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68201</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-25 02:34:57 -0800</bug_when>
    <thetext>I&apos;m curious what is pulling in the QuickDraw headers.  It may or may not be a bug that they are being pulled in when building the Gtk port on Mac OS X.  One way to find out where they are being included from is to intentionally introduce an error into the header.  For example, you could edit:

/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QuickdrawTypes.h

and add a &quot;#error Why am I here?&quot; line somewhere near the beginning.  Then when you build, GCC will emit an error which will mention which file is including the one triggering the error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68202</commentid>
    <comment_count>2</comment_count>
    <who name="Randall Wood">alexandriasoftware</who>
    <bug_when>2008-01-25 05:09:04 -0800</bug_when>
    <thetext>Adding the error message results in:

...[blah blah blah]...
In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:42,
                 from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30,
                 from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24,
                 from ./JavaScriptCore/bindings/npapi.h:84,
                 from ./JavaScriptCore/bindings/npruntime.h:76,
                 from ./JavaScriptCore/bindings/npruntime_internal.h:28,
                 from ./JavaScriptCore/bindings/NP_jsobject.h:31,
                 from WebCore/page/Frame.cpp:70:
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QuickdrawTypes.h:1:2: error: #error Why am I here?
/opt/local/include/X11/X.h:108: error: conflicting declaration &apos;typedef XID Cursor&apos;
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QuickdrawTypes.h:270: error: &apos;Cursor&apos; has a previous declaration as &apos;typedef struct Cursor Cursor&apos;

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68203</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-25 05:42:31 -0800</bug_when>
    <thetext>Thanks!  So the problem would seem to be that both XP_MAC and XP_UNIX are defined on Mac OS X.  This pulls in both Quickdraw.h and Xlib.h, which have conflicting definitions for Cursor.

I&apos;m guessing that for the Gtk port on Mac OS X, we probably don&apos;t want XP_MAC defined at all.  Whether or not XP_UNIX is defined should depend on whether you&apos;re using the X11 or &quot;native&quot; version of Gtk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68204</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-25 05:56:12 -0800</bug_when>
    <thetext>It might be as simple as changing:

#if defined(__APPLE_CC__) &amp;&amp; !defined(__MACOS_CLASSIC__)

to:

#if defined(__APPLE_CC__) &amp;&amp; !defined(__MACOS_CLASSIC__) &amp;&amp; !defined(XP_UNIX)

I&apos;m a little wary of changing npapi.h though as it&apos;s technically an API header, but a simple change like this is unlikely to cause problems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68208</commentid>
    <comment_count>5</comment_count>
    <who name="Rodney Dawes">dobey</who>
    <bug_when>2008-01-25 06:32:21 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; I&apos;m guessing that for the Gtk port on Mac OS X, we probably don&apos;t want XP_MAC
&gt; defined at all.  Whether or not XP_UNIX is defined should depend on whether
&gt; you&apos;re using the X11 or &quot;native&quot; version of Gtk.

We don&apos;t want XP_MAC or XP_UNIX defined I don&apos;t think. In fact, XP_UNIX only gets defined with the qmake build, when the GTK+ port is being built against X11. Is this problem occurring with the autotools build? Are you sure that the GTK+ you&apos;re building against, isn&apos;t using X11?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68213</commentid>
    <comment_count>6</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-25 07:51:19 -0800</bug_when>
    <thetext>I&apos;ve just verified that the one-line change I suggested resolves this issue when building the Gtk port on Mac OS X.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68215</commentid>
    <comment_count>7</comment_count>
      <attachid>18690</attachid>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-25 07:59:06 -0800</bug_when>
    <thetext>Created attachment 18690
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68231</commentid>
    <comment_count>8</comment_count>
      <attachid>18690</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-01-25 13:05:44 -0800</bug_when>
    <thetext>Comment on attachment 18690
Patch

Looks good. r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68276</commentid>
    <comment_count>9</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-26 02:03:37 -0800</bug_when>
    <thetext>Fix landed in r29806.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>18690</attachid>
            <date>2008-01-25 07:59:06 -0800</date>
            <delta_ts>2008-01-25 13:05:44 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>webkit-bug-17001-v1.patch</filename>
            <type>text/plain</type>
            <size>1268</size>
            <attacher name="Mark Rowe (bdash)">mrowe</attacher>
            
              <data encoding="base64">ZGlmZ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i
dXJnICA8c2ZhbGtlbkBhcHBsZS5jb20+CiAKICAgICAgICAgQnVpbGQgZml4LgpkaWZmIC0tZ2l0
IGEvSmF2YVNjcmlwdENvcmUvYmluZGluZ3MvbnBhcGkuaCBiL0phdmFTY3JpcHRDb3JlL2JpbmRp
bmdzL25wYXBpLmgKaW5kZXggYTE3MmM5Ny4uYmE4YjZjNyAxMDA2NDQKLS0tIGEvSmF2YVNjcmlw
dENvcmUvYmluZGluZ3MvbnBhcGkuaAorKysgYi9KYXZhU2NyaXB0Q29yZS9iaW5kaW5ncy9ucGFw
aS5oCkBAIC03MSw3ICs3MSw3IEBACiAjICAgIGVuZGlmIC8qIFhQX1BDICovCiAjZW5kaWYgLyog
X19NV0VSS1NfXyAqLwogCi0jaWYgZGVmaW5lZChfX0FQUExFX0NDX18pICYmICFkZWZpbmVkKF9f
TUFDT1NfQ0xBU1NJQ19fKQorI2lmIGRlZmluZWQoX19BUFBMRV9DQ19fKSAmJiAhZGVmaW5lZChf
X01BQ09TX0NMQVNTSUNfXykgJiYgIWRlZmluZWQoWFBfVU5JWCkKICMgICBkZWZpbmUgWFBfTUFD
T1NYCiAjZW5kaWYKIAo=
</data>
<flag name="review"
          id="8156"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>