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...

mmap: Permission denied

Why did I reboot? Posted on 20 Mar, 2009 20:08:31

This error gives plenty of hits in a google search – it seems like it has something to do with the mapping of the memory used by the virtual machine in my case used for ARM support. Further more it seems to be related to mmap_min_addr, whatever that is 🙂

The build instructions on the Mozilla Fennec web-page tells about this error, and say that it might be an idea to do the following if you get this specific error:

add the following to /etc/sysctl.conf

vm.vdso_enabled = 0
vm.mmap_min_addr = 4096

Then run
sudo sysctl -p

Well…. looking at my /etc/sysctl.conf file I looked like I had allready done that during my intial setup of the build system, but adding the ends together I figured that I might get a better result wiht the vm.mmap_min_addr set to 0 instead of 4096 (inspired by this page) – and it worked!

So what I did, having one terminal window open loged into scratchbox, was to open a new terminal window and do:

sudo gedit

I first tried without the sudo, but it wouldn’t let me save changes in the /etc/sysctl.conf file, so running as superuser seemed to be the trick for me here – or another disaster waiting to happen 🙂

Anyway, as superuser edit/add the follwing two lines to /etc/sysctl.conf:

vm.vdso_enabled = 0
vm.mmap_min_addr = 0

Save the file and run:

sudo sysctl -p

Now it finally looks like the build is running happily along – what a great ending of a wonderfull week 🙂

Couldn’t find X11/extensions/XDamage.h which is required for composite plugins

GStreamer Posted on 20 Mar, 2009 13:29:46

So getting the mozconfig file right, I now faced the next problem:

checking for X11/extensions/XDamage.h… no
configure: error: Couldn’t find X11/extensions/XDamage.h which is required for composite plugins.

hmm… could this be from adding the gstreamer lib? – An initial google search didn’t give much hint’s except there seems to be a libxdamage package.. hmm… wonder what a:

[sbox-CHINOOK-ARMEL-2007: ~/mozilla-central] > apt-cache search xdamage

will do… a number of packages called something with libxdamage, I start to see a pattern here 🙂 – lets try to install it:

[…: ~/mozilla-central] > apt-get install libxdamage-dev

Yep, that was it – wonder if the next error has the same solution, first the error is:

configure: error: Could not find the following X libraries: -lXComposite

Search for the lib:

[…: ~/mozilla-central] > apt-cache search lXComposite

How about:

[…: ~/mozilla-central] > apt-cache search XComposite

Yep, we got a hit ! – I misinterpreted the error message, the -l is probably an option meaning library, hence the “l” is not part of the library name – lets install it, and move along:

[…: ~/mozilla-central] > apt-get install libxcomposite-dev

Problem solved [2-0] to me 🙂 – next problem is an:

mmap: Permission denied

Where did I see this one before….

invalid feature nameg

Why did I reboot? Posted on 20 Mar, 2009 13:00:12

As mentioned in one of the other posts I created what I expected to be an appropiate mozconfig file, by copy-paste from the net into notepad (on windows) and saving to my shared drive on the Linux (Ubuntu) machine.

Did I ever expect to get an error from this? no… but I did 🙂

As it turns out, the build system, when running under in the scratchbox, only seems to accept Unix-style line endings – a LF (line feed) instead of the dos CR-LF (Carriage return – line feed) – so the solution was to scrap notepad, and setup my favorite editor (Source Insight) to use the Unix lineformat as default, delete the old mozconfig and create a new one – probably better this way, as the mozilla code standard requires unix style line endings anyway – but bye, bye notepad 🙂

Ubuntu screen resolution

Why did I reboot? Posted on 20 Mar, 2009 12:23:03

So I was trying to choose a better screen resolution in Ubuntu, as the screen resolution I had choosen was bigger than the WMWare window – clever me, sat it to 720×576 which is so small that you can’t see the whole screen size dialog box – which means that you can’t set it back to a sensible resolution 🙂 And no – I didn’t have any success in tab-ing my way down to the Accpet button 🙁

Spending half an hour searching the WEB, I found a solution:

Start a terminal:

cd ~/.config

Open the monitors.xml file in an editor:

gedit monitors.xml

Change the screen resolution in the xml document e.g.:


Save the xml, log out of the system, and login again – viola, a usable sized window again 🙂

And now… back to work

Getting the libs

GStreamer Posted on 20 Mar, 2009 10:13:46

So I got Ubuntu running in the virtual machine, I got scratchbox running, my initial update of the previous integration of GStreamer copied to the Ubuntu disk, with the best verison of mozconfig that I could find – but I needed to have the gstreamer developer package installed into scratchbox – this is what I did (with thanks to the help I got from the people on #mobile):

Search for the correct package name (run from within scratchbox):

[sbox-CHINOOK-ARMEL-2007: ~] > apt-cache search gstreamer

This gives a list of all the packages that has something to do with gstreamer, I knew I wanted the dev package, since I was going to need the header files in order to be able to compile the integration code.

From the list of packages I found “libgstreamer0.10-dev”, so next was to install it:

[sbox-CHINOOK-ARMEL-2007: ~] > apt-get install libgstreamer0.10-dev

BINGO! my build now passed the point where it complained about not being able to find the gstreamer lib 🙂

Now it was complaining about JAVA 🙁

Stay tuned for the next update!


Why did I reboot? Posted on 20 Mar, 2009 09:48:52

Ok, after working in my comfort zone of windows I took this new task of updating a previous GStreamer integration into Fennec. This is for the Nokia N810 phone, which is running on top of Linux, hence it needs to be build under Linux.

In Mozilla we use Ubuntu Linux, and scratchbox for cross-compiling to the ARM processor.

Some time ago when I was at the Mozilla site in California I got it all setup and working, but ask me if I could remember how to run scratchbox? – No, I couldn’t!

After trying running the /scratchbox/login command and seeing the “ERROR: Scratchbox is not properly set up!” messge several times, I tried different things that didn’t help a bit 🙁 But finally it started to come back to me – wasn’t there some kind of command that should be run before I could login? – I went back to the installation description for scratchbox on the fennec WIKI, trying to recap the steps I took the first time I set it up – and there it was: “sudo /scratchbox/sbin/sbox_ctl start” I needed to start scratchbox before I could login – dooh!