Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 250592

Summary: USE="debug" vs. FEATURES="nostrip splitdebug"
Product: Documentation Reporter: Marian Kyral <mkyral>
Component: Project-specific documentationAssignee: Gentoo Quality Assurance Team <qa>
Status: RESOLVED WORKSFORME    
Severity: enhancement CC: flameeyes
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Marian Kyral 2008-12-11 08:14:16 UTC
I was always though that the debug USE flag is for adding debugging symbols, but based on discussion in http://forums.gentoo.org/viewtopic-p-5301559.html#5301559 and documentation http://www.gentoo.org/proj/en/qa/backtraces.xml it is not true.

Could be possible to automatically add the "nostrip splitdebug" FEATURES when the debug flag is enabled? Or is there any other way, how to permanent enable these features to only some packages? E.g. qt:4 and kde:4?


Reproducible: Always
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-12-11 20:58:12 UTC
USE=debug is not supposed to be used by most users, since it enables debug codepaths that usually can lead to:

- slower code;
- code that aborts on mistakes instead of handling them "nicely"; (assertions)
- code that produces debug output (in the case of nano, making the editor mostly useless);

So the meaning of the two have to stay separated.

As for "nostrip splitdebug", the latter is enough, so it's just FEATURES=splitdebug, and at that point it's simpler to just enable it system-wide. On a system with 1369 packages, my /usr/lib/debug is just shy of 5GB, but this is also having -ggdb enabled for all of them.
Comment 2 Marian Kyral 2008-12-11 22:06:29 UTC
Aha:
$ euse -I debug
[-    ] debug - Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml

Problem is that I never before have an idea to check what the debug USE flag really means :-(

I don't want to enable the splitdebug FEATURE globally - I have only 6GB in /usr free on my laptop now. Bud in another issue with Amarok2, mysql and -fPIC flag is a solution how to set some environment variables locally with newest portage.

# cat /etc/portage/env/kde-base/kate
FEATURES="${FEATURES} splitdebug"
CFLAGS="${CFLAGS} -ggdb"
CXXFLAGS="${CFLAGS}"

I've created such file for all important packages (qt-, kdelibs, kate...) and now I'm recompiling these packages. After recompiling of all qt- packages, the debug directory has 480MB. Will see the kdelibs result.

Maybe should be this solution also included in the documentation.
Comment 3 Mark Loeser (RETIRED) gentoo-dev 2009-05-15 21:06:40 UTC
Don't see anything for QA to do here...