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

Jonathan Busby jonathanbusby at gmail.com
Wed Jun 24 22:52:00 BST 2009


On Tue, Jun 23, 2009 at 3:59 PM, Jonathan Busby <jonathanbusby at gmail.com> wrote:
>
> This is basically a copy of this message :
> http://ubuntuforums.org/showthread.php?t=1194925
>
> 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 :
> http://ubuntuforums.org/showthread.php?p=7502957#post7502957, 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/tarball.mk 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,
>
> Thanks
>
> Jonathan

Note that even when I use 'DEB_BUILD_OPTIONS="noop nostrip debug"
fakeroot debian/rules binary'
I get a stripped, optimized, non-debug executable. If I'm not
mistaken, according to Debian and CDBS policy
any deb package's rules script is supposed to honor DEB_BUILD_OPTIONS
-- obviously the Ubuntu package
does not.

I think this should be considered a bug and filed as such.


Jonathan



More information about the Ubuntu-mozillateam mailing list