Re: Check if library has debug symbols
Michael Banck <mbanck@debian.org> wrote:
> On Tue, Dec 08, 2009 at 11:35:17AM +0100, Mathieu Malaterre wrote:
>> I am trying to compile tulip (*) for debugging with:
>> $ export DEB_BUILD_OPTIONS='noopt debug nostrip'
>> $ apt-get source tulip
>> $ cd tulip-3.1.2
>> $ dpkg-buildpackage
>> After installation, here is what objdump reveals (**).
Comparing the package size to the official package and using file(1)
is a simple way to check.
> Does this means:
>> 1. I did not export DEB_BUILD_OPTIONS ?
>> 2. There is an issue in debian/rule for tulip that does not properly
>> generate debug symbols ?
> DEB_BUILD_OPTIONS=nostrip etc. is an optional feature as far as I know,
> it is not guaranteed to work. You need to inspect debian/rules and
> possibly modify it yourself if there is no support for it currently.
Hello,
that is not *completely* true nowadays. dpkg-buildpackage seems to
evaluate DEB_BUILD_OPTIONS and sets CFLAGS to '-g -O0' instead of '-g
-O2' if noopt is specified. Also dh_strip checks respects nostrip.
Therefore DEB_BUILD_OPTIONS='noopt nostrip' often has a good chance of
working, unless debian/rules overwites CFLAGS. (I have never heard
about DEB_BUILD_OPTIONS=debug and it is not listed in policy.)
In tulip's case afaict the mechanism I described should work, I just
got a FTBFS due to 527215 in combination with switching to gcc-4.4.
cu andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
Reply to: