Building WinCE Webkit as dlls not static

258 views
Skip to first unread message

barak_...@hotmail.com

unread,
Aug 3, 2011, 10:12:10 PM8/3/11
to Windows CE WebKit
Hi all,

I was able to successfully create WebKit as a static library, however,
my WinCE device only has 128MB ram, so I am attempting to build WebKit
as a bunch of dlls so I can debug components in the device. I figured
out how to configure the system with CMake to create a dll build by
using the following command:
cmake -G "Visual Studio 9 2008" -DCMAKE_WINCE_SDK="MySDK (ARMV4I)" -
DSHARED_CORE=ON -DPROJECT_VERSION="1" -DBUILD_SHARED_LIBS=ON -
DPROJECT_VERSION_MAJOR="1" -DPORT=WinCE -D3RDPARTY_DIR=C:/webkit-
thirdparty C:\WebKit\Source
which succeeds configuring/generating.

However when I compile the solution in VS2008 the library WTF
(really?) fails. I can see in the code that there are comments about
breakages happening with the includes in WTF for the JSC strings
files.
The errors I receive are:
t>DateMath.obj : error LNK2019: unresolved external symbol "private:
void __cdecl JSC::Heap::reportExtraMemoryCostSlowCase(unsigned int)" (?
reportExtraMemoryCostSlowCase@Heap@JSC@@AAAXI@Z) referenced in
function "public: void __cdecl
JSC::Heap::reportExtraMemoryCost(unsigned int)" (?
reportExtraMemoryCost@Heap@JSC@@QAAXI@Z)
t>DateMath.obj : error LNK2019: unresolved external symbol "private:
void __cdecl JSC::Heap::reportExtraMemoryCostSlowCase(unsigned int)" (?
reportExtraMemoryCostSlowCase@Heap@JSC@@AAAXI@Z) referenced in
function "public: void __cdecl
JSC::Heap::reportExtraMemoryCost(unsigned int)" (?
reportExtraMemoryCost@Heap@JSC@@QAAXI@Z)
2>DateMath.obj : error LNK2019: unresolved external symbol "private:
void * __cdecl JSC::Heap::allocateSlowCase(struct
JSC::NewSpace::SizeClass &)" (?
allocateSlowCase@Heap@JSC@@AAAPAXAAUSizeClass@NewSpace@2@@Z)
referenced in function "public: void * __cdecl
JSC::Heap::allocate(struct JSC::NewSpace::SizeClass &)" (?
allocate@Heap@JSC@@QAAPAXAAUSizeClass@NewSpace@2@@Z)
2>DateMath.obj : error LNK2019: unresolved external symbol "private:
void __cdecl JSC::SmallStrings::createSingleCharacterString(class
JSC::JSGlobalData *,unsigned char)" (?
createSingleCharacterString@SmallStrings@JSC@@AAAXPAVJSGlobalData@2@E@Z)
referenced in function "public: class JSC::JSString * __cdecl
JSC::SmallStrings::singleCharacterString(class JSC::JSGlobalData
*,unsigned char)" (?
singleCharacterString@SmallStrings@JSC@@QAAPAVJSString@2@PAVJSGlobalData@2@E@Z)
2>DateMath.obj : error LNK2019: unresolved external symbol "public:
static unsigned int __cdecl JSC::Identifier::toUInt32(class
JSC::UString const &,bool &)" (?
toUInt32@Identifier@JSC@@SAIABVUString@2@AA_N@Z) referenced in
function "public: unsigned int __cdecl JSC::Identifier::toUInt32(bool
&)const " (?toUInt32@Identifier@JSC@@QBAIAA_N@Z)
2>DateMath.obj : error LNK2001: unresolved external symbol "public:
virtual bool __cdecl JSC::JSCell::isGetterSetter(void)const " (?
isGetterSetter@JSCell@JSC@@UBA_NXZ)
2>DateMath.obj : error LNK2001: unresolved external symbol "public:
virtual enum JSC::CallType __cdecl JSC::JSCell::getCallData(union
JSC::CallData &)" (?getCallData@JSCell@JSC@@UAA?
AW4CallType@2@AATCallData@2@@Z)
2>DateMath.obj : error LNK2001: unresolved external symbol "public:
virtual enum JSC::ConstructType __cdecl
JSC::JSCell::getConstructData(union JSC::ConstructData &)" (?
getConstructData@JSCell@JSC@@UAA?
AW4ConstructType@2@AATConstructData@2@@Z)
2>DateMath.obj : error LNK2001: unresolved external symbol "public:
virtual bool __cdecl JSC::JSCell::getUInt32(unsigned int &)const " (?
getUInt32@JSCell@JSC@@UBA_NAAI@Z)

