Blog Image

MikeK's software notebook

What you will find

This used to be the place where I wrote stuff I was thinking about while working on the Mozilla project.

Maybe in the near future I'll start to update it again as I'm involved in a couple of new open-source projects - updates pending...

mozilla-central/widget/src/qt/nsWindow.cpp:259: error: ‘OpenGL2’ is not a member of ‘QPaintEngine’

Why did I reboot? Posted on 28 May, 2010 16:03:24

This was one of the more easy errors to fix – that is _after_ I realized what the problem was, because the error message didn’t help at all…

So if you get something like:

mozilla-central/widget/src/qt/nsWindow.cpp:259: error: ‘OpenGL2’ is not a member of ‘QPaintEngine’

when you build in Scratchbox (Fremantle), then the problem is that your Qt dev files are out of date, to fix it, log into scratchbox and do:

> apt-get update
> fakeroot apt-get upgrade

After this you will need to re-install some of the Qt stuff

> apt-get install libqt4-gui

I had to delete my build directory (the one MOZ_OBJDIR points to in your mozconfig) afterwards too.


This post is also available in Belorussian, translated by Patricia Clausnitzer, posted on Fatcow.

configure: error: Couldn’t find curl/curl.h which is required for the crash reporter. Use –disable-crashreporter to disable the crash reporter.

Why did I reboot? Posted on 29 Mar, 2010 10:08:37

Of cause you can disable the crash reporter if you get this error when building Firefox/Fennec/what ever you are building. But you can also choose to continue building it by installing the missing files.

On an Ubuntu system you can install the curl development files by doing:

$ sudo apt-get install libcurl4-openssl-dev

This will use OpenSSL for SSL support, if you prefer the GnuTLS, then install libcurl4-gnutls-dev instead.

configure: error: Can’t find header GL/glx.h for WebGL (install mesa-common-dev (Ubuntu), mesa-libGL-devel (Fedora), or Mesa (SuSE))

Why did I reboot? Posted on 10 Feb, 2010 15:26:54

If when building in Scratchbox you get an error like:

configure: error: Can’t find header GL/glx.h for WebGL (install mesa-common-dev (Ubuntu), mesa-libGL-devel (Fedora), or Mesa (SuSE))

The solution is to update your mozconfig with the following line:

ac_add_options –with-maemo-version=5

for a complete mozconfig check:

How to setup the build environment to build Fennec for Qt with the MAEMO 5 SDK (Fremantle) in scratchbox on Ubuntu

Why did I reboot? Posted on 02 Feb, 2010 14:35:04

Note: the following instruction should also work on top of previous installations of scratchbox, you don’t need to uninstall the previous version, but you should be logged out of it.

Install the Nokia development kit for the N900 (MAEMO 5 SDK). I choose:

Run it by:
$ sudo python ./

(If you don’t have python, you need to install it first, follow the on-screen instructions)

This will launch the GUI installer, chose to install the development version. This will install scratchbox and most of the libraries that you will need.

Launch scratchbox:
$ scratchbox

Now you can choose the platform you want to work on with the scratchbox tools:

> sb-menu

Choose “FREMANTLE ARMEL” to run code natively on the N900.

You now need to install a few libraries from inside scratchbox:

> apt-get install python2.5 libqt4-core libqt4-gui libqt4-dev libidl-dev

There are two important things you will need to remember in your mozconfig:

1) tell it to use Qt:
ac_add_options –enable-default-toolkit=cairo-qt

2) Currently we also need to disable crashreporter as it hasn’t been converted to Qt
ac_add_options –disable-crashreporter

For reference my MOZCONFIG is NR_QT_NokiaRelease_mozconfig.txt:

# cs2007q3 gcc 4.2 is busted, we think, and doesn’t
# look in the expected places. –dougt.
# $PWD/… was added due to bug 463076
export LDFLAGS=”-Wl,-rpath-link,$PWD/dist/bin/:/usr/lib:/lib”

# Options for
mk_add_options MOZ_BUILD_PROJECTS=”xulrunner mobile”
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../objdir-fennecNokia-qt-release
mk_add_options MOZ_MAKE_FLAGS=”-j3 –no-print-directory”
ac_add_options –enable-gstreamer

# Global options
# ac_add_options –enable-debug
# ac_add_options –disable-optimize

# XULRunner options
ac_add_app_options xulrunner –enable-application=xulrunner
ac_add_app_options xulrunner –disable-javaxpcom

# Enabling –with-arm-kuser implies Linux on ARM and enables kernel
# optimizations for that platform
ac_add_app_options xulrunner –with-arm-kuser

# Disabling tests due to bug 454881
ac_add_options –disable-tests

# mobile options
ac_add_app_options mobile –enable-application=mobile
ac_add_app_options mobile –with-libxul-sdk=../xulrunner/dist

# enable qt
ac_add_options –enable-default-toolkit=cairo-qt
ac_add_options –disable-crashreporter

Scratchbox: Temporary failure resolving ‘’

Why did I reboot? Posted on 12 Nov, 2009 21:26:06

So there I was happily writing documentation for the GStreamer integration – came to think of something that could be neat (read simplify the implementation) just needed to do a little test first that wouldn’t take more than a build and a download… yeah right 🙂

