Thursday, February 18, 2010

rpm strip out debug symbol

When I build the rpm, it always extract out the debug symbols by running:
rpm --eval %__spec_install_post
/usr/lib/rpm/brp-compress
/usr/lib/rpm/brp-strip
/usr/lib/rpm/brp-strip-static-archive
/usr/lib/rpm/brp-strip-comment-note

which is very frustrating. You can disable it by using:
%define __spec_install_port /usr/lib/rpm/brp-compress
%define debug_package %{nil} 
However, I already have a version installed in the production.
I got core file, but cannot get useful backtrace. So this time, 
I have all these debug options enabled:
-ggdb -g3 -O0 
 

1 comment:

Unknown said...

You have:
%define __spec_install_port /usr/lib/rpm/brp-compress

Should be:
%define __spec_install_post /usr/lib/rpm/brp-compress