x4 ~ # gcc-config -l [1] x86_64-pc-linux-gnu-4.6.3 * [2] x86_64-pc-linux-gnu-4.7.2 [3] x86_64-pc-linux-gnu-4.8.0 x4 ~ # gcc-config 1 * Switching native-compiler to x86_64-pc-linux-gnu-4.6.3 [ ok ] x4 ~ # ls -l /usr/bin/x86_64-pc-linux-gnu-cpp -rwxr-xr-x 1 root root 15952 Jan 26 2012 /usr/bin/x86_64-pc-linux-gnu-cpp x4 ~ # x86_64-pc-linux-gnu-cpp gcc-config: error: could not run/locate 'x86_64-pc-linux-gnu-cpp' x4 ~ # gcc-config 3 * Switching native-compiler to x86_64-pc-linux-gnu-4.8.0 ... >>> Regenerating /etc/ld.so.cache... [ ok ] * If you intend to use the gcc from the new profile in an already * running shell, please remember to do: * . /etc/profile x4 ~ # . /etc/profile x4 ~ # ls -l /usr/bin/x86_64-pc-linux-gnu-cpp -rwxr-xr-x 1 root root 15952 Dec 3 15:19 /usr/bin/x86_64-pc-linux-gnu-cpp x4 ~ # x86_64-pc-linux-gnu-cpp gcc-config: error: could not run/locate 'x86_64-pc-linux-gnu-cpp' x4 ~ # Reproducible: Always
Please post your `emerge --info' output in a comment.
The glibc, gcc and linux-headers versions are misleading, because I use a handrolled toolchain on this machine: Portage 2.1.11.33 (default/linux/amd64/10.0/no-multilib, gcc-4.8.0, unavailable, 3.7.0-rc8-dirty x86_64) ================================================================= System uname: Linux-3.7.0-rc8-dirty-x86_64-AMD_Phenom-tm-_II_X4_955_Processor-with-gentoo-2.0.3 Timestamp of tree: Tue, 04 Dec 2012 10:15:01 +0000 ld GNU gold (GNU Binutils 2.23.51.20121126) 1.11 app-shells/bash: 4.2_p39 dev-lang/python: 2.7.3-r2, 3.2.3-r1 dev-util/cmake: 2.8.10.2 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 9999 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.5 sys-devel/binutils: 2.22-r1, 9999 sys-devel/gcc: 4.6.0_alpha20110122::<unknown repository> sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 2.6.38 sys-libs/glibc: 2.12.2 Repositories: gentoo proaudio ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-w -march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-w -march=native -O2 -pipe" DISTDIR="/var/tmp/portage" EMERGE_DEFAULT_OPTS="--quiet-build=n" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nostrip parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/" INSTALL_MASK="/lib/systemd/system /usr/lib/tmpfiles.d" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1,--hash-style=gnu,--as-needed,--gc-sections,--icf=all,--icf-iterations=3" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--exclude=metadata/cache/*" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/portage" PORTDIR_OVERLAY="/usr/local/layman/pro-audio" SYNC="rsync://134.147.32.114/gentoo-portage" USE="3dnow X alsa amd64 apng audiofile bash-completion berkdb bzip2 cairo cli cracklib crypt cscope cups cxx dbus djvu dri exif extras fbcon fontconfig fortran gdbm gif gpm gtk iconv jpeg kde kpathsea maildir mmx mudflap ncurses nls nptl ogg opengl pam pcre png pppd qt3support qt4 readline session sse sse2 sse3 ssl svg tcpd threads tiff truetype unicode vim-syntax xft zlib zsh-completion" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" 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 ubx" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON x4 ~ # ll /usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3 total 2484 -rwxr-xr-x 1 root root 312824 Jan 26 2012 c++ -rwxr-xr-x 1 root root 312824 Jan 26 2012 cpp -rwxr-xr-x 1 root root 312824 Jan 26 2012 g++ -rwxr-xr-x 1 root root 309560 Jan 26 2012 gcc -rwxr-xr-x 1 root root 31688 Jan 26 2012 gcov -rwxr-xr-x 1 root root 312824 Jan 26 2012 x86_64-pc-linux-gnu-c++ -rwxr-xr-x 1 root root 312824 Jan 26 2012 x86_64-pc-linux-gnu-g++ -rwxr-xr-x 1 root root 309560 Jan 26 2012 x86_64-pc-linux-gnu-gcc -rwxr-xr-x 1 root root 309560 Jan 26 2012 x86_64-pc-linux-gnu-gcc-4.6.3 x4 ~ # ll /usr/x86_64-pc-linux-gnu/gcc-bin/4.7.2 total 3860 -rwxr-xr-x 4 root root 375432 Sep 20 15:02 c++ -rwxr-xr-x 1 root root 374456 Sep 20 15:02 cpp -rwxr-xr-x 4 root root 375432 Sep 20 15:02 g++ -rwxr-xr-x 3 root root 374456 Sep 20 15:02 gcc -rwxr-xr-x 2 root root 17816 Sep 20 15:02 gcc-ar -rwxr-xr-x 2 root root 17720 Sep 20 15:02 gcc-nm -rwxr-xr-x 2 root root 17720 Sep 20 15:02 gcc-ranlib -rwxr-xr-x 1 root root 52464 Sep 20 15:02 gcov -rwxr-xr-x 2 root root 378552 Sep 20 15:02 gfortran -rwxr-xr-x 4 root root 375432 Sep 20 15:02 x86_64-pc-linux-gnu-c++ -rwxr-xr-x 4 root root 375432 Sep 20 15:02 x86_64-pc-linux-gnu-g++ -rwxr-xr-x 3 root root 374456 Sep 20 15:02 x86_64-pc-linux-gnu-gcc -rwxr-xr-x 3 root root 374456 Sep 20 15:02 x86_64-pc-linux-gnu-gcc-4.7.2 -rwxr-xr-x 2 root root 17816 Sep 20 15:02 x86_64-pc-linux-gnu-gcc-ar -rwxr-xr-x 2 root root 17720 Sep 20 15:02 x86_64-pc-linux-gnu-gcc-nm -rwxr-xr-x 2 root root 17720 Sep 20 15:02 x86_64-pc-linux-gnu-gcc-ranlib -rwxr-xr-x 2 root root 378552 Sep 20 15:02 x86_64-pc-linux-gnu-gfortran x4 ~ # ll /usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0 total 5172 -rwxr-xr-x 4 root root 512608 Dec 3 15:19 c++ -rwxr-xr-x 1 root root 508560 Dec 3 15:19 cpp -rwxr-xr-x 4 root root 512608 Dec 3 15:19 g++ -rwxr-xr-x 3 root root 508744 Dec 3 15:19 gcc -rwxr-xr-x 2 root root 29544 Dec 3 15:19 gcc-ar -rwxr-xr-x 2 root root 29512 Dec 3 15:19 gcc-nm -rwxr-xr-x 2 root root 29512 Dec 3 15:19 gcc-ranlib -rwxr-xr-x 1 root root 126224 Dec 3 15:19 gcov -rwxr-xr-x 4 root root 512608 Dec 3 15:19 x86_64-pc-linux-gnu-c++ -rwxr-xr-x 4 root root 512608 Dec 3 15:19 x86_64-pc-linux-gnu-g++ -rwxr-xr-x 3 root root 508744 Dec 3 15:19 x86_64-pc-linux-gnu-gcc -rwxr-xr-x 3 root root 508744 Dec 3 15:19 x86_64-pc-linux-gnu-gcc-4.8.0 -rwxr-xr-x 2 root root 29544 Dec 3 15:19 x86_64-pc-linux-gnu-gcc-ar -rwxr-xr-x 2 root root 29512 Dec 3 15:19 x86_64-pc-linux-gnu-gcc-nm -rwxr-xr-x 2 root root 29512 Dec 3 15:19 x86_64-pc-linux-gnu-gcc-ranlib I "solved" the issue locally, by adding "rm -f /usr/bin/x86_64-pc-linux-gnu-cpp" to switch_profile().
(In reply to comment #2) > because I use a handrolled toolchain on this machine: not our problem then $ x86_64-pc-linux-gnu-cpp --version x86_64-pc-linux-gnu-cpp (Gentoo 4.7.2 p1.3, pie-0.5.5) 4.7.2