Test fails in 16.5, succeeds in 18.5

Hello,

I’m attempting to test whether I’ve installed PGI 16.5 correctly, against an existing 18.5 installation.
The test build (actually a test for another application) runs as expected for 18.5. However, when I switch modules to point into the new 16.5 installation, the build fails with

PGC-F-0206-Can't find include file stdlib.h (/nopt/compilers/pgi/16.5/linux86-64/16.5/include/stdlib.h: 16)

When I then add a bunch of include flags, it fails with

...
PGC-W-0156-Type not specified, 'int' assumed (/usr/include/stdlib.h: 870)
PGC-S-0040-Illegal use of symbol, wchar_t (/usr/include/stdlib.h: 870)
PGC-F-0008-Error limit exceeded (/usr/include/stdlib.h: 870)

I assume it’s a problem with the localrc file, so I duplicate them below for reference. I realize that the working installation appears to have been installed over an Intel compiler installation, whereas my (broken) installation is on top of the raw CentOS 7.4 environment, but Intel is of course not a prerequisite. Appreciate any help, thanks.

Chris


18.5 (works fine):

set LDSO=/lib64/ld-linux-x86-64.so.2;
set GCCDIR=/usr/lib/gcc/x86_64-redhat-linux/4.8.5;
set G77DIR="";
set OEM_INFO=64-bit target on x86-64 Linux $INFOTPVAL;
set GNUATOMIC=;
set GCCINC= /nopt/compilers/intel/parallel_studio_xe_2018_update3_cluster_edition/compilers_and_libraries_2018.3.222/linux/ipp/include /nopt/compilers/intel/parallel_studio_xe_2018_update3_cluster_edition/compilers_and_libraries_2018.3.222/linux/tbb/include /nopt/compilers/intel/parallel_studio_xe_2018_update3_cluster_edition/compilers_and_libraries_2018.3.222/linux/mkl/include /opt/hpe/hpc/mpt/mpt-2.18/include /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include /usr/local/include /usr/include;
set GPPDIR= /nopt/compilers/intel/parallel_studio_xe_2018_update3_cluster_edition/compilers_and_libraries_2018.3.222/linux/ipp/include /nopt/compilers/intel/parallel_studio_xe_2018_update3_cluster_edition/compilers_and_libraries_2018.3.222/linux/tbb/include /nopt/compilers/intel/parallel_studio_xe_2018_update3_cluster_edition/compilers_and_libraries_2018.3.222/linux/mkl/include /opt/hpe/hpc/mpt/mpt-2.18/include /usr/include/c++/4.8.5 /usr/include/c++/4.8.5/x86_64-redhat-linux /usr/include/c++/4.8.5/backward /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include /usr/local/include /usr/include;
set NUMALIBNAME=-lnuma ;
set LOCALRC=YES;
set EXTENSION=__extension__=;
set COMPGCCINCDIR=include-gcc48;
set LC=$if(-Bstatic,-lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc, -lgcc -lc -lgcc -lgcc_s);
# GLIBC version 2.17
# GCC version 4.8.5
set GCCVERSION=40805;
set LIBNCURSES=YES;
export PGI=$COMPBASE;

16.5 (broken):

set LDSO=/lib64/ld-linux-x86-64.so.2;
set GCCDIR=/usr/lib/gcc/x86_64-redhat-linux/4.8.5;
set GPPDIR32= 
set GPPDIR64= /usr/include/c++/4.8.5 /usr/include/c++/4.8.5/x86_64-redhat-linux /usr/include/c++/4.8.5/backward /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include /usr/local/include /usr/include;
set GCCINC32=
set GCCINC64= /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include /usr/local/include /usr/include;
set G77DIR="";
set OEM_INFO=64-bit target on x86-64 Linux $INFOTPVAL;
set GCCINC= /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include /usr/local/include /usr/include;
set GPPDIR= /usr/include/c++/4.8.5 /usr/include/c++/4.8.5/x86_64-redhat-linux /usr/include/c++/4.8.5/backward /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include /usr/local/include /usr/include;
set NUMALIBNAME=-lnuma ;
set LOCALRC=YES;
set THROW=__THROW=;
set EXTENSION=__extension__=;
set COMPGCCINCDIR=include-gcc48;
set LC=$if(-Bstatic,-lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc, -lgcc -lc -lgcc);
# GLIBC version 2.17
# GCC version 4.8.5
set GCCVERSION=40805;
set LOCALDEFS=__STDC_HOSTED__;
export PGI=$COMPBASE;

I think in 16.5’s installation, the stdlib header (16.5/linux86-64/16.5/include/stdlib.h) should exist. It’s the interface we pull in before including the system’s stdlib.h. If it doesn’t exist then you’ll probably want to run through the installation again.

Out of curiosity, does it fail if you point the 16.5 compiler to 18.5’s rc file? (Specify with -rc /path/to/rc/file)