RESOLVED FIXED 102787
[Qt][Win] Fix the build after r135217
https://bugs.webkit.org/show_bug.cgi?id=102787
Summary [Qt][Win] Fix the build after r135217
Csaba Osztrogonác
Reported 2012-11-20 02:44:02 PST
http://trac.webkit.org/changeset/135217 broke the Qt Win build: qwebkittest.cpp C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1660) : error C2144: syntax error : 'int' should be preceded by ';' C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1660) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1660) : error C2470: 'IQueryAssociations' : looks like a function definition, but there is no parameter list; skipping apparent body C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1860) : error C2146: syntax error : missing ';' before identifier 'IConnectionPoint' C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1860) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1860) : error C2378: 'interface' : redefinition; symbol cannot be overloaded with a typedef C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1660) : see declaration of 'interface' C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1860) : error C2146: syntax error : missing ';' before identifier 'IConnectionPoint' C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1860) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1860) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1860) : error C2086: 'int IConnectionPoint' : redefinition C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1860) : see declaration of 'IConnectionPoint' C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\shlwapi.h(1863) : error C2061: syntax error : identifier 'IConnectionPoint' I tried a speculative buildfix - http://trac.webkit.org/changeset/135259 - but it didn't help.
Attachments
Csaba Osztrogonác
Comment 1 2012-11-20 02:44:32 PST
Unfortunately I can't pick up this bug. Any volunteer?
Brent Fulgham
Comment 2 2012-11-20 11:20:59 PST
If r135217 caused the build failure, then your proposed change should have corrected it. I don't see how changes to some implementation files in WebCore could have caused an unrelated WebKit2 file to fail to build. I guess the Qt EWS bots do not cover Windows builds..
Brent Fulgham
Comment 3 2012-11-20 14:15:00 PST
It looks like this is happening on the Qt-WIn build bot because it is using the SDK v7.0A, rather than the older "Windows Server 2003 R2 Platform SDK" documented in the Windows build instructions. The culprit seems to be that the <ObjBase.h> header file is not getting included automatically by the include of <Shlwapi.h>. <ObjBase.h> includes the definition for DECLARE_INTERFACE_IID_, which is the macro that is causing the problem. It looks like NOSHLWAPI is somehow getting defined in the Qt build (or maybe is also defined under the other Windows builds, but we don't see the problem because we are using a different version of the header). It looks like other examples of using <Shlwapi.h> are done like so (in other program source bases): #undef NOSHLWAPI #include <shlwapi.h> I am going to try to check this in (once the never-ending Layouttest update finishes) and see if it fixes the problem.
Simon Hausmann
Comment 4 2012-11-21 07:25:02 PST
I debugged this a bit now and the problem is that DECLARE_INTERFACE_IID_ depends on a previously defined "interface" pre-processor macro. However there's a Qt header file that wants to use the term "interface" in the API and therefore does an #undef on it. Only _later_ we include shlwapi.h that tries to use "interface" with no luck.
Simon Hausmann
Comment 5 2012-11-21 07:31:54 PST
Csaba Osztrogonác
Comment 6 2012-11-21 12:30:59 PST
(In reply to comment #4) > I debugged this a bit now and the problem is that DECLARE_INTERFACE_IID_ depends on a previously defined "interface" pre-processor macro. However there's a Qt header file that wants to use the term "interface" in the API and therefore does an #undef on it. Only _later_ we include shlwapi.h that tries to use "interface" with no luck. Good catch. ;)
Brent Fulgham
Comment 7 2012-11-21 14:03:56 PST
(In reply to comment #4) > I debugged this a bit now and the problem is that DECLARE_INTERFACE_IID_ depends on a previously defined "interface" pre-processor macro. However there's a Qt header file that wants to use the term "interface" in the API and therefore does an #undef on it. Only _later_ we include shlwapi.h that tries to use "interface" with no luck. Thank you so much for tracking this down! Sorry I couldn't figure it out without a Qt test environment.
Note You need to log in before you can comment on or make changes to this bug.