Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 377297 - net-im/bitlbee "debug" useflag is broken
Summary: net-im/bitlbee "debug" useflag is broken
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Cédric Krier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 17:14 UTC by Artem Savkov
Modified: 2011-08-09 21:10 UTC (History)
2 users (show)

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


Attachments
bitlbee-3.0.3 "debug" useflag patch (bitlbee-3.0.3.patch,397 bytes, patch)
2011-08-02 12:15 UTC, Artem Savkov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Artem Savkov 2011-08-01 17:14:07 UTC
The "debug" flag in bitlbee-3.0.3(at least) ebuild is broken and doesn not affect bitlbee's configuration.

Reproducible: Always

Steps to Reproduce:
1. USE="debug" emerge bitlebee
2. gdb /usr/sbin/bitlbee
3. Reading symbols from /usr/sbin/bitlbee...(no debugging symbols found)...done.
Actual Results:  
No debugging information added to the binary.

Expected Results:  
Debbuging information added to the binary.

This happens because of this code in the bitlbee-3.0.3.ebuild:

119     sed -i \
120         -e "s/CFLAGS=.*$/CFLAGS=${CFLAGS}/" \
121         -e "/^EFLAGS/s:=:&${LDFLAGS} :" \
122         Makefile.settings || die "sed failed"

which replaces the ./configure supplied "-g -DDEBUG" with user's CFLAGS.

I understand that this might be tricky to make right because of possible conflicts between CFLAGS, so if there is no possible workaround the "debug" flag should probably be deleted.
Comment 1 Agostino Sarubbo gentoo-dev 2011-08-02 11:21:49 UTC
Close as invalid, if you want debug symbols you must add -g/-ggdb to your flags. Any USEFLAG should not provide to add any cflags.
Comment 2 Artem Savkov 2011-08-02 12:15:47 UTC
Created attachment 281827 [details, diff]
bitlbee-3.0.3 "debug" useflag patch

Ok, that makes sense. Sorry for misunderstanding.

But this "debug" flag still removes -DDEBUG, thus not adding intended extraoutput.
Fortunately this is much easier to handle. See attached patch.

Or should i open another bug with more accurate description?
Comment 3 Tim Harder gentoo-dev 2011-08-09 21:10:13 UTC
(In reply to comment #2)
> Created attachment 281827 [details, diff]
> bitlbee-3.0.3 "debug" useflag patch
> 
> Ok, that makes sense. Sorry for misunderstanding.
> 
> But this "debug" flag still removes -DDEBUG, thus not adding intended
> extraoutput.
> Fortunately this is much easier to handle. See attached patch.
> 
> Or should i open another bug with more accurate description?

This should be fixed now in CVS.