So my test were running fine on the PC, and I wanted to re-run the test on the N810 as if it works there and on the PC it will probably run everywhere – I just needed to install an extra package in scratchbox in order to do the test – verified with “apt-cache search” that the specific package was known (its some times a problem running under scratchbox that the packages are different than in Ubuntu or are missing altogether) anyway I fired up “apt-get install ….” and it failed:

Temporary failure resolving ‘’

hmmm… so I tried:

[sbox-CHINOOK-ARMEL-2007: ~] > apt-get update
Ign file: chinook Release.gpg
Ign file: chinook Release
Err chinook Release.gpg
Temporary failure resolving ‘’
Err chinook Release.gpg
Temporary failure resolving ‘’
Failed to fetch Temporary failure resolving ‘’
Failed to fetch Temporary failure resolving ‘’
Reading package lists… Done
E: Some index files failed to download, they have been ignored, or old ones used instead.
[sbox-CHINOOK-ARMEL-2007: ~] >

A quick ping to #mobile didn’t generate any response – searching the web first gave some hits several years old – but really no responses, except “ohh… it says its a temporary error, try again later” – yeah right – there were one guy who had the trouble for two weeks – I didn’t think I would want to wait that long and still not have a solution.

So thinking back on what I had done in the last few weeks – reformatting my harddrive to ext4 and installing ubuntu 9.10 – hmm… couldn’t be that, as I had gotten and installed several packages since then to be able to build fennec…. not a strong indicator that it had anything to do with that upgrade…

I could download the packages fine outside of scratchbox, so it wasn’t a server problem either – tried it and installed the “traceroute” package manually (by downloading it, copying it to scratchbox and running “dpkg -i traceroute_1.4a12-21_armel.deb”) that worked fine – I couldn’t traceroute anything… hmm… network issue? ssh worked fine for remote machines – so the network seemed to be fine, also from within scratchbox…

Enough babbling – the problem was the “/scratchbox/etc/resolv.conf” file that apparently holds the address of the nameserver – this pointed to my old router, and not the new one I installed last week – after fixing the ip address in there to point to the new router everything worked nicely again – why I haven’t had that problem before is beyond me…

configure: error: Ogg support on Linux requires the alsa library

Why did I reboot? Posted on 03 Aug, 2009 16:51:58

If you get this error when trying to build Fennec/Firefox for PC on a Ubuntu/Linux platform, then it can be fixed by installing the alsa library… – What might be nice to know is that the name of that library is “libasound2-dev” so:

~$ sudo apt-get install libasound2-dev

(Or you can use the Synaptic package manager to install the same package if you prefer a GUI tool)

If you get an error like:

configure: error: Couldn’t find curl/curl.h which is required for the crash reporter.

Then the library to install is called libcurl4-gnutls-dev (at least that was the library that fixed it for me, it might have been one of the other libraries that was draged in by this one that did the trick)

~$ sudo apt-get install libcurl4-gnutls-dev

MacBook Pro freezing on Ubuntu Studio (64-bit) 9.04

Why did I reboot? Posted on 30 May, 2009 18:18:21

I partitioned the disk of my MacBook Pro into three parts (one for OS-X, one for Linux and one as swap space) since I gave up booting Ubuntu from a USB drive.

Got it kind of working, but had the choice of booting Ubuntu from the USB or WinXP from the internal drive – since I couldn’t have both and really wanted a “native” Ubuntu boot, I removed WinXP from the system (I can run WinXP from a virtual machine inside Ubuntu if I want to).

After the succesfull install I started to get a problem with seemingly randomly freezes of the Mac – bummer, it took me a day or two to figure out that it was because the machine was overheating. Yes, it was warm, but it has always been warm – guess it just got a little warmer 🙂

So how to fix it? I made a small app that monitors the temperature of the system and then increases the MinFanSpeed if it gets warmer – and decreses it again if it gets colder.

This is more safe than directly controlling the fan speed, as the worst that can happen if my program crashes is that the fan speed is set too high.

BatTemp Monitor
Temp ↑65.5°C MinFanSpeed 5200 LFanSpeed 5191(5200) RFanSpeed 5191(5200)

The output from the program above tells me that the current max temp that is meassured from any of the temp sensors inside the MacBook is 65.5°C and going up – the min fanspeed is set to 5200 RPM and the actuall speed of the left and right fan is 5191 RPM, and has a set target of 5200.

The program takes measurements every second and increases the fan speed if the temp is > 65.5°C and going up, and decreases the fan speed if the temperature is < 65.0°C and going down. A simple program and the best is that my machine haven’t had a freeze since I started to use the program 🙂

Changing colors of directory listings in Ubuntu Studio (bash)

Why did I reboot? Posted on 30 May, 2009 17:18:21

So I had the problem that directories that had read and write enabled for all users on the system came up in an hard-to-read color on my MacBook Pro

The colors were stored in an environment variable called LS_COLORS, to change it I added a new line at the bottom with the following content (I have underlined the ow entry that controlled this specific one):


So type export, and see if you have an LS_COLORS entry, if you do, you can change the ow=xxx to what you like (or any of the other entries).

The meaning of the numbers are:

Attribute codes:
00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
Text color codes:
30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
Background color codes:
40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white

(Copy pasted from the output of dircolors –print-database )

You can try the new setup by typing (without linebreaks):

export LS_COLORS=’no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=04:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:’;

at the command line, or make it permanent by copying it without the “export” to your ~/.bashrc file (I put it at the end).

Next »