I'm not sure how to proceed fixing this issue... It seems to be a
dllimport/export but I am not sure how to go about configuring it
correctly in this build environment.

Cheers,
Barak.

Patrick Gansterer

unread,
Aug 4, 2011, 2:21:32 AM8/4/11
to wince...@googlegroups.com
On Wed, 3 Aug 2011 19:12:10 -0700 (PDT), "barak_...@hotmail.com"
<barak_...@hotmail.com> wrote:
> Hi all,
>
> I was able to successfully create WebKit as a static library, however,
> my WinCE device only has 128MB ram, so I am attempting to build WebKit
> as a bunch of dlls so I can debug components in the device.
I usually compile with ReleasWithDebugInfo and then turn off the
optimization only for the relevant files. This keeps the executable size in
an acceptable range and allows debugging. IMO splitting the executable into
dlls won't help you a lot, since the WebCore code is very very big.

> I figured out how to configure the system with CMake to create a dll
build by
> using the following command:
> cmake -G "Visual Studio 9 2008" -DCMAKE_WINCE_SDK="MySDK (ARMV4I)" -
> DSHARED_CORE=ON -DPROJECT_VERSION="1" -DBUILD_SHARED_LIBS=ON -
> DPROJECT_VERSION_MAJOR="1" -DPORT=WinCE -D3RDPARTY_DIR=C:/webkit-
> thirdparty C:\WebKit\Source
> which succeeds configuring/generating.
>
> However when I compile the solution in VS2008 the library WTF
> (really?) fails.

WTF = Web Template Framework :-)

> I'm not sure how to proceed fixing this issue... It seems to be a
> dllimport/export but I am not sure how to go about configuring it
> correctly in this build environment.

