Bug 27385
Summary: | [chromium] build break in nprutime_internal.h | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Roman <eroman> |
Component: | WebKit Misc. | Assignee: | Eric Roman <eroman> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | evan, levin |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | OS X 10.5 |
Eric Roman
PluginDebug.cpp (a recently added file in http://trac.webkit.org/changeset/46023) tickled this problem.
On mac/linux chromium the:
#include "npapi.h"
line in WebKit/WebCore/bindings/v8/npruntime_internal.h
Ends up pulling in the wrong file. It pulls in:
"src/third_party/npapi/bindings/npapi.h"
Rather than:
"src/third_party/WebKit/WebCore/bridge/npapi.h"
The general problem is there are too many copies of npapi.h in chromium's code base:
% find . -name "npapi.h"
./third_party/npapi/npspy/extern/plugin/npapi.h
./third_party/npapi/bindings/npapi.h
./third_party/WebKit/WebCore/bridge/npapi.h
./native_client/src/third_party/npapi/files/include/npapi.h
And the include search path is probably wrong.
Symptoms:
In file included from
/b/slave/webkit-rel-linux-webkit-org/build/src/third_party/WebKit/WebCore/bindings/v8/npruntime_internal.h:31,
from
/b/slave/webkit-rel-linux-webkit-org/build/src/third_party/WebKit/WebCore/plugins/PluginDebug.h:31,
from
/b/slave/webkit-rel-linux-webkit-org/build/src/third_party/WebKit/WebCore/plugins/PluginDebug.cpp:29:
/b/slave/webkit-rel-linux-webkit-org/build/src/third_party/WebKit/WebCore/plugins/npfunctions.h:66:
error: 'NPNURLVariable' has not been declared
/b/slave/webkit-rel-linux-webkit-org/build/src/third_party/WebKit/WebCore/plugins/npfunctions.h:67:
error: 'NPNURLVariable' has not been declared
/b/slave/webkit-rel-linux-webkit-org/build/src/third_party/WebKit/WebCore/plugins/npfunctions.h:73:
error: 'NPCoordinateSpace' has not been declared
/b/slave/webkit-rel-linux-webkit-org/build/src/third_party/WebKit/WebCore/plugins/npfunctions.h:73:
error: 'NPCoordinateSpace' has not been declared
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Levin
I'm not familiar with the header file and why there are so many copies (may be you can look at who added the file or who added the path the to the include path).
General note: It seems odd that src/third_party/npapi/bindings/ is in the search path at all since chromium code usually has a path to includes.
Perhaps the solution is to remove that from the path and qualify paths better that need to get to the copy there.
Eric Roman
@levin: I believe it is being added by this:
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/npapi/npapi.gyp?view=markup
Eric Roman
Perhaps then this is a gyp problem, where the include directories are being leaked outside of the specific target.
Eric Roman
> Perhaps then this is a gyp problem, where the include directories
> are being leaked outside of the specific target.
Apparently this is intentional, since it is within a "direct_dependent_settings" block.
Eric Roman
Hacked around this chromium-side.