Bug 126433 - webkit-gtk 2.3.3 fails to build on OS X - Conflicting type "Fixed"
Summary: webkit-gtk 2.3.3 fails to build on OS X - Conflicting type "Fixed"
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks: 126492
  Show dependency treegraph
 
Reported: 2014-01-03 09:43 PST by Jeremy Huddleston Sequoia
Modified: 2016-01-14 15:24 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.45 KB, patch)
2015-01-06 20:18 PST, Philip Chimento
no flags Details | Formatted Diff | Diff
Patch that fixes the problem (1.38 KB, patch)
2015-05-07 22:07 PDT, Philip Chimento
no flags Details | Formatted Diff | Diff
Updated patch (1.13 KB, patch)
2015-05-14 22:37 PDT, Philip Chimento
no flags Details | Formatted Diff | Diff
Patch (1.44 KB, patch)
2015-10-12 10:58 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Huddleston Sequoia 2014-01-03 09:43:57 PST
In file included from Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:30:
In file included from ./Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h:23:
In file included from ./Source/JavaScriptCore/API/JSStringRef.h:29:
In file included from ./Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h:1:
In file included from ./Source/JavaScriptCore/API/JSValueRef.h:30:
In file included from ./Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/WebKitAvailability.h:1:
In file included from ./Source/JavaScriptCore/API/WebKitAvailability.h:46:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:38:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:68:
/usr/include/MacTypes.h:185:9: error: reference to 'Fixed' is ambiguous
typedef Fixed *                         FixedPtr;
        ^
/usr/include/MacTypes.h:184:41: note: candidate found by name lookup is 'Fixed'
typedef SInt32                          Fixed;
                                        ^
./Source/WebCore/platform/Length.h:38:30: note: candidate found by name lookup is 'WebCore::LengthType::Fixed'
    Auto, Relative, Percent, Fixed,
                             ^
In file included from Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:30:
In file included from ./Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h:23:
In file included from ./Source/JavaScriptCore/API/JSStringRef.h:29:
In file included from ./Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h:1:
In file included from ./Source/JavaScriptCore/API/JSValueRef.h:30:
In file included from ./Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/WebKitAvailability.h:1:
In file included from ./Source/JavaScriptCore/API/WebKitAvailability.h:46:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:38:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:68:
/usr/include/MacTypes.h:541:16: error: reference to 'Rect' is ambiguous
typedef struct Rect                     Rect;
               ^
