[webkit-qt] Problems integrating V8 in QtWebKit 2.2 for a MIPS target

Shrikant Dhumal teck.shri at gmail.com
Thu Aug 4 10:55:59 PDT 2011


I was wondering if one can easily get V8 engine integrated in QtWebKit
without changing a code in QtWebKit
On a MIPS target I want to use V8 instead of JavaScriptCore in QtWebKit
2.2(latest from git)

Here are the details of my setup,
- MIPS target and uses DirectFB
- Built Qt 4.7.4 (from git) successfully using MIPS Little Endian uclibc
toolchain
- Built V8 for MIPS (from https://github.com/paul99/v8m-rb) successfully
using MIPS Little Endian uclibc toolchain
- Building QtWebKit 2.2 (latest from git) using MIPS Little Endian uclibc
toolchain but getting errors in the process
commandline> WEBKITOUTPUTDIR=`pwd`/../qtwbkt-2.2
qtwebkit/Tools/Scripts/build-webkit --qt --release --v8 --netscape-plugin

Below is summary of changes I have done so far to get rid of most of the
errors,
qtwebkit/Source/WebCore/WebCore.pri
- edited value of V8_DIR to refer to correct path where V8 is built

qtwebkit/Source/WebCore
- applied patch for NPAPI support
- have to hand-edit few changes

qtwebkit/Source/WebCore/bindings/v8/npruntime_internal.h
- added macro exclusion for X11 if using DirectFB build

qtwebkit/Source/WebCore/bindings/v8/custom/V8PerformanceCustom.cpp
- added macro exclusion as listed in a qtwebkit bug
http://trac.webkit.org/changeset/88932

qtwebkit/Source/WebCore/loader/cache/CachedResourceRequest.cpp
- added wtf/UnusedParam.h as one of the includes

but now I am getting forward declaration error as,
.o ../../../open-src/qtwebkit/Source/WebCore/page/PageSerializer.cpp
In file included from
../../../open-src/qtwebkit/Source/WebCore/bindings/v8/ScriptState.h:35,
                 from
../../../open-src/qtwebkit/Source/WebCore/page/Console.h:35,
                 from
../../../open-src/qtwebkit/Source/WebCore/dom/ScriptExecutionContext.h:31,
                 from
../../../open-src/qtwebkit/Source/WebCore/dom/Document.h:38,
                 from
../../../open-src/qtwebkit/Source/WebCore/page/PageSerializer.cpp:38:
../../../open-src/v8m-rb/include/v8.h: In member function
'v8::Local<v8::Value> v8::Object::UncheckedGetInternalField(int)':
../../../open-src/v8m-rb/include/v8.h:3976: warning: cast from 'v8::Object*'
to 'v8::Object::UncheckedGetInternalField(int)::O**' increases required
alignment of target type
../../../open-src/v8m-rb/include/v8.h: In static member function 'static
void* v8::External::QuickUnwrap(v8::Handle<v8::Value>)':
../../../open-src/v8m-rb/include/v8.h:4002: warning: cast from 'v8::Value*'
to 'v8::External::QuickUnwrap(v8::Handle<v8::Value>)::O**' increases
required alignment of target type
../../../open-src/v8m-rb/include/v8.h: In member function 'void*
v8::Object::GetPointerFromInternalField(int)':
../../../open-src/v8m-rb/include/v8.h:4011: warning: cast from 'v8::Object*'
to 'v8::Object::GetPointerFromInternalField(int)::O**' increases required
alignment of target type
../../../open-src/v8m-rb/include/v8.h: In member function
'v8::String::ExternalStringResource* v8::String::GetExternalStringResource()
const':
../../../open-src/v8m-rb/include/v8.h:4037: warning: cast from 'v8::String*'
to 'v8::String::GetExternalStringResource() const::O**' increases required
alignment of target type
../../../open-src/v8m-rb/include/v8.h: In member function 'bool
v8::Value::QuickIsString() const':
../../../open-src/v8m-rb/include/v8.h:4063: warning: cast from 'v8::Value*'
to 'v8::Value::QuickIsString() const::O**' increases required alignment of
target type
../../../open-src/qtwebkit/Source/WebCore/page/PageSerializer.cpp: In member
function 'void WebCore::PageSerializer::serializeFrame(WebCore::Frame*)':
../../../open-src/qtwebkit/Source/WebCore/page/PageSerializer.cpp:211:
error: variable 'WTF::CString frameHTML' has initializer but incomplete type
../../../open-src/qtwebkit/Source/WebCore/page/PageSerializer.cpp:211:
error: invalid use of incomplete type 'struct WTF::CString'
../../../open-src/qtwebkit/Source/JavaScriptCore/wtf/Forward.h:38: error:
forward declaration of 'struct WTF::CString'
../../../open-src/qtwebkit/Source/WebCore/page/PageSerializer.cpp: In member
function 'void
WebCore::PageSerializer::serializeCSSStyleSheet(WebCore::CSSStyleSheet*,
const WebCore::KURL&)':
../../../open-src/qtwebkit/Source/WebCore/page/PageSerializer.cpp:279:
error: variable 'WTF::CString text' has initializer but incomplete type
../../../open-src/qtwebkit/Source/WebCore/page/PageSerializer.cpp:279:
error: invalid use of incomplete type 'struct WTF::CString'
../../../open-src/qtwebkit/Source/JavaScriptCore/wtf/Forward.h:38: error:
forward declaration of 'struct WTF::CString'

I have seen few posts on web conveying someone has already done this kind of
exercise, for some other target if not this. Any help?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20110804/b7186c1d/attachment.html>


More information about the webkit-qt mailing list