Bug 31407

Summary: [PATCH] [Qt] Compilation with Plugins disabled is broken
Product: WebKit Reporter: Ismail Donmez <ismail>
Component: New BugsAssignee: QtWebKit Unassigned <webkit-qt-unassigned>
Status: CLOSED FIXED    
Severity: Blocker CC: benjamin, commit-queue, hausmann, laszlo.gombos, vestbo
Priority: P3 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Other   
Bug Depends on:    
Bug Blocks: 35784    
Attachments:
Description Flags
Patch to fix compilation problem with plugins disabled.
laszlo.gombos: review-
build fix - rename file none

Description Ismail Donmez 2009-11-12 06:49:45 PST
Plugin code seems to be unhappy (this is on WinCE):

Generating Code...
        link /LIBPATH:"c:\Qt\QtCE\lib" /NOLOGO /NODEFAULTLIB:OLDNAMES.LIB /INCREMENTAL:NO /SUBSYSTEM:WINDOWSCE,5.00 /MACHINE:THUMB /DLL /VERSION:4.60 /OUT:..\lib\QtWebKit4.dll @C:\tmp\nmC8E1.tmp
   Creating library ..\lib\QtWebKit4.lib and object ..\lib\QtWebKit4.exp
PluginDatabase.obj : error LNK2019: unresolved external symbol "private: void __cdecl WebCore::PluginDatabase::getPluginPathsInDir
ectories(class WTF::HashSet<class WebCore::String,struct WebCore::StringHash,struct WTF::HashTraits<class WebCore::String> > &)con
st " (?getPluginPathsInDirectories@PluginDatabase@WebCore@@ABAXAAV?$HashSet@VString@WebCore@@UStringHash@2@U?$HashTraits@VString@W
ebCore@@@WTF@@@WTF@@@Z) referenced in function "public: bool __cdecl WebCore::PluginDatabase::refresh(void)" (?refresh@PluginDatab
ase@WebCore@@QAA_NXZ)
PluginDatabase.obj : error LNK2019: unresolved external symbol "public: static class WTF::Vector<class WebCore::String,0> __cdecl
WebCore::PluginDatabase::defaultPluginDirectories(void)" (?defaultPluginDirectories@PluginDatabase@WebCore@@SA?AV?$Vector@VString@
WebCore@@$0A@@WTF@@XZ) referenced in function "public: static class WebCore::PluginDatabase * __cdecl WebCore::PluginDatabase::ins
talledPlugins(bool)" (?installedPlugins@PluginDatabase@WebCore@@SAPAV12@_N@Z)
qwebplugindatabase.obj : error LNK2001: unresolved external symbol "public: static class WTF::Vector<class WebCore::String,0> __cd
ecl WebCore::PluginDatabase::defaultPluginDirectories(void)" (?defaultPluginDirectories@PluginDatabase@WebCore@@SA?AV?$Vector@VStr
ing@WebCore@@$0A@@WTF@@XZ)
PluginPackage.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl WebCore::PluginDatabase::isPreferredPlu
ginDirectory(class WebCore::String const &)" (?isPreferredPluginDirectory@PluginDatabase@WebCore@@SA_NABVString@2@@Z) referenced i
n function "public: int __cdecl WebCore::PluginPackage::compare(class WebCore::PluginPackage const &)const " (?compare@PluginPacka
ge@WebCore@@QBAHABV12@@Z)
..\lib\QtWebKit4.dll : fatal error LNK1120: 3 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\link.EXE"' : return code '0x460'

Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
Comment 1 Ismail Donmez 2009-11-12 07:20:55 PST
Directly related to git commit 8f810287200d21aded375664cc0a6ac0476dbdea, adding Tor Arne Vestbø to CC.
Comment 2 Laszlo Gombos 2009-11-16 21:47:10 PST
Related commit on WebKit trunk  - http://trac.webkit.org/changeset/50452.
Comment 3 Ismail Donmez 2010-02-09 16:25:26 PST
Ping please?
Comment 4 Laszlo Gombos 2010-02-10 05:19:27 PST
build-webkit --minimal builds for QtWebKit on Linux (r54549). If this error is not WinCE specific, than it is likely fixed. 