/usr/include/MacTypes.h:535:8: note: candidate found by name lookup is 'Rect'
struct Rect {
       ^
./Source/WebCore/css/CSSPrimitiveValue.h:41:7: note: candidate found by name lookup is 'WebCore::Rect'
class Rect;
      ^


---


I really don't see why you need AvailabilityMacros.h or CF to be included in ./Source/JavaScriptCore/API/WebKitAvailability.h ... those availability macros are for system headers.
Comment 1 Philip Chimento 2015-01-06 20:18:13 PST
Created attachment 244131 [details]
Patch

Here's a simple patch to remove CoreFoundation.h for the GTK port. It applies to the 2.4.x branch since I don't believe this is an issue on 2.6.x.

Would this be able to be reviewed for 2.4.8?

For completeness, here's the output I had for this failure:

In file included from Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:30:
In file included from ./Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h:23:
In file included from ./Source/JavaScriptCore/API/JSStringRef.h:29:
In file included from ./Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h:1:
In file included from ./Source/JavaScriptCore/API/JSValueRef.h:30:
In file included from ./Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/WebKitAvailability.h:1:
In file included from ./Source/JavaScriptCore/API/WebKitAvailability.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:38:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:68:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/MacTypes.h:552:3: error:
      reference to 'Fixed' is ambiguous
  Fixed               bottom;
  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/MacTypes.h:184:41: note:
      candidate found by name lookup is 'Fixed'
typedef SInt32                          Fixed;
                                        ^
./Source/WebCore/platform/Length.h:38:30: note: candidate found by name lookup
      is 'WebCore::LengthType::Fixed'
    Auto, Relative, Percent, Fixed,
                             ^
In file included from Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:30:
In file included from ./Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h:23:
In file included from ./Source/JavaScriptCore/API/JSStringRef.h:29:
In file included from ./Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h:1:
In file included from ./Source/JavaScriptCore/API/JSValueRef.h:30:
In file included from ./Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/WebKitAvailability.h:1:
In file included from ./Source/JavaScriptCore/API/WebKitAvailability.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:38:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:68:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/MacTypes.h:570:9: error:
      reference to 'Style' is ambiguous
typedef Style                           StyleField;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/MacTypes.h:568:41: note:
      candidate found by name lookup is 'Style'
typedef unsigned char                   Style;
                                        ^
./Source/WebCore/style/StyleResolveTree.h:37:11: note: candidate found by name
      lookup is 'WebCore::Style'
namespace Style {
          ^
Comment 2 WebKit Commit Bot 2015-01-06 20:19:55 PST
Attachment 244131 [details] did not pass style-queue:


Total errors found: 0 in 0 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Philip Chimento 2015-01-18 12:20:08 PST
Would this be able to be reviewed for 2.4.9? I'm not sure why the style bot didn't passs it since it does say "Total errors 0 in 0 files."
Comment 4 Csaba Osztrogonác 2015-05-04 08:30:48 PDT
(In reply to comment #3)
> Would this be able to be reviewed for 2.4.9? I'm not sure why the style bot
> didn't passs it since it does say "Total errors 0 in 0 files."

$ Tools/Scripts/svn-apply attachment.cgi\?id=244131
Parsed 0 diffs from patch file(s).

It seems it isn't valid patch for svn-apply.
Comment 5 Philip Chimento 2015-05-07 22:07:20 PDT
Created attachment 252684 [details]
Patch that fixes the problem

How about this one? Without an error message I'm not really sure why it's failing.
Comment 6 WebKit Commit Bot 2015-05-07 22:09:04 PDT
Attachment 252684 [details] did not pass style-queue:


Total errors found: 0 in 0 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Michael Catanzaro 2015-05-10 14:14:30 PDT
Proposed for https://trac.webkit.org/wiki/WebKitGTK/2.4.x
Comment 8 Csaba Osztrogonác 2015-05-14 10:02:23 PDT
Comment on attachment 252684 [details]
Patch that fixes the problem

View in context: https://bugs.webkit.org/attachment.cgi?id=252684&action=review

> b/Source/JavaScriptCore/API/WebKitAvailability.h:31
> -#ifdef __APPLE__
> +#include <wtf/Platform.h>
> +
> +#if defined(__APPLE__) && !PLATFORM(GTK)

Including Platform.h is incorrect in an API header, you can 
simply use #if defined(__APPLE__) && !defined(BUILDING_GTK__).

Otherwise I'm not sure if it is the proper fix here.
Darin, what do you think about this strange build issue?
Comment 9 Philip Chimento 2015-05-14 22:37:03 PDT
Created attachment 253175 [details]
Updated patch

I'll try another build with that suggestion, but in any case here's the updated patch.
Comment 10 WebKit Commit Bot 2015-05-14 22:39:57 PDT
Attachment 253175 [details] did not pass style-queue:


Total errors found: 0 in 0 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 WebKit Commit Bot 2015-10-12 09:09:07 PDT
Comment on attachment 253175 [details]
Updated patch

Rejecting attachment 253175 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 253175, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
ng 1 patch from 1 bug.
Processing patch 253175 from bug 126433.
Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Philippe Normand']" exit_code: 255 cwd: /Volumes/Data/EWS/WebKit

No diff found. at /Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply line 126.
Parsed 0 diffs from patch file(s).

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Philippe Normand']" exit_code: 255 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/271771
Comment 12 Philip Chimento 2015-10-12 09:49:06 PDT
Would someone be able to commit this manually? I'm pretty sure I've prepared this patch and all previous versions in the normal way, with webkit-patch, but svn-apply seems to choke on it each time.

Thanks for the review, by the way.
Comment 13 Michael Catanzaro 2015-10-12 10:58:46 PDT
Created attachment 262901 [details]
Patch
Comment 14 Michael Catanzaro 2015-10-12 11:00:19 PDT
Committed r190862: <http://trac.webkit.org/changeset/190862>
Comment 15 Philip Chimento 2015-10-12 11:15:58 PDT
Thanks!
Comment 16 Jeremy Huddleston Sequoia 2016-01-14 15:24:33 PST
This change causes webkit-gtk to fail to build on OS X 10.9 and earlier:

See bug #152720