I hate this error. It was a pain to figure out what was wrong in the first place because i’m only getting it when trying to install pear/pecl extensions!
... configure: error: C preprocessor "/lib/cpp" fails sanity check See `config.log' for more details.
Config.log? What config.log!? It was no where to be found because I was trying to install through the web console or from the command line. The temporary structures created to configure and make the packages get deleted upon exit with or without failure.
I found pecl:svn wanted to ask me two questions about subversion, so I was able to let it sit there while I opened another terminal to look in the temp directory and find the log. So I finally figured out what its problem was.
I had glibc installed, but it needs the backend packages for glibc, which I didn’t have installed.
Now when I run through the installer, it works fine.
... Build process completed successfully Installing '/usr/lib/php/modules/svn.so' install ok: channel://pecl.php.net/svn-0.5.0 Extension svn enabled in php.ini
This also happened to fix the same insanity check problem that a couple of other modules whined about.