Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home Blog Run, xul, run

Run, xul, run

Posted by Manuel Reinhardt at Sep 12, 2012 05:10 PM |

My eclipse/birt installation has been giving me a headache lately, spontaneously crashing with some reports when I tried to open the preview or the report viewer. With the latter I got the error message

No more handles [Could not detect registered XULRunner to use]

Investigating, I found that ubuntu does not supply a xulrunner package any more. I tried getting xulrunner from mozilla, but eclipse does not support the latest xulrunner versions. Of course, older versions only come in 32 bit flavour. I tried a 32 bit version of eclipse but didn't get it working (later I discovered that was because I set the XULRunnerPath vmarg incorrectly - it mostly works now, except for lots of "wrong ELF class" messages).

So I grabbed the xulrunner 1.9.2.19 source, checked the XULRunner tutorial, and after much cursing managed to compile the bugger.

In addition to the prerequisites mentioned in the tutorial, I had to install some more packages:

sudo apt-get install libxt-dev libidl-dev gcc-4.4 g++-4.4

I set the following environment variables:

CC=/usr/bin/gcc-4.4
CXX=/usr/bin/g++-4.4
JAVA_HOME=/usr/lib/jvm/java-6-sun/

Also, at some point make complained about a missing file curl/types.h, referenced from toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc. It turned out that curl/types.h has become obsolete, so I just deleted the line

#include <curl/types.h>

from http_upload.cc. Another missing file was Linux3.0.mk. I crossed my fingers and tried

cp security/coreconf/Linux2.6.mk security/coreconf/Linux3.0.mk

...and it worked!

This is my .mozconfig:

mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
mk_add_options MOZ_MAKE_FLAGS="-j4"
ac_add_options --enable-application=xulrunner
ac_add_options --disable-tests

and this an excerpt from my eclipse.ini:

[...]
-vmargs -Dosgi.requiredJavaVersion=1.5 -Dhelp.lucene.tokenizer=standard -XX:MaxPermSize=256m -Dorg.eclipse.swt.browser.XULRunnerPath=/opt/mozilla-1.9.2/obj-x86_64-unknown-linux-gnu/dist/bin -Xms40m -Xmx512m

(I only added the -Dorg.eclipse.swt.browser.XULRunnerPath line)

I'm using eclipse-reporting-juno-linux-gtk-x86_64 on ubuntu precise (12.04.1), and apart from the "Preview" tab it works fine at the moment.