The main problem is that the WebKit code does not use dllimport/export at
the moment. :-(
It uses exports files, where alle required symbols are listed.
Kevin Oliver already started working on this issue, but it's not
completely upreamed to the main repository.
e.g see https://bugs.webkit.org/show_bug.cgi?id=27551

-- Patrick

barak_...@hotmail.com

unread,
Aug 4, 2011, 8:25:51 PM8/4/11
to Windows CE WebKit
When I attempt to debug the application when I set it to
ReleaseWithDebugInfo I cannot hit a breakpoint in the
WinCELauncher.exe. I can see the changes I make to the form, ie title,
webpage to load - makes it into the exe, but if I place a breakpoint
on the webView->load(homeUrl); function I never hit it, debug trace
I've added appears but I can't inspect etc. When I hit pause VS2008
complains that it doesn't understand any of the symbols, and it takes
me straight to the dissassembler and all the instructions/values are
0...
Ie: 8022A9D0 andeq r0, r0, r0
I thought that might be due to the fact that the pdb file is 128MB,
and my device only has 128MB RAM total, then there is the RAM that is
taken up by WinCE itself, probably leaving 70MB total free in the
system.

Not sure what to do from here. I can debug other executables, both C++
and C#, that I have created against my SDK and have tested them on the
same board and they all function normally, but none of them have
libraries of the size of WebKit. I would like to try to use WebKit or
at least demo the functionality on WinCE but I can't even get it to
load a hello world html file...

Any ideas of how to proceed?

On Aug 4, 4:21 pm, Patrick Gansterer <par...@paroga.com> wrote:

Patrick Gansterer

unread,
Dec 8, 2012, 4:35:06 AM12/8/12
to wince...@googlegroups.com
On Wednesday, November 21, 2012 11:30:22 PM UTC+1, Oscar López wrote:
Hi, we are really interested to test de port like a DLL. Please could you provide me a test DLL to integrate it in a project and launch some content

Main problem with a DLL is that the current WebKit version does not provide a API with __declspec(dllexport) (see http://trac.webkit.org/browser/trunk/Source/WebKit/wince/WebView.h). So if you want to embed WebKit the easiest way is to compile it yourself (as lib) and link it to your application.

-- Patrick 

Patrick Gansterer

unread,
Jan 22, 2013, 1:59:05 AM1/22/13
to wince...@googlegroups.com
Which version do you try to compile? Please check the WinCE Buildbot at http://build.webkit.org/builders/WinCE%20Release%20%28Build%29 to see which version does build without modifications.
If you ask for help, at least include informations about your errors. Otherwise nobody can help you.

-- Patrick

On Monday, January 21, 2013 3:22:23 PM UTC+1, Angel Martinez wrote:
Hi Patrick,

I'm trying do it the same. I have try to compile the webkit same a lib, but it's not possible. I have many errors into my compilations.

You can help me?

Angel Martinez

unread,
Jan 22, 2013, 6:35:02 AM1/22/13
to wince...@googlegroups.com
Hi,
 
I'm copiled correctly 8 libs, libjpeg.lib, libpng.lib, libxml2.lib,libxslt.lib, sqlite.lib, WebCoreTestSupport.lib, WTF.lib, zlib.lib.
 
When i'm trying compile the WebCore.lib it's failed.
 
The error is:
9>Proyecto : warning PRJ0018 : No se encontraron las siguientes variables de entorno:
9>$(PLATFORMDEFINES)
 
the message translate is "Don't find the next environment variables: $(PLATFORMDEFINES)"
 
The last Change file log is ChangeLog-2012-10-02, into de WebCore Source
 
I'm trying compiler with de CMake 2.8.3 modified for support de WinCE

Angel Martinez

unread,
Jan 22, 2013, 7:47:15 AM1/22/13
to wince...@googlegroups.com
Hi Patrick,
 
also the last error i have other error with the JavaScriptCore.lib.
 
the report error is the next
 
Microsoft (R) Visual Studio versión 8.0.50727.762.
Copyright (C) Microsoft Corp 1984-2005. Reservados todos los derechos.
1>------ Operaci¢n Generar iniciada: proyecto: JavaScriptCore (JavaScriptCore\JavaScriptCore), configuraci¢n: Release STANDARDSDK_500 (ARMV4I) ------
1>Compilando...
1>CodeProfile.cpp
1>C:\CEWebKit\WebKit\Source\JavaScriptCore\bytecode\CodeBlock.h(241) : error C2784: 'ArrayElementType *WTF::binarySearch(const ArrayType &,size_t,KeyType,const ExtractKey &)' : could not deduce template argument for 'overloaded function type' from 'overloaded function type'
1>        C:\CEWebKit\WebKit\Source\WTF\wtf/StdLibExtras.h(247) : see declaration of 'WTF::binarySearch'
1>C:\CEWebKit\WebKit\Source\JavaScriptCore\bytecode\CodeBlock.h(241) : error C2784: 'ArrayElementType *WTF::binarySearch(const ArrayType &,size_t,KeyType,const ExtractKey &)' : could not deduce template argument for 'const ArrayType &' from 'WTF::Vector<T>'
1>        with
1>        [
1>            T=JSC::StructureStubInfo
1>        ]
 
How can do it?
 
thanks

El martes, 22 de enero de 2013 07:59:05 UTC+1, Patrick Gansterer escribió:

Angel Martinez

unread,
Jan 22, 2013, 10:26:14 AM1/22/13
to wince...@googlegroups.com
Hi, Patrick,
 
Is very urgent, for me, finalize with this step. I have many problems for complete correctly this step.
 
While i end to the compile the project, is posible that you can give me the final binary of the project (*.lib and .exe), while, we can continue with our project?
 
Thanks
 
Best regards

Patrick Gansterer

unread,
Jan 22, 2013, 10:51:25 AM1/22/13
to wince...@googlegroups.com
Please use a version before r137709. Or apply the patch from http://webkit.org/b/105767. Maybe there are additional erros in the meantime, so I suggest a older version.

Angel Martinez

unread,
Jan 22, 2013, 11:46:11 AM1/22/13
to wince...@googlegroups.com

thanks, just in this moment, i have applied the patch.

I wish that this patch resolve my problems
 
Best regards

El jueves, 4 de agosto de 2011 04:12:10 UTC+2, barak_...@hotmail.com escribió:

Angel Martinez

unread,
Jan 23, 2013, 12:22:16 PM1/23/13
to wince...@googlegroups.com
Hi Patrick,

apply the patch, and the problem is corrected JavaScriptCore.lib.

Now I have problem with WebCore.lib. The error is as follows:

1>Compiling...
1>RenderSVGShape.cpp
1>RenderSVGRoot.cpp
1>RenderSVGResourceSolidColor.cpp
1>RenderSVGResourceRadialGradient.cpp
1>RenderSVGResourcePattern.cpp
1>RenderSVGResourceMasker.cpp
1>RenderSVGResourceMarker.cpp
1>RenderSVGResourceLinearGradient.cpp
1>AutoscrollController.cpp
1>..\..\..\CEWebKit\WebKit\Source\WebCore\page\AutoscrollController.cpp(250) : error C2039: 'updateSelectionForMouseDrag' : is not a member of 'WebCore::EventHandler'
1>        c:\cewebkit\webkit\source\webcore\page\EventHandler.h(97) : see declaration of 'WebCore::EventHandler'
1>Generating Code...
1>Proyecto : warning PRJ0018 : No se encontraron las siguientes variables de entorno:
1>$(PLATFORMDEFINES)
1>El registro de generación se guardó en el "file://c:\WebKitBuild\Source\WebCore\WebCore.dir\Release\BuildLog.htm"
1>WebCore - 1 errores, 0 advertencias
 
There any patch for resolve this error?
 
thanks

Angel Martinez

unread,
Jan 26, 2013, 2:45:10 PM1/26/13
to wince...@googlegroups.com
Hi Patrick,
 
I downloaded the version 137708, and i haven't compile de webcore.lib. Now i have news error compiler.
 
Can you say me wath version is correct for compile?
 
Thanks

Patrick Gansterer

unread,
Jan 28, 2013, 12:42:52 PM1/28/13
to wince...@googlegroups.com
Hi,

I've commited a few changes and with the patch at bug 105767 I'm able
to build r140928.
If you want help: PLEASE include your error messages, otherwise nobody
can help you

-- Patrick

On Sat, 26 Jan 2013 11:45:10 -0800 (PST), Angel Martinez wrote:
> Hi Patrick,
>
> I downloaded the version 137708, and i haven't compile de
> webcore.lib.
> Now i have news error compiler.
>
> Can you say me wath version is correct for compile?
>
> Thanks
>
> El martes, 22 de enero de 2013 16:51:25 UTC+1, Patrick Gansterer
> escribió:
>
>> Please use a version before r137709. Or apply the patch from . Maybe
>>>> thirdparty C:WebKitSource
> --
> You received this message because you are subscribed to the Google
> Groups "Windows CE WebKit" group.
> To post to this group, send email to wince...@googlegroups.com.
> To unsubscribe from this group, send email to
> wincewebkit...@googlegroups.com.
> Visit this group at http://groups.google.com/group/wincewebkit?hl=en
> [1].
> For more options, visit https://groups.google.com/groups/opt_out
> [2].
>
>
>
> Links:
> ------
> [1] http://groups.google.com/group/wincewebkit?hl=en
> [2] https://groups.google.com/groups/opt_out

Reply all
Reply to author
Forward
0 new messages