Sunday, 11 July, 2010

Building QtWebKit on Windows – Few common issues

In continuation to my last blog entry, here I’m trying to capture few common problems that I encountered along with possible solutions for them, in the process of building QtWebKit for windows.

Listing out issues and followed by possible solution for them:

1. ERROR: qmake missing but required to build WebKit.

Make sure QTDIR env variable is set and PATH variable includes path to Qt bin folder.

set QTDIR=C:\Qt\4.6.3

set PATH=%PATH%;%QTDIR%\bin;

2. ERROR: flex, bison, gperf missing but required to build WebKit.

Have you installed GNUWin32 tools? Also, include GNUWin32 bin path under PATH env variable.

set PATH=%PATH%;C:\GnuWin32\bin;

3. 'nmake' is not recognized as an internal or external command

Make sure you have installed MS Visual Studio. Also try running the webkit build script from within Visual Studio 2008 Command Prompt.

4. Failed to generate WebCore's derived sources!Can't locate in @INC

Is Active Perl installed? Active Perl v5.10 or higher is required. Update PATH env variable with perl bin folder paths.

set PATH=C:\Perl\site\bin;C:\Perl\bin;%PATH%

5. Cannot open include file: 'windows.h': No such file or directory

Microsoft Platform SDK need to be installed. INCLUDE and LIB env variables need to be updated.

set INCLUDE=%INCLUDE%;C:\Program Files\Microsoft SDKs\Windows\v6.0\Include

set LIB=%LIB%;C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib

6. JavaScriptCore\DerivedSources\chartables.c (13) : error C2466: cannot allocate an array of constant size 0

This issue arises because of usage of wrong version of perl to generate derived sources.

To solve this issue, we need to install Active Perl v5.10 and regenerate derived sources. For regenerating the derived sources, delete the ‘WebKitBuild’ folder and restart the build by launching the ‘build-webkit’ script again.

7. LINK : fatal error LNK1210: exceeded internal ILK size limit; link with /INCREMENTAL:NO

Not sure why visual studio crib with such a linker error. As a quick solution, we need to disable incremental linking.

Update webkit.pri by adding linker flag to disable incremental linking:


Restart the build by launching the ‘build-webkit’ script again.

1 comment:

Anonymous said...

Thanks for the blog.
I was having problem with VC++ 2008. Webkit was failing to generate derived sources. I updated perl and it worked fine. Thanks :)
- Prashant