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
please post `emerge info` and `qpkg -I -v gcc`
================================================================= 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.
Err, check PATH ?
You just have to source /etc/profile after gcc-3.2.1-r6 was merged. For portage though, this is transparent ..
*** Bug 13344 has been marked as a duplicate of this bug. ***
*** Bug 13065 has been marked as a duplicate of this bug. ***
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.
Also, gcc-config-1.3.1 fixes this.