Build a deb package with debug info
Par Benoît Dejean le lundi, 5 mai 2008, 16:08 - Lien permanent
I often find the need to rebuild a package with debug symbols (if no -dbg is available).
sudo apt-get build-dep <package> apt-get source <package> cd <package> # eventually patch sources DEB_BUILD_OPTIONS=nostrip dpkg-buildpackage -rfakeroot -uc -us cd .. dpkg -i <package>.deb
Et voilà
Now i can gdb it or run sysprof.
(It's also a very fast way to start hacking on a program)
Commentaires
In Fedora, all RPM packages have a debuginfo package automatically created. Using it is even easier
OK, let me say it another way: i want to test system-monitor on yet another debian based distro, this way i can setup a basic development environment in 5 simple commands.
Except it isn't. DEB_BUILD_OPTIONS is an informal standard imlpemented by a vast MINORITY of packages, and is in no way dictacted by the debian policy or anything. It is entirely up to the packager to decide if he wants to take DEB_BUILD_OPTIONS into account or not.
You should check your facts before claiming something...
Well, for the package i ever need to recompile it works.
@Chipzz: You want Debian Policy, Section 10.1:
http://www.debian.org/doc/debian-po...
The 'nostrip' option is supported by dh_strip, and the vast majority of Debian packages use debhelper (directly or indirectly via cdbs). So this will almost always work.