You are not logged in.

#1 2012-02-29 06:13:14

majiq
Member
Registered: 2009-03-06
Posts: 259

Firefox Debug Build difficulties

I'm trying to debug a problem (https://bugs.archlinux.org/task/26363) that I'm having with with firefox, and so I need a version with the symbols left in. I am having difficulty getting this.

I tried compiling with options=(!strip) in the PKGBUILD, adding to the mozconfig file the following lines:

export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-debug-symbols="-ggdb"
ac_add_options --enable-debug
ac_add_options --disable-optimize

And tossed in

  export CFLAGS="$CFLAGS -g -O1"
  export CXXFLAGS="$CXXFLAGS -g -O1"

after the sed in the default PKGBUILD (just for good measure).

I ran into the xpcshell problem (https://bugs.archlinux.org/task/27729) so I installed devtools and ran

sudo extra-i686-build

inside the folder with the PKBUILD.

It built a package, I installed it, and when I ran gdb, I found that I had no luck.

$ gdb /usr/bin/firefox
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/firefox...(no debugging symbols found)...done.

Naive thought: Is it something to do with the extra-i686-build? It looks like it uses all the local and modified files, so I don't know why it would be that. On a related note, is there a way to get extra-i686-build to use a clean chroot but take advantage of the old compile? It takes nine hours on my machine to compile from start to finish, it seems.

TIA,
majiq.

Offline

#2 2012-03-01 20:55:22

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Firefox Debug Build difficulties

post the entire mozconfig


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2012-03-02 04:37:33

majiq
Member
Registered: 2009-03-06
Posts: 259

Re: Firefox Debug Build difficulties

mozconfig

. $topsrcdir/browser/config/mozconfig

ac_add_options --prefix=/usr
ac_add_options --libdir=/usr/lib

# System libraries
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
ac_add_options --with-system-png
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --enable-system-hunspell
ac_add_options --enable-system-sqlite
ac_add_options --enable-system-ffi
ac_add_options --enable-system-cairo
ac_add_options --enable-system-pixman
ac_add_options --with-pthreads

# Features
ac_add_options --enable-official-branding
ac_add_options --enable-safe-browsing
ac_add_options --enable-startup-notification
ac_add_options --enable-gio

ac_add_options --disable-gnomevfs
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --disable-tests
ac_add_options --disable-mochitest
ac_add_options --disable-installer

# Optimization
ac_add_options --enable-optimize

# PGO
ac_add_options --enable-profile-guided-optimization
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-pgo
mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
mk_add_options PYTHONPATH='$(OBJDIR)/_profile/pgo'

export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-debug-symbols="-ggdb"
ac_add_options --enable-debug 
ac_add_options --disable-optimize 

export MOZILLA_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1

PKGBUILD

# $Id: PKGBUILD 150400 2012-02-17 11:58:52Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Jakub Schmidtke <sjakub@gmail.com>

pkgname=firefox
pkgver=10.0.2
pkgrel=1
pkgdesc="Standalone web browser from mozilla.org"
arch=('i686' 'x86_64')
license=('MPL' 'GPL' 'LGPL')
depends=('gtk2' 'mozilla-common' 'nss>=3.13.1' 'libxt' 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'alsa-lib' 'sqlite3' 'libnotify' 'desktop-file-utils' 'libvpx' 'libevent' 'hicolor-icon-theme')
makedepends=('unzip' 'zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'yasm' 'mesa' 'autoconf2.13' 'libidl2' 'xorg-server-xvfb')
url="http://www.mozilla.org/projects/firefox"
install=firefox.install
source=(ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.bz2
        mozconfig firefox.desktop firefox-install-dir.patch vendor.js
        libvpx.patch)
options=(!strip)


build() {
  cd "$srcdir/mozilla-release"

  cp "$srcdir/mozconfig" .mozconfig
  patch -Np1 -i "$srcdir/firefox-install-dir.patch"
  patch -Np1 -i "$srcdir/libvpx.patch"

  # Fix PRE_RELEASE_SUFFIX
  sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \
    browser/base/Makefile.in

  export CFLAGS="$CFLAGS -g -O1"
  export CXXFLAGS="$CXXFLAGS -g -O1"
  export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/firefox"
  export PYTHON="/usr/bin/python2"

  LD_PRELOAD="" /usr/bin/Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 :99 &
  LD_PRELOAD="" DISPLAY=:99 make -j1 -f client.mk profiledbuild MOZ_MAKE_FLAGS="$MAKEFLAGS"
  kill $! || true
}

package() {
  cd "$srcdir/mozilla-release"
  make -j1 -f client.mk DESTDIR="$pkgdir" install

  install -m644 "$srcdir"/vendor.js "$pkgdir/usr/lib/firefox/defaults/pref"

  for i in 16x16 22x22 24x24 32x32 48x48 256x256; do
      install -Dm644 browser/branding/official/default${i/x*/}.png \
        "$pkgdir/usr/share/icons/hicolor/$i/apps/firefox.png"
  done

  install -Dm644 "$srcdir/firefox.desktop" \
    "$pkgdir/usr/share/applications/firefox.desktop"

  rm -rf "$pkgdir"/usr/lib/firefox/{dictionaries,hyphenation}
  ln -sf /usr/share/hunspell "$pkgdir/usr/lib/firefox/dictionaries"
  ln -sf /usr/share/hyphen "$pkgdir/usr/lib/firefox/hyphenation"


  # We don't want the development stuff
  rm -r "$pkgdir"/usr/{include,lib/firefox-devel,share/idl}

  #workaround for now
  #https://bugzilla.mozilla.org/show_bug.cgi?id=658850
  ln -sf firefox "$pkgdir/usr/lib/firefox/firefox-bin"
}
md5sums=('5ce038d591964f72c534fa33b75a62f5'
         '4cfc9ad2042859e9f296fdcd1c3c451c'
         'bdeb0380c7fae30dd0ead6d2d3bc5873'
         '594523c536a9be951b52c90dd85aff18'
         '0d053487907de4376d67d8f499c5502b'
         '5d418ecdbdb9f40597df6b978b0b5ee5')

Offline

Board footer

Powered by FluxBB