# Error al tratar de instalar gcc

## DarkCr0ss

Bueno ayer cometí una estupidez por tratar de experimentar, al actualizar note que se iba a actualizar la versión de gcc, pero decidí no actualizar todo así que decidí borrar la versión de gcc que tenia y instalar la nueva(no se porque lo hice), pero al tratar de instalar me devuelve lo siguiente:

```

➜  ~ sudo emerge -q gcc 

 * IMPORTANT: 11 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.

>>> Verifying ebuild manifests

>>> Running pre-merge checks for sys-devel/gcc-4.8.3

>>> Emerging (1 of 1) sys-devel/gcc-4.8.3::gentoo

>>> Failed to emerge sys-devel/gcc-4.8.3, Log file:

>>>  '/var/tmp/portage/sys-devel/gcc-4.8.3/temp/build.log'

 * Package:    sys-devel/gcc-4.8.3

 * Repository: gentoo

 * Maintainer: toolchain@gentoo.org

 * USE:        abi_x86_64 amd64 cxx elibc_glibc fortran kernel_linux multilib nls nptl openmp policykit userland_GNU

 * FEATURES:   preserve-libs sandbox userpriv usersandbox

 * Applying Gentoo patches ...

 *   09_all_default-ssp.patch ...

 [ ok ]

 *   10_all_default-fortify-source.patch ...

 [ ok ]

 *   11_all_default-warn-format-security.patch ...

 [ ok ]

 *   12_all_default-warn-trampolines.patch ...

 [ ok ]

 *   15_all_libgfortran-Werror.patch ...

 [ ok ]

 *   16_all_libgomp-Werror.patch ...

 [ ok ]

 *   17_all_libitm-Werror.patch ...

 [ ok ]

 *   18_all_libatomic-Werror.patch ...

 [ ok ]

 *   19_all_libbacktrace-Werror.patch ...

 [ ok ]

 *   25_all_alpha-mieee-default.patch ...

 [ ok ]

 *   26_all_alpha-asm-mcpu.patch ...

 [ ok ]

 *   29_all_arm_armv4t-default.patch ...

 [ ok ]

 *   30_all_arm_armv4-no-thumb-fix-link.patch ...

 [ ok ]

 *   34_all_ia64_note.GNU-stack.patch ...

 [ ok ]

 *   38_all_sh_pr24836_all-archs.patch ...

 [ ok ]

 *   42_all_superh_default-multilib.patch ...

 [ ok ]

 *   48_all_x86_pr53113_libitm-avx.patch ...

 [ ok ]

 *   50_all_libiberty-asprintf.patch ...

 [ ok ]

 *   51_all_libiberty-pic.patch ...

 [ ok ]

 *   52_all_netbsd-Bsymbolic.patch ...

 [ ok ]

 *   67_all_gcc-poison-system-directories.patch ...

 [ ok ]

 *   74_all_gcc48_cloog-dl.patch ...

 [ ok ]

 *   90_all_pr55930-dependency-tracking.patch ...

 [ ok ]

 *   92_all_freebsd-pie.patch ...

 [ ok ]

 *   93_all_4.9.0_pr60155.patch ...

 [ ok ]

 * Done with patching

 * Applying uClibc patches ...

 *   90_all_100-uclibc-conf.patch ...

 [ ok ]

 *   90_all_301-missing-execinfo_h.patch ...

 [ ok ]

 *   90_all_302-c99-snprintf.patch ...

 [ ok ]

 *   90_all_305-libmudflap-susv3-legacy.patch ...

 [ ok ]

 * Done with patching

 * Applying pie patches ...

 *   01_all_gcc48_configure.patch ...

 [ ok ]

 *   02_all_gcc48_config.in.patch ...

 [ ok ]

 *   03_all_gcc48_Makefile.in.patch ...

 [ ok ]

 *   05_all_gcc48_gcc.c.patch ...

 [ ok ]

 *   16_all_gcc47_nopie_option.patch ...

 [ ok ]

 *   20_all_gcc46_config_crtbeginp.patch ...

 [ ok ]

 *   24_all_gcc48_invoke.texi.patch ...

 [ ok ]

 *   33_all_gcc48_config_rs6000.patch ...

 [ ok ]

 *   34_all_gcc48_config_i386.patch ...

 [ ok ]

 *   35_all_gcc48_config_arm.patch ...

 [ ok ]

 *   36_all_gcc48_config_mips.patch ...

 [ ok ]

 *   37_all_gcc48_config_ia64.patch ...

 [ ok ]

 *   40_all_gcc48_config_esp.patch ...

 [ ok ]

 * Done with patching

 * Updating gcc to use automatic SSP building ...

 * updating multilib directories to be: ../lib64 ../lib32

 * Running elibtoolize in: gcc-4.8.3/

 *   Applying portage/2.2 patch ...

 *   Applying sed/1.5.6 patch ...

 *   Applying as-needed/2.2.6 patch ...

 * Using GNU config files from /usr/share/gnuconfig

 *   Updating libjava/classpath/config.sub

 [ ok ]

 *   Updating libjava/libltdl/config.sub

 [ ok ]

 *   Updating config.sub

 [ ok ]

 *   Updating config.guess

 [ ok ]

 *   Updating libjava/classpath/config.guess

 [ ok ]

 *   Updating libjava/libltdl/config.guess

 [ ok ]

 * Fixing misc issues in configure files

 * Applying gcc-configure-texinfo.patch ...

 [ ok ]

 * Touching generated files

 *   Touching gcc/cstamp-h.in

 *   Touching gcc/config.in

 *   Touching libitm/aclocal.m4

 *   Touching libitm/Makefile.in

 *   Touching libitm/testsuite/Makefile.in

 *   Touching libitm/configure

 *   Touching libitm/config.h.in

 *   Touching libatomic/aclocal.m4

 *   Touching libatomic/Makefile.in

 *   Touching libatomic/testsuite/Makefile.in

 *   Touching libatomic/configure

 *   Touching libatomic/auto-config.h.in

 * Applying gcc-spec-env-r1.patch ...

 [ ok ]

 * gcc-config: Active gcc profile is invalid!

gcc-config: error: could not run/locate 'x86_64-pc-linux-gnu-cpp'

 * CFLAGS=""

 * CXXFLAGS=""

 * LDFLAGS="-Wl,-O1 -Wl,--as-needed"

 * PREFIX:          /usr

 * BINPATH:         /usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3

 * LIBPATH:         /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3

 * DATAPATH:        /usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3

 * STDCXX_INCDIR:   /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4

 * Languages:       c,c++,fortran

 * Configuring GCC with: 

 *      --host=x86_64-pc-linux-gnu 

 *      --build=x86_64-pc-linux-gnu 

 *      --prefix=/usr 

 *      --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3 

 *      --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include 

 *      --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3 

 *      --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/man 

 *      --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/info 

 *      --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4 

 *      --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/python 

 *      --enable-languages=c,c++,fortran 

 *      --enable-obsolete 

 *      --enable-secureplt 

 *      --disable-werror 

 *      --with-system-zlib 

 *      --enable-nls 

 *      --without-included-gettext 

 *      --enable-checking=release 

 *      --with-bugurl=https://bugs.gentoo.org/ 

 *      --with-pkgversion=Gentoo 4.8.3 p1.1, pie-0.5.9 

 *      --enable-libstdcxx-time 

 *      --enable-shared 

 *      --enable-threads=posix 

 *      --enable-__cxa_atexit 

 *      --enable-clocale=gnu 

 *      --enable-multilib 

 *      --with-multilib-list=m32,m64 

 *      --disable-altivec 

 *      --disable-fixed-point 

 *      --enable-targets=all 

 *      --disable-libgcj 

 *      --enable-libgomp 

 *      --disable-libmudflap 

 *      --disable-libssp 

 *      --enable-lto 

 *      --without-cloog

/var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion=Gentoo 4.8.3 p1.1, pie-0.5.9 --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --enable-lto --without-cloog

checking build system type... x86_64-pc-linux-gnu

checking host system type... x86_64-pc-linux-gnu

checking target system type... x86_64-pc-linux-gnu

checking for a BSD-compatible install... /usr/bin/install -c

checking whether ln works... yes

checking whether ln -s works... yes

checking for a sed that does not truncate output... /bin/sed

checking for gawk... gawk

checking for libatomic support... yes

checking for libitm support... yes

checking for libsanitizer support... yes

checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc

checking for C compiler default output file name... 

configure: error: in `/var/tmp/portage/sys-devel/gcc-4.8.3/work/build':

