Saturday, October 22, 2011

best debugging tools I used on ubuntu for c/c++

During the webkit development I was like "swarg" means "heaven" while working with windows machines, I am not a lover/follower of windows but I think the reason for popularity of windows for developers is just because it has a great tool Visual Studio. As time passed due to ease of cross-platform building and freeing our machines from heavy load of Visual Studio I decided to switch to ubuntu.

And the very next problem came to me was how to debug code? I know the gdb lovers would hate this but for newbies ans VS lovers its nightmare to handle such huge code of webkit from command line.

But you cant skip gdb when you are on linux. So what was the option..? Well answer was simple and nit.

Thanks to gui based IDEs with gdb in backend.
CodeLite is cross-platform and an open source IDE for c and c++ programming. It is available on ubuntu software center or you can download package from here.


Qt-Creator is also cross-platform IDE. It is developer for qt developer needs but you can import your other c++ and java project inside it and debug them easily by setting project properties. Auto complete feature and other shortcuts to symbol definition, declarations are just out of the box.


But personally I would recommend QtCreator because of its Simple Interface and importantly if you have low configuration codelite is not for you. Codelite take almost an half an hour to add files to webkit project.

Well if anyone have issues setting up projects with codelite or qt-creator let me know. BTW I will publish steps for that soon.

Note:: to be able to debug the core with any of these you need to launch codelite/qt-creator with sudo permission.


Ubuntu 11.10 (Oneiric) issue with Ubuntu Software Center

After being exited that Ubuntu new version(11.10) has launched got disappointed after first boot immediately.

WiFi issue for my dell laptop is still there. // Though I have work-around, expecting more.
Option for classic menu was gone, and new look n fill is annoying.
Already installed google-chrome is not working after upgrade.
Fortunately I had backup for all .deb packages, but on double click it opens the Ubuntu Software Center which get hang and I am not able to install any packages. I had to install all downloaded packages via terminal as

sudo dpkg -i your_downloaded_package.deb

I am worried/surprised in OS war Ubuntu have released such unstable version.

Tuesday, October 18, 2011

[Fixed] dell laptops having trouble with WiFi on ubuntu

Few days back I got my laptop for R&D purpose named Dell latitude D830 (I know its outdated). And no wonder on first boot of ubuntu(natty) I discovered that my WiFi is not working. I was having hardware BroadCom BCM4328 802.11/a/b/g/n (rev 03). After searching for long hours on google I found following solution to fix up this and thought it would help you too.

So if you are have any of these wifi driver BCM4311-, BCM4312-, BCM4313-, BCM4321-,BCM4322-, BCM43224-, and BCM43225-, BCM43227- and BCM43228- ie. in short BMC43XX please follow the below steps.

1) go to terminal and type below command
sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9
2) edit /etc/modprobe.d/blacklist and add following lines to it
blacklist bcm43xx

blacklist ssb
3) search on google for bcmw15.inf and download it. I hope you wont find ant trouble finding this.

4) back to terminal and install the driver using ndiswrapper
sudo su

ndiswrapper -i bcmwl5.inf
5) Add this module to linux kernel
modprobe ndiswrapper
6) Load ndiswrapper kernel module during boot and reboot.
echo ndiswrapper >> /etc/modules
7) reboot and enjoy :)

Saturday, October 15, 2011

building webkit gtk on linux (ubuntu)

  • Here are the simple steps to build webkit gtk port on linux (Ubuntu).


In order to build the webkit on linux you need to follow the below steps.

1) Installing dependencies.
Create a shell script deps.sh in your folder and copy bellow contents to it.
apt-get install subversion gtk-doc-tools autoconf automake libtool libgtk2.0-dev libpango1.0-dev libicu-dev libxslt-dev libsoup2.4-dev libsqlite3-dev gperf bison flex libjpeg62-dev libpng12-dev libxt-dev autotools-dev libgstreamer-plugins-base0.10-dev libenchant-dev libgail-dev
run the deps.sh as admin.
sudo sh deps.sht
2) Getting the source code.
There are two options for getting the source code.
i) download the tar ball from http://nightly.webkit.org/ under source.
This is the faster way of getting the code but it is recommended if you want to just wants play with the the code and not to contributing to webkit community. Note this will not give you the Layout Tests.

ii) checkout the code
svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit

This is the slower but recommended if you want to just wants to contribute to webkit community. This will also checkout the LayoutTests for you.