Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 12819 - bash: gcc: command not found
Summary: bash: gcc: command not found
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Git (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
: 13065 13344 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-12-27 20:43 UTC by merwan kashouty
Modified: 2011-10-30 22:47 UTC (History)
3 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 merwan kashouty 2002-12-27 20:43:47 UTC
if loged as normal user , entering su to gain root priviledges bash no longer
recognizes the gcc command. this is on a system using ACCEPT_KEYWORD="~x86"
enabled. this also effects being able to run make menuconfig in /usr/src/linux .
here is the exact error given :

root@JaiBaba linux # make menuconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts/lxdialog all
make[1]: Entering directory `/usr/src/linux-2.4.20/scripts/lxdialog'
/bin/sh: line 1: gcc: command not found

>> Unable to find the Ncurses libraries.
>>
>> You must have Ncurses installed in order
>> to use 'make menuconfig'

make[1]: *** [ncurses] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.20/scripts/lxdialog'
make: *** [menuconfig] Error 2

the command gcc works correctly for normal user as well as root but not when
given as su to root from normal user.

rommel@JaiBaba rommel $ gcc
gcc: no input files

root@JaiBaba rommel # gcc
bash: gcc: command not found

JaiBaba root # gcc
gcc: no input files
Comment 1 SpanKY gentoo-dev 2002-12-28 20:02:04 UTC
please post `emerge info` and `qpkg -I -v gcc`
Comment 2 merwan kashouty 2002-12-29 02:14:19 UTC
================================================================= System uname: 2.4.20 i686 AMD Athlon(tm) USE="x86 oss 3dnow apm avi crypt cups encode gif gpm jpeg gnome libg++ libwww mikmod mmx mpeg ncurses nls pdflib png qtmt quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline arts svga tcltk java guile X sdl tcpd pam ssl perl python esd imlib oggvorbis gtk qt kde motif opengl mozilla cdr scanner" ARCH="x86" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -pipe" CXXFLAGS="-march=athlon-xp -O3 -pipe" ACCEPT_KEYWORDS="x86 ~x86" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb:/usr/kde/3.1/share/config:/usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" MAKEOPTS="-j3" JDK_HOME="/opt/sun-jdk-1.4.1.01" JAVA_HOME="/opt/sun-jdk-1.4.1.01" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" GENTOO_MIRRORS="http://www.ibiblio.org/pub/Linux/distributions/gentoo"  root@JaiBaba rommel # qpkg -I -v gcc sys-devel/gcc-config-1.2.7 * sys-devel/gcc-2.95.3-r5 * sys-devel/gcc-2.95.3-r7 * sys-devel/gcc-3.2.1 *  the output from qpkg isnt really relevant for this anylonger....during the time i had this issue i was running gcc-3.2.1-r6 and have emerged 3.2.1-r0 which has corrected the problem of gcc not being in the su to roots path.  
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-29 02:17:32 UTC
Err, check PATH ?
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-08 13:21:01 UTC
You just have to source /etc/profile after gcc-3.2.1-r6 was merged.  For
portage though, this is transparent ..
Comment 5 SpanKY gentoo-dev 2003-01-26 23:00:00 UTC
*** Bug 13344 has been marked as a duplicate of this bug. ***
Comment 6 SpanKY gentoo-dev 2003-01-26 23:00:19 UTC
*** Bug 13065 has been marked as a duplicate of this bug. ***
Comment 7 ebnf 2003-01-27 09:26:04 UTC
So, this has been fixed is portage, or the fix is to source /etc/profile after
emerge of gcc-3.2.1-r6?  I'm a bit confused, sorry.
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-28 14:35:04 UTC
Also, gcc-config-1.3.1 fixes this.