Configuration failure: C preprocessor  [SOLVED]

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
zlevine@nist.gov
Posts: 1
Joined: Wed Dec 19, 2018 9:17 pm
Location: NIST, Gaithersburg, MD, USA
Contact:

Configuration failure: C preprocessor  [SOLVED]

Post by zlevine@nist.gov » Wed Dec 19, 2018 10:11 pm

I am trying to install abinit-8.10.1 on a second computer. On my home machine, I succeeded without problem. The OS is: 3.10.0-862.14.4.el7.x86_64, so GNU/Linux Red Hat Enterprise 7.

I ran

./configure --prefix=/home/zlevine/Code/Abinit/abinit-8.10.1/Abinit --with-mpi-prefix=/usr/lib64/openmpi

It ends with this:

checking for /share/sw/pgi/linux86-64/17.10/bin/pgcc... no
configure: error: could not run C preprocessor "/share/sw/pgi/linux86-64/17.10/bin/pgcc -Mcpp"

I tried both:
./configure --prefix=/home/zlevine/Code/Abinit/abinit-8.10.1/Abinit --with-mpi-prefix=/usr/lib64/openmpi
./configure --prefix=/home/zlevine/Code/Abinit/abinit-8.10.1/Abinit --with-mpi-prefix=/usr/lib64/openmpi CPP="/share/sw/pgi/linux86-64/17.10/bin/pgcc -Mcpp"

The odd thing is that I have that program:

ls -l /share/sw/pgi/linux86-64/17.10/bin/pgcc
-r-xr-xr-x 1 root root 208336 Oct 30 2017 /share/sw/pgi/linux86-64/17.10/bin/pgcc*

Also, if I do
/share/sw/pgi/linux86-64/17.10/bin/pgcc -Mcpp hello.c

on a simple file with C preprocessor commands, it responds correctly, making a "hello.i" file.

So why is it failing the check for the C preprocessor?

I thought perhaps it would be better to use gcc. So I did this:

./configure --prefix=/home/zlevine/Code/Abinit/abinit-8.10.1/Abinit CC="/usr/bin/gcc" CPP="/usr/bin/gcc -E"

That leads to a similar error. (Taking out the mpi without gcc also leads to a similar error as above.)

configure: error: could not run C preprocessor "/usr/bin/gcc -E"

What to do?

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Configuration failure: C preprocessor

Post by jbeuken » Thu Dec 27, 2018 6:49 pm

Sorry but, there has been no more PGI support for a long time....
PGI has some difficulties to compile ABINIT :?
------
Jean-Michel Beuken
Computer Scientist

Locked