configure: error: C compiler cannot create executables

See `config.log' for more details.

 * ERROR: sys-devel/gcc-4.8.3::gentoo failed (configure phase):

 *   failed to run configure

 * 

 * Call stack:

 *     ebuild.sh, line   93:  Called src_configure

 *   environment, line 3700:  Called toolchain_src_configure

 *   environment, line 4717:  Called die

 * The specific snippet of code:

 *       "${S}"/configure "${confgcc[@]}" || die "failed to run configure";

 * 

 * If you need support, post the output of `emerge --info '=sys-devel/gcc-4.8.3::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.8.3::gentoo'`.

 * 

 * Please include /var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-build-logs.tar.bz2 in your bug report.

 * 

 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.8.3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.8.3/temp/environment'.

 * Working directory: '/var/tmp/portage/sys-devel/gcc-4.8.3/work/build'

 * S: '/var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3'

 * Messages for package sys-devel/gcc-4.8.3:

 * ERROR: sys-devel/gcc-4.8.3::gentoo failed (configure phase):

 *   failed to run configure

 * 

 * Call stack:

 *     ebuild.sh, line   93:  Called src_configure

 *   environment, line 3700:  Called toolchain_src_configure

 *   environment, line 4717:  Called die

 * The specific snippet of code:

 *       "${S}"/configure "${confgcc[@]}" || die "failed to run configure";

 * 

 * If you need support, post the output of `emerge --info '=sys-devel/gcc-4.8.3::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.8.3::gentoo'`.

 * 

 * Please include /var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-build-logs.tar.bz2 in your bug report.

 * 

 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.8.3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.8.3/temp/environment'.

 * Working directory: '/var/tmp/portage/sys-devel/gcc-4.8.3/work/build'

 * S: '/var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3'

```

