Discussion:
configure: error: C preprocessor "/lib/cpp" fails sanity check
Fabiano Sidler
2018-11-16 23:30:33 UTC
Permalink
Hi folks!

When trying to configure (binutils and gmp, in that case), I'm getting this:
=== snip ===
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/home/luser/Downloads/binutils-2.26.1/libiberty':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [Makefile:7985: configure-libiberty] Error 1
make[1]: Leaving directory '/home/luser/Downloads/binutils-2.26.1'
make: *** [Makefile:846: all] Error 2
=== snap ===

However, this works as expected:
printf "#include <stdio.h>\n" | /lib/cpp
It dumps stdio.h and its includes to stdout

What's the issue? Same behavior with binutils and gmp, so I assume autoconf
of gcc as the location of the problem...

Grettings,
Fabiano
Bob Friesenhahn
2018-11-17 13:56:05 UTC
Permalink
Post by Fabiano Sidler
Hi folks!
=== snip ===
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [Makefile:7985: configure-libiberty] Error 1
make[1]: Leaving directory '/home/luser/Downloads/binutils-2.26.1'
make: *** [Makefile:846: all] Error 2
=== snap ===
printf "#include <stdio.h>\n" | /lib/cpp
It dumps stdio.h and its includes to stdout
What's the issue? Same behavior with binutils and gmp, so I assume autoconf
of gcc as the location of the problem...
You did not tell us what operating system you are using or what
compiler is installed. What is the origin of the compiler which was
installed?

Does '/lib/cpp --version' or '/lib/cpp -V' produce any useful output?

Bob
--
Bob Friesenhahn
***@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt
Eric Blake
2018-11-17 15:20:14 UTC
Permalink
Post by Fabiano Sidler
Hi folks!
=== snip ===
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [Makefile:7985: configure-libiberty] Error 1
make[1]: Leaving directory '/home/luser/Downloads/binutils-2.26.1'
make: *** [Makefile:846: all] Error 2
=== snap ===
Are you attaching the same config.log? If so, something is indeed odd,
Post by Fabiano Sidler
config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = elux-devel
uname -m = x86_64
uname -r = 4.14.39
uname -s = Linux
uname -v = #1 SMP Fri Jul 20 13:35:34 CEST 2018
Okay, you've told us your kernel,...
Post by Fabiano Sidler
configure:4111: checking for gcc
configure:4127: found /usr/local/bin/gcc
configure:4138: result: gcc
configure:4367: checking for C compiler version
configure:4376: gcc --version >&5
gcc (GCC) 5.4.0
and it looks like you are using a self-built gcc,
Post by Fabiano Sidler
configure:14766: checking whether to enable maintainer-specific portions of Makefiles
configure:14775: result: no
configure:15032: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
...
Post by Fabiano Sidler
configure: exit 0
but this config.log says that configure ran to completion, without any
warning about /lib/cpp failing a sanity check, which makes it hard to
see the "more details" that stdout/stderr said we should be looking for
in evidence why configure failed.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Earnie
2018-11-17 15:32:40 UTC
Permalink
Post by Eric Blake
Post by Fabiano Sidler
Hi folks!
=== snip ===
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [Makefile:7985: configure-libiberty] Error 1
make[1]: Leaving directory '/home/luser/Downloads/binutils-2.26.1'
make: *** [Makefile:846: all] Error 2
=== snap ===
Are you attaching the same config.log? If so, something is indeed odd,
Post by Fabiano Sidler
config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.64.  Invocation command line was
   $ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = elux-devel
uname -m = x86_64
uname -r = 4.14.39
uname -s = Linux
uname -v = #1 SMP Fri Jul 20 13:35:34 CEST 2018
Okay, you've told us your kernel,...
Post by Fabiano Sidler
configure:4111: checking for gcc
configure:4127: found /usr/local/bin/gcc
configure:4138: result: gcc
configure:4367: checking for C compiler version
configure:4376: gcc --version >&5
gcc (GCC) 5.4.0
and it looks like you are using a self-built gcc,
Post by Fabiano Sidler
configure:14766: checking whether to enable maintainer-specific portions of Makefiles
configure:14775: result: no
configure:15032: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
...
Post by Fabiano Sidler
configure: exit 0
but this config.log says that configure ran to completion, without any
warning about /lib/cpp failing a sanity check, which makes it hard to
see the "more details" that stdout/stderr said we should be looking for
in evidence why configure failed.
Yes, the attached doesn't even contain the word preprocessor in the
strings. Perhaps another config.log file is in the mix, a top level
configure script or perhaps make can execute another configure script
that has its own config.log file. My guess based on the above is the
config.log you need exists in the
/home/luser/Downloads/binutils-2.26.1/libiberty directory.
--
Earnie
Fabiano Sidler
2018-11-20 18:59:44 UTC
Permalink
[...]
Yes, the attached doesn't even contain the word preprocessor in the strings.
Perhaps another config.log file is in the mix, a top level configure script
or perhaps make can execute another configure script that has its own
config.log file. My guess based on the above is the config.log you need
exists in the /home/luser/Downloads/binutils-2.26.1/libiberty directory.
That was the right hint. Some headers were missing. Thank you for helping|

Greetings,
Fabiano

Loading...