[mythtv] Mixed debug/release build

Michael Haas laga+mythtv at laga.ath.cx
Sat Aug 25 11:05:58 UTC 2007

Daniel Kristjansson wrote:
> Yes, it strips the debug symbols and places them in external files.
> The Ubuntu packages may be doing the same magic as this patch, or
> it may be doing something non-standard.

I haven't talked to a "wizard" ;) but I decided to take a look at apport
myself. I found a description of what it does at
<https://wiki.ubuntu.com/AptElfDebugSymbols> (scroll down to
"Implementation"); here's a quote:

> 2. Find all ELF files and call objcopy --only-keep-debug on them, and 
put the symbols into /usr/lib/debug/original path into the -dbgsym
package. [..]
> 3. Create a gnu_debuglink to the place of debug symbols

That's about the same as #3589.

>  If you could consult with
> your apport wizard it might be a vote in favor of #3389. if Ubuntu
> is already doing this.

Ubuntu is already doing this - in the package build script, dh_strip is
called which normally would strip the binaries. If you install a package
called "pkg-create-dbgsym", dh_strip is modified to automatically create
.ddeb packages which contain the symbols. As you see, there is no need
for a release-dbg build type for Ubuntu since it's already handled very
conveniently. Apport also uses the .ddebs to create backtraces.
(However, I'm not saying that release-dbg is not a great idea)

Our packages are built with "--compile-type=debug --tune=i486
--enable-proc-opt" (please don't ask me why we --tune=i486, I never
understood that myself). Our backtraces were rejected (eg
<http://svn.mythtv.org/trac/ticket/3561#comment:1>) and I was told that
the optimizations were breaking them. However, it just dawned on me that
"--enable-proc-opt" enables "-fomit-frame-pointer". Gah! That was
probably the cause for bad backtraces... anyways, -O3 was also lined out
to be a bad thing.

That's the whole point - the Ubuntu packages *could* already be profile
builds with the debug symbols stripped and put in separate .ddebs.
However, you're the first one to tell me that such backtraces would be
accepted. If that's true, I'm not sure if my patch is still needed.

More information about the mythtv-dev mailing list