Does this only happens on WinCE ? 

Can you try the latest trunk ?
Comment 5 Ismail Donmez 2010-02-11 11:11:28 PST
Still does not work on WinCE its been 3 months...
Comment 6 Benjamin Poulain 2010-03-04 02:54:40 PST
Anybody can reproduce the issue?
Comment 7 Tor Arne Vestbø 2010-03-05 09:39:31 PST
Please follow the QtWebKit bug reporting guidelines when reporting bugs.

See http://trac.webkit.org/wiki/QtWebKitBugs

Specifically:

  - The 'QtWebKit' component should be used for bugs/features in the public QtWebKit API layer, not to signify that the bug is specific to the Qt port of WebKit

    http://trac.webkit.org/wiki/QtWebKitBugs#Component
Comment 8 Simon Hausmann 2010-03-17 15:34:41 PDT
Cartman, does this still happen? I recall recent fixes to WebCore/plugins to fix the build without plugin support.
Comment 9 Simon Hausmann 2010-03-19 06:22:39 PDT
Indeed, the build is broken with PluginViewNone.cpp

Easiest way to try: Change WebCore.pri and make sure ENABLE_NETSCAPE_PLUGIN_API=0 is defined.
Comment 10 Simon Hausmann 2010-03-19 06:23:32 PDT
Technically it's not _really_ Qt specific...
Comment 11 Ismail Donmez 2010-03-19 06:26:28 PDT
PluginViewNone issue is different than the original issue. I will have to re-test for the original issue.
Comment 12 Ismail Donmez 2010-03-24 23:05:08 PDT
Adding ENABLE_NETSCAPE_PLUGIN_API=0 to WebCore.pri did not fix the build:

..\..\..\WebCore\plugins\PluginView.cpp(1301) : error C2039: 'getValueStatic' : is not a member of 'WebCore::PluginView'
        c:\qt\wince5\webkit\webcore\plugins\PluginView.h(114) : see declaration of 'WebCore::PluginView'
..\..\..\WebCore\plugins\PluginView.cpp(1306) : error C3861: 'platformGetValueStatic': identifier not found
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\cl.EXE"' : return code '0x2
'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
Comment 13 Ismail Donmez 2010-03-25 09:11:05 PDT
My original bug report with --minimal not compiling still applies too & different from PluginViewNone problem.
Comment 14 Ismail Donmez 2010-04-27 08:22:36 PDT
Created attachment 54418 [details]
Patch to fix compilation problem with plugins disabled.
Comment 15 Laszlo Gombos 2010-04-27 09:16:05 PDT
This might work without any code changes with the following build instruction

