Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54208 - nano throws a lot of trash to terminal with debug USE flag compiled
Summary: nano throws a lot of trash to terminal with debug USE flag compiled
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
: 85589 93684 153887 186144 281748 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-17 08:27 UTC by Selecter
Modified: 2010-03-20 22:09 UTC (History)
5 users (show)

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 Selecter 2004-06-17 08:27:45 UTC
Is it normal?

Reproducible: Always
Steps to Reproduce:




Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.4.0, glibc-2.3.3.20040420-r0,
2.6.7-rc3-love2)
=================================================================
System uname: 2.6.7-rc3-love2 i686 Intel(R) Pentium(R) 4 CPU 1.70GHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/
ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo
ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo
http://ftp.du.se/pub/os/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa apache2 arts avi crypt cups debug encode gdbm gif gpm gtk gtk2
gtkhtml imlib jpeg kde libg++ libwww linguas_ru mad mikmod mmx motif mozilla
mpeg ncurses nls nptl oggvorbis opengl pam pdflib perl png ppds python qt
quicktime readline sdl slang spell sse ssl svga tcpd truetype unicode x86 xml
xml2 xmms xv zlib"
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2004-06-17 10:38:37 UTC
as far as I know, that's expected behaviour
Comment 2 SpanKY gentoo-dev 2004-06-17 15:20:24 UTC
yes, it's normal

you got what you asked for ;)
Comment 3 Selecter 2004-06-18 01:31:57 UTC
This trash not letting me to edit files or even trash charset completely. I can't say it is normal :(
Comment 4 SpanKY gentoo-dev 2004-06-18 06:39:17 UTC
so dont emerge nano with USE=debug :P

when you do, nano builds with a lot of verbose output that probably
does screw up the output of nano with ncurses ... i tried it once a
while back
Comment 5 James 2004-07-09 05:50:47 UTC
What I expect from building a package in debug mode, is that the package is compiled and build with the gcc -g options, so that debug symbols etc. are left so that one can run gdb on it easily and get sensible back traces, with parameters etc.
Setting levels of extra printf's that happen in debug mode should be a command line option, and not a option that is turned on at compile time.

So, in my view, the current output from nano with USE=debug is wrong.
What a program or lib outputs at run time should not be a compile time option, but a run time option.

Most programs I know of work in the way I describe, but nano does not.
Comment 6 SpanKY gentoo-dev 2004-07-09 07:05:28 UTC
no, USE=debug can be wildly different for each package ... you're asking
the program to build with its own 'debug' features turned on

what you want is not always accomplished through USE=debug but through setting
FEATURES=nostrip CFLAGS="-g -ggdb -pipe" CFLAGS="$CXXFLAGS"
Comment 7 SpanKY gentoo-dev 2005-03-17 06:47:01 UTC
*** Bug 85589 has been marked as a duplicate of this bug. ***
Comment 8 danny 2005-03-17 13:09:19 UTC
I appologize that my bug search missed this bug report and that I created a duplicate report #85589.

And, you are correct, it is a feature.  A feature of questionable value perhaps, but an upstream choice none-the-less.  Usually, debug enables gcc to build the extra code that is then invoked by the admin in some manner.  An option, something like nano -d xxxx would be a smart feature.  The problem for me was that nano gets installed at a very early stage of building a gentoo system, and this unexpected behavior I interpreted as something broken in my toolchain.  It would have been nice to know that debug is always on with that use flag set, making nano worthless for anything, even debugging nano.  Just try it, you'll get my point. It seems to me that no one is going to want this behavior out of nano unless they are specifically troubleshooting an issue directly relating to nano.  And since you have to recompile nano to change the behavior, don't it make more sense to set -debug in the ebuild and then let the admin do USE="debug" emerge nano only when he wants to recompile to troubleshoot a nano problem?  I think you should consider that it is really asking a lot out of gentoo users to resolve issues like this.  It should not be expected that when a user needs to invoke emerge -u world that he is expected to also know all the ins-and-outs of every package on his system.
Comment 9 SpanKY gentoo-dev 2005-03-17 15:30:00 UTC
what you're talking about is the current ambiguity of what USE=debug actually does

search the gentoo-dev mailing lists where i've brought this up before but no one can seem to decide on a solution
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2005-05-23 07:54:35 UTC
*** Bug 93684 has been marked as a duplicate of this bug. ***
Comment 11 Tristan Heaven (RETIRED) gentoo-dev 2006-11-02 18:34:03 UTC
*** Bug 153887 has been marked as a duplicate of this bug. ***
Comment 12 michael@smith-li.com 2006-11-29 09:04:18 UTC
nano 2> ~/nanodebug.txt or /dev/null or whatever will work around this if you wish to build it with debug on.
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 19:18:32 UTC
*** Bug 186144 has been marked as a duplicate of this bug. ***
Comment 14 SpanKY gentoo-dev 2010-02-24 19:12:14 UTC
*** Bug 306653 has been marked as a duplicate of this bug. ***
Comment 15 SpanKY gentoo-dev 2010-02-24 19:12:46 UTC
*** Bug 281748 has been marked as a duplicate of this bug. ***