Bug 162059 - [Win] Compile fix.
Summary: [Win] Compile fix.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-09-16 06:01 PDT by Per Arne Vollan
Modified: 2016-09-16 10:38 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.64 KB, patch)
2016-09-16 06:12 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2016-09-16 06:01:33 PDT
If the JavaScripCore folder with forwarding headers contains the inspector folder with derived sources, I get the following compile error:

webkitbuild\release\derivedsources\forwardingheaders\javascriptcore\InspectorProtocolObjects.h(304): error C2995: 'WTF::String Inspector::Protocol::InspectorHelpers::getEnumConstantValue(T)': function template has already been defined (compiling source file C:\Projects\WebKit2\OpenSource\Source\WebCore\inspector\InspectorAllInOne.cpp)
\webkitbuild\release\derivedsources\forwardingheaders\javascriptcore\inspector\InspectorProtocolObjects.h(301): note: see declaration of 'Inspector::Protocol::InspectorHelpers::getEnumConstantValue' (compiling source file C:\Projects\WebKit2\OpenSource\Source\WebCore\inspector\InspectorAllInOne.cpp)

This happens because the file InspectorProtocolObjects.h exists in both folders, and #pragma once will not prevent us from including both files.

An include of the type <inspector/InspectorProtocolObjects.h> will include the file from the inspector folder, while <JavaScriptCore/InspectorProtocolObjects.h> will include the file from the JavaScriptCore folder.

This can be fixed by putting the WebCore forwarding folder first in the include list. This means that <inspector/InspectorProtocolObjects.h> will also include the file in the JavaScriptCore folder.
Comment 1 Per Arne Vollan 2016-09-16 06:12:48 PDT
Created attachment 289059 [details]
Patch
Comment 2 Per Arne Vollan 2016-09-16 06:59:31 PDT
<rdar://problem/28279258>
Comment 3 Alex Christensen 2016-09-16 09:17:48 PDT
Windows EWS is seeing this.  Does it fix this?

C:\cygwin\home\buildbot\WebKit\Source\WebCore\DerivedSources.cpp(345): fatal error C1083: Cannot open include file: 'JSMediaStreamTrackSourcesCallback.cpp': No such file or directory [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\WebCore\WebCoreDerivedSources.vcxproj]
Comment 4 Alex Christensen 2016-09-16 09:21:28 PDT
That's a separate issue.
Comment 5 Alex Christensen 2016-09-16 09:24:07 PDT
I fixed the other issue in r206024
Comment 6 WebKit Commit Bot 2016-09-16 09:42:52 PDT
Comment on attachment 289059 [details]
Patch

Clearing flags on attachment: 289059

Committed r206027: <http://trac.webkit.org/changeset/206027>
Comment 7 WebKit Commit Bot 2016-09-16 09:42:56 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Per Arne Vollan 2016-09-16 10:38:47 PDT
(In reply to comment #5)
> I fixed the other issue in r206024

Thanks, Alex!