emerge --info

```

➜  ~ emerge --info

!!! No gcc found. You probably need to 'source /etc/profile'

!!! to update the environment of this terminal and possibly

!!! other terminals also.

Portage 2.2.12 (python 2.7.8-final-0, default/linux/amd64/13.0/desktop/kde/systemd, [unavailable], glibc-2.19-r1, 3.12.3-1~exp1 x86_64)

=================================================================

System uname: Linux-3.12.3-1~exp1-x86_64-Intel-R-_Core-TM-_i3-3120M_CPU_@_2.50GHz-with-gentoo-2.2

KiB Mem:     5998888 total,    180744 free

KiB Swap:    2097148 total,   2097148 free

Timestamp of tree: Tue, 02 Sep 2014 20:30:01 +0000

ld GNU ld (GNU Binutils) 2.24

app-shells/bash:          4.2_p47

dev-java/java-config:     2.2.0

dev-lang/python:          2.7.8, 3.3.5-r1, 3.4.1

dev-util/cmake:           2.8.12.2-r2

dev-util/pkgconfig:       0.28-r2

sys-apps/baselayout:      2.2

sys-apps/openrc:          0.13.1

sys-apps/sandbox:         2.6-r1

sys-devel/autoconf:       2.69

sys-devel/automake:       1.11.6, 1.14.1

sys-devel/binutils:       2.24-r3

sys-devel/gcc-config:     1.8-r1::init6

sys-devel/libtool:        2.4.2-r1

sys-devel/make:           4.0-r1

sys-kernel/linux-headers: 3.16 (virtual/os-headers)

sys-libs/glibc:           2.19-r1

Repositories: gentoo sublime-text steam-overlay mozilla stuff init6

ACCEPT_KEYWORDS="amd64 ~amd64"

ACCEPT_LICENSE="*"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe -march=native"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -pipe -march=native"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://mirror.mcs.anl.gov/pub/gentoo/"

LANG="es_PA.utf8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j5"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/var/lib/layman/sublime-text /var/lib/layman/steam /var/lib/layman/mozilla /var/lib/layman/stuff /var/lib/layman/init6"

USE="X a52 aac aalib acl acpi alsa amd64 berkdb bidi branding bzip2 cairo cdda cdio cdparanoia cdr cleartype cli corefonts cracklib crypt cups cxx dbus declarative dga directfb dri dts dvb dvd dvdnav dvdr emboss encode exif faac faad fam fbcon ffmpeg firefox flac fortran freetype gdbm gentoolkit gif gnutls gpm gtk httpd iconv jack jpeg jpeg2k kde kipi ladspa lcms ldap libass libcaca libmpeg2 libnotify live lua mad matroska mmx mng modules mp3 mp4 mpeg mpg123 multilib ncurses nls nptl ogg oggvorbis openal opengl openmp oss pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qt3support qt4 quicktime rar readline real rtc sdl semantic-desktop session speex spell sse sse2 ssl startup-notification stream svg systemd tcpd tga theora tiff toolame truetype twolame typel udev udisks unicode upower usb v4l v4l2 vcd vlm vorbis win32codecs wxwidgets wxwindows x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" FFTOOLS="aviocat cws2fws ffeval ismindex pktdumper qt-faststart trasher ffescape ffhash fourcc2pixfmt" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="es es_MX es_PA" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

```

----------

## quilosaq

 *Quote:*   

> Bueno ayer cometí una estupidez por tratar de experimentar

 Los errores son una buena fuente de aprendizaje.

 *Quote:*   

> * gcc-config: Active gcc profile is invalid!
> 
> gcc-config: error: could not run/locate 'x86_64-pc-linux-gnu-cpp' 

 Parece que hay problemas para utiizar el compilador gcc.

 *Quote:*   

> !!! No gcc found. You probably need to 'source /etc/profile'
> 
> !!! to update the environment of this terminal and possibly
> 
> !!! other terminals also. 

 Se confirman los problemas.

Mira si 

```
gcc-config -l
```

 te devuelve algún perfil válido de gcc. Si no hay ningún gcc en tu sistema tendrás que seguir las indicaciones de nuestro compañero agdg en:

http://www.makeinstall.es/2011/03/reparar-el-compilador-gcc-en-gentoo.html

----------

## DarkCr0ss

@quilosaq gracias por responder, hasta ahora e experimentado con muchas cosas, pero nunca me habia pasado algo tan grave como esto.., tratare de reparar gcc con las indicaciones de agdg, despues publico el resultado.

Gracias

----------

