Wednesday, October 6, 2010

Problems with perl when building WebKit on Windows (even for Symbian)?

Seen this error message before?



python C:/dev/webkit/WebCore/html/parser/create-html-entity-table -o generated/HTMLEntityTable.cpp C:/dev/webkit/WebCore/html/parser/HTMLEntityNames.in
perl C:/dev/webkit/WebCore/make-hash-tools.pl generated C:/dev/webkit/WebCore/html/DocTypeStrings.gperf
syntax error at C:/dev/webkit/WebCore/make-hash-tools.pl line 149, near "} continue"
syntax error at C:/dev/webkit/WebCore/make-hash-tools.pl line 151, near "}"
Execution of C:/dev/webkit/WebCore/make-hash-tools.pl aborted due to compilation errors.
make: *** [generated\DocTypeStrings.cpp] Error 9
make: Leaving directory `C:/dev/webkit/WebCore'
Failed to generate WebCore's derived sources!



The reason is most likely that the files in your working directory - including the perl script(s) - are checked out with Windows line-endings and your perl version doesn't like it. The build of WebKit works most reliably with Unix linefeeds, so here is how you can convert your existing checkout:

git config core.autocrlf false
del .git\index
git read-tree HEAD
git checkout -f

2 comments:

  1. Another issue you may have:
    echo '#ifndef QT_QTWEBKIT_MODULE_H' > ../../../include/QtWebKit/QtWebKit && echo '#define QT_QTWEBKIT_MODULE_H' >> ../../../include/QtWebKit/QtWebKit && echo '#include \' >> ../../../include/QtWebKit/QtWebKit [...]
    The system cannot find the path specified.
    make: *** [../../../include/QtWebKit/QtWebKit] Error 1

    This is caused if you have 'sh' in your path.
    Make sure 'sh' is not in your path, clean, and rebuild again.

    Reasons 'sh' could be in your path: When you installed 'git' you told it to include it's extra tools in your system path. Instead, you should have picked the safest option. To fix this, just change your system path for git from ...\Git\bin to ...\Git\cmd

    ReplyDelete