[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [moseley@hank.org: configure: error: C++ preprocessor "/lib/cpp" fails sanity check]



On Wed, Nov 05, 2003 at 10:40:55AM -0500, Daniel Jacobowitz wrote:
> On Wed, Nov 05, 2003 at 07:12:29AM -0800, moseley@hank.org wrote:
> > 
> > But it seems to be called with autoconf:
> > 
> > $ ./configure >/dev/null
> > configure: error: C++ preprocessor "/lib/cpp" fails sanity check
> > See `config.log' for more details.

This is a long-standing bug in autoconf.  It's trying to find a command
line to invoke the preprocessor, and tries several sane versions ("gcc -E",
etc), and if nothing works, it falls back on /lib/cpp (which is stupid)
without even testing it (which is also stupid).

Do not try to make /lib/cpp work.  When you see /lib/cpp mentiomed, interpret
that as "error: something else is causing the preprocessor tests to fail;
find that and fix it".  Usually configure is actually finding/testing the
right preprocessor, but some other problem makes the preprocessor exit with
a nonzero value, and configure discards it from the list of possibilities.

config.log will show the errors from the real preprocessor.

-- 
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
    - Brian W. Kernighan



Reply to: