Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 463382 - cmake-utils.eclass - add debug builds support
Summary: cmake-utils.eclass - add debug builds support
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-26 17:25 UTC by Eugene Shalygin
Modified: 2013-03-26 22:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2013-03-26 17:25:58 UTC
I wanted to get some backtraces of crashing KDE application. To do that I've compiled it with USE="debug". However, compiler flags appeared to be the same at that case without any traces of -Og or whatever. I can not find any handling of this use-flag in cmake-utils.eclass except for "-DNDEBUG" for release builds. 

Then please tell me what is the idea of this use-flag and how can I get a debug build of a particular package? I do not want to change make.conf of create bashrc for every package that I want to compile in debug mode.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-03-26 18:42:55 UTC
You should set CFLAGS/CXXFLAGS=-g to get debug symbols installed, I guess.
Comment 2 Eugene Shalygin 2013-03-26 18:58:59 UTC
Oh, when I wrote "-Og" I meant "-g", of course. 

But where should I set it? In command line? In make.conf? Shouldn't use flag do it automatically?

I would even prefer to have separate CFLAGS_DEBUG (and company) in make.conf and that portage use that variable when debug flag is set
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2013-03-26 21:51:56 UTC
The same way as for every package. In make.conf. 

(Or, if you want to do it only for a few packages, use package.env.)

Please read the docs.
Comment 4 Maciej Mrozowski gentoo-dev 2013-03-26 22:08:14 UTC
INVALID is a bit harsh, WONTFIX is more appropriate :P
Comment 5 Eugene Shalygin 2013-03-26 22:21:24 UTC
(In reply to comment #3)
> The same way as for every package. In make.conf. 
> 
> (Or, if you want to do it only for a few packages, use package.env.)
> 
> Please read the docs.

This way is very inconvinient. You know, having a source-based disto should mean (IMO) that it is easy to compile given package in a way one wants to. And not only to install it in the system, but also to help developers. Isn't the idea of portage to simplify build process (between other targets)? It would be very convinient to have this possibility. I would even dream of CMAKE_BUILD_TYPE in USE_EXPAND with Gentoo as a default value. Would it be nice?

Right now it is easier to compile package by hand and symlink a .so library into the system for debugging. Can't it be simplified?
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2013-03-26 22:36:20 UTC
http://wiki.gentoo.org/wiki//etc/portage/env

Guess what, that's example number one on the page.
Comment 7 Eugene Shalygin 2013-03-26 22:53:37 UTC
fully convinced, thanks for the link and your time, and my apologies