Recently I've done
emerege -e world and then found that
gcc was compiled without
cxx flag. Now I can't compile any C++ package due to
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
I'm thinking on copying files returned by
equery f gcc|grep -v share
from stage3. Will it help? Is there any simpler way?
UPDATE 1 Here's my config.log
Here's my make.conf
Please, note there's
cxx flag in USE. I've added it recently, but it does not help as I can't rebuild packages.
UPDATE 3 I have tried to reinstall gcc-4.6.3 from binary package via
emerge -avK gcc:4.6
It completed successfully but error didn't go.
Also, I've noticed that:
configure:11955: /lib/cpp conftest.cpp cpp: error: conftest.cpp: C++ compiler not installed on this system configure:11955: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "expat" | #define PACKAGE_TARNAME "expat" | #define PACKAGE_VERSION "2.1.0" | #define PACKAGE_STRING "expat 2.1.0" | #define PACKAGE_BUGREPORT "email@example.com" | #define PACKAGE_URL "" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | /* end confdefs.h. */ | #ifdef __STDC__ | # include <limits.h> | #else | # include <assert.h> | #endif | Syntax error
Looks like it claims that C++ compiler is not installed on my system. But this sounds like rubbish, since
gcc:4.6 was installed from bin-package and I assume it's compiled with C++ support.
UPDATE 4 Indeed there's a problem with g++
uhradio ~ # g++ queue.cpp gcc-config: error: could not run/locate 'g++' uhradio ~ # cpp queue.cpp cpp: error: queue.cpp: C++ compiler not installed on this system
The output from
gcc-config -l is:
 x86_64-pc-linux-gnu-4.6.3 *