WebKit on FreeBSD


Today I decided I should give WebKit a try. WebKit seems really neat and it would be great to have an alternative to Firefox that isn't Desktop Enviornment bound. I got it to compile aside from a couple of issues, the folks in #webkit on freenode are super helpful and quick to respond. I even got one of the fixes I had to make committed while I was still working on getting WebKit to compile. :)

WebKitQT uses QT4 which is really a pretty cool framework for doing GUI app development, and it makes it possible to do some really neat effects, and tricks. One of them is evident in the Test QT browser that comes with WebKit. A progress bar is overlaid ontop of a page as the page loads, which disappears once you start to scroll. I thought it was pretty neat. On top of that the test browser is really fast, especially in light of some of the issues I'll go into in a bit. The rendering also looks really nice, the fonts look better to my eyes then they do in firefox.

Anyway, I ran into some issues and so I'd like to both inform people of them and see if anyone with some FreeBSD threading-fu can lend their brain:

  1. Firstly, I had to fix it to set a define so it would call pthread_attr_get_np() instead of the Linux equivalent. I later ran into a Bus error which I found was fixable by calling pthread_attr_init() on the attr struct before trying to set it with pthread_attr_get_np(). I did this since the manpage said it was HIGHLY RECOMMENDED and it did fix the problem which was causing javascript to crash the test browser

  2. It doesn't run outside of gdb. If I try to run it outside of gdb it will eat about 90% of my cpu in state ksesig without ever loading a browser window. I've put the thread apply all bt here. This is a backtrace from when I start the test browser outside of gdb and then attach gdb to the running process. I'm really not sure what's going on here, and it's further annoying that it works just fine if started up inside gdb. Anyone got some insight into what FreeBSD might be doing in this case? I'm using FreeBSD 6.2-STABLE from Sat Feb 3 22:51:13 PST 2007.

Anyway, WebKitQT is really neat, and I'd really like to see it get solid FreeBSD support so that when it's released for real I can add a port that actually works and doesn't require much or any patching. :)


published at Thu Apr 19 22:58:15 2007 (-0700) by alexbl
Tags: freebsd, webkit, qt4
| |