Building a debug build of Firefox-3.0 from the source package

Jonathan Busby jonathanbusby at
Tue Jun 23 16:59:58 BST 2009

This is basically a copy of this message :

I apologize if this is a stupid question


In an attempt to diagnose what exactly is causing "Couldn't load XRE
functions." in this post :, I am
attempting to build a debug version of the Ubuntu
firefox-3.0_3.0.11+build2+nobinonly source package. Since this package
uses the tarball within a tarball method to package its source, the
first thing that I had to do after 'apt-get source firefox' was 'cd
firefox-3.0-3.0.11+build2+nobinonly/; DEB_TAR_SRCDIR=mozilla make -f
/usr/share/cdbs/1/rules/ pre-build '  after which the source
tree was accessible for tweaking.

I went ahead and edited the
'build-tree/mozilla/browser/config/mozconfig' file and added the
following :

ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --enable-tests

I also added a reference to the above in 'build-tree/mozilla'
consisting of a 1 line .mozconfig file :

. $topsrcdir/browser/config/mozconfig

After that I built the debs using 'DEB_BUILD_OPTIONS="--enable-debug
--disable-optimize --disable-strip --disable-strip-libs" fakeroot
debian/rules binary' .

When the build finished I installed the debs ( firefox-3.0 and
firefox-3.0-branding ) and ran 'firefox --debug' only to get the "no
debugging symbols found" output from GDB.

Running 'file /usr/lib/firefox-3.0.11/firefox' produces :

/usr/lib/firefox-3.0.11/firefox: ELF 32-bit LSB executable, Intel
80386, version 1 (SYSV), dynamically linked (uses shared libs), for
GNU/Linux 2.6.15, stripped

So, my question is what exactly am I doing wrong that results in a
stripped, optimized build instead of a debug build? I've successfully
compiled a debug build from the official Mozilla project tarball but
strangely it doesn't error out with "Couldn't load XRE functions."

Any help would be appreciated,



More information about the Ubuntu-mozillateam mailing list