build-webkit DEFINES+="ENABLE_NETSCAPE_PLUGIN_API=0" DEFINES+="QT_NO_LIBRARY". Can we try that ?
Comment 16 Ismail Donmez 2010-04-27 09:55:38 PDT
(In reply to comment #15)
> This might work without any code changes with the following build instruction
> 
> build-webkit DEFINES+="ENABLE_NETSCAPE_PLUGIN_API=0" DEFINES+="QT_NO_LIBRARY".
> Can we try that ?

This patch modifies the code path for ENABLE_NETSCAPE_PLUGIN_API=0 , which is the default for Windows CE anyway. Am I missing something?
Comment 17 Ismail Donmez 2010-05-05 01:00:56 PDT
Any comments on the patch? Currently QtWebKit does not compile on WinCE5 or WinCE6 without this patch.
Comment 18 Laszlo Gombos 2010-05-05 14:23:00 PDT
Comment on attachment 54418 [details]
Patch to fix compilation problem with plugins disabled.

This patch implements 3 stub functions for WINCE. I found two issues that should be looked into:

1./ WebCore/platform/qt/TemporaryLinkStubs.cpp implements these stubs for WINCE. How come they are not working ? 

2./ The proposed patch would break (for example) the SYMBIAN build if NETSCAPE_PLUGIN_API=1 (as the 3 symbols would be defined twice - see PluginDatabaseSymbian.cpp).
Comment 19 Ismail Donmez 2010-05-05 23:45:29 PDT
(In reply to comment #18)
> (From update of attachment 54418 [details])
> This patch implements 3 stub functions for WINCE. I found two issues that
> should be looked into:
> 
> 1./ WebCore/platform/qt/TemporaryLinkStubs.cpp implements these stubs for
> WINCE. How come they are not working ? 
> 
> 2./ The proposed patch would break (for example) the SYMBIAN build if
> NETSCAPE_PLUGIN_API=1 (as the 3 symbols would be defined twice - see
> PluginDatabaseSymbian.cpp).

Nice! Renaming TemporaryLinkStubs.cpp to TemporaryLinkStubsQt.cpp fixes the compilation error, looks like nmake is confused again. Can you checkin this as fix?
Comment 20 Simon Hausmann 2010-05-06 01:50:38 PDT
(In reply to comment #19)
> (In reply to comment #18)
> > (From update of attachment 54418 [details] [details])
> > This patch implements 3 stub functions for WINCE. I found two issues that
> > should be looked into:
> > 
> > 1./ WebCore/platform/qt/TemporaryLinkStubs.cpp implements these stubs for
> > WINCE. How come they are not working ? 
> > 
> > 2./ The proposed patch would break (for example) the SYMBIAN build if
> > NETSCAPE_PLUGIN_API=1 (as the 3 symbols would be defined twice - see
> > PluginDatabaseSymbian.cpp).
> 
> Nice! Renaming TemporaryLinkStubs.cpp to TemporaryLinkStubsQt.cpp fixes the
> compilation error, looks like nmake is confused again. Can you checkin this as
> fix?

Ohh, is the conflict between platform/qt/TemporaryLinkStubs.cpp and the fact that on Windows and WindowsCE we also compile files from platform/win and nmake sees TemporaryLinkStubs.cpp there, too, even though we don't actually want to compile it?
Comment 21 Ismail Donmez 2010-05-06 01:52:21 PDT
(In reply to comment #20)
> (In reply to comment #19)
> > Nice! Renaming TemporaryLinkStubs.cpp to TemporaryLinkStubsQt.cpp fixes the
> > compilation error, looks like nmake is confused again. Can you checkin this as
> > fix?
> 
> Ohh, is the conflict between platform/qt/TemporaryLinkStubs.cpp and the fact
> that on Windows and WindowsCE we also compile files from platform/win and nmake
> sees TemporaryLinkStubs.cpp there, too, even though we don't actually want to
> compile it?

Yes it seems to compile windows version, renaming the file fixes the compilation problem.
Comment 22 Laszlo Gombos 2010-05-06 07:36:50 PDT
Does it also work if you simply delete the platform/win/TemporaryLinkStubs.cpp file ?
Comment 23 Laszlo Gombos 2010-05-06 09:24:47 PDT
Created attachment 55249 [details]
build fix - rename file
Comment 24 WebKit Commit Bot 2010-05-06 13:27:04 PDT
Comment on attachment 55249 [details]
build fix - rename file

Clearing flags on attachment: 55249

Committed r58905: <http://trac.webkit.org/changeset/58905>
Comment 25 WebKit Commit Bot 2010-05-06 13:27:11 PDT
All reviewed patches have been landed.  Closing bug.
Comment 26 Simon Hausmann 2010-05-07 14:24:36 PDT
Revision r58905 cherry-picked into qtwebkit-2.0 with commit 3a8e1127101e1d92cdb2d3f7cb0dd98a07367a18