PDA

View Full Version : Complier issues while trying to build webkit on QT4 creator



Divya
30th January 2011, 15:37
Hi,

I have downloaded webkit source code using svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit. I am using ubuntu 10.10.
After this opened webkit.pro file in qt4 creator and tried to build the webkit project.
While building i found that libQtWebKit.so.4.9.0 and libQtWebKit.so.4.9 is not getting generated and i found the below complier errors.

obj/debug/moc_qwebinspector.o obj/debug/qrc_WebCore.o obj/debug/qrc_WebKit.o obj/debug/qrc_InspectorBackendStub.o -L../JavaScriptCore/debug -L/usr/X11R6/lib -L/usr/lib -ljscore -lXrender -lsqlite3 -lQtXmlPatterns -lQtGui -lQtNetwork -lQtCore -lpthread -lXext -lX11 -lm
collect2: ld terminated with signal 9 [Killed]
make[1]: *** [../lib/libQtWebKit.so.4.9.0] Error 1
make[1]: Leaving directory `/home/divya/WebKit/WebKitBuild/Release/WebCore'
make: *** [sub-WebCore-make_default] Error 2
make: Leaving directory `/home/divya/WebKit/WebKitBuild/Release'
The process "/usr/bin/make" exited with code %2.
Error while building project WebKit (target: Desktop)
When executing build step 'Make'

Note - I am trying to debug it with debug option by making below changes in WebCore.pro
# Remove the following 2 lines if you want debug information in WebCore
#CONFIG -= separate_debug_info
#CONFIG += no_debug_info

I made sure that i have installed below packages -

# g++
# make
# libglib2.0-dev
# libSM-dev
# libxrender-dev
# libfontconfig1-dev
# libxext-dev
# libfreetype6-dev
# libx11-dev
# libxcursor-dev
# libxfixes-dev
# libxft-dev
# libxi-dev
# libxrandr-dev

(Attaching the Logs)

Please help me resolve these complier errors.

wysota
30th January 2011, 17:51
Looks like your ld crashed on you with SIGKILL. This has nothing to do with WebKit or Qt but is strictly related to your binutils. You might be running out of memory or something like that.

SixDegrees
30th January 2011, 21:38
Note, also, that the version of Webkit shipped with Qt has (usually) been heavily modified before bundling. Building Webkit is a nightmare, and ranges from difficult to impossible, so the Qt folks try to come up with an approach that works to save their customers the headache. Even with that additional effort, Webkit often fails to build on some platforms or with some compilers.

Although Webkit provides a lot of nice features, it is a monolithic, utterly un-modular block of code that introduces a host of dependencies into a project. It would be welcome if Qt could find a more streamlined, workable solution.

Divya
31st January 2011, 09:04
@wysota,

Thanks for your input.

I have verified with the binutils , from which i got to know that only the utillities are related to the binutils and the same was working fine for building Webkit+qt without debug symbols.

Regarding the memory i have enough amount memory ( checked #df -lh ) which was showing more than10GB.

Please suggest me any solution you find.

Regards
Divya

wysota
31st January 2011, 09:18
By memory I mean RAM and not disk space.

tbscope
31st January 2011, 09:35
Building Qt Webkit with -debug is a big pain in the butt memory wise.
I can only do that on one pc. My laptop fails to build Qt Webkit with debug symbols.
You need a truck load of RAM memory.

I wish Qt split it up more instead of putting all that code in one library.

Divya
31st January 2011, 11:49
My Laptop has 3G RAM. Will it help ?

My Idea is to debug Wekbit with help of QT as framework ?
Can i get any of your suggestions which can help me debug webkit and get its code flow ?

wysota
31st January 2011, 15:46
3G is probably not enough to link WebKit in debug mode. Maybe there are some memory optimizations you can enable at build time.