Can't build HDF5 1.10.0-p1 with PGI 16.5

I'm having trouble building HDF5 with the Portland Group (PGI) compilers, version 16.5. Here is my configure command:

./configure \
     --prefix=/usr/pppl/pgi/16.5-pkgs/hdf5-serial-1.10.0-patch1 \
     --disable-silent-rules \
     --enable-build-mode=production \
     --enable-fortran \
     --enable-hl \
     --enable-shared \
     --enable-static \
     --disable-parallel \
     --with-zlib \
     --with-szlib=/usr/pppl/pgi/16.5-pkgs/szip-2.1 \
     CC=pgcc \
     CFLAGS="-tp x64" \
     CXX=pg++ \
     CXXFLAGS="-tp x64" \
     FC=pgfortran \
     FCFLAGS="-tp x64" \
     2>&1 | tee configure.log

And shortly after I start make, it fails with this error:

libtool: compile: pgcc -DHAVE_CONFIG_H -I. -I../fortran/src -I/usr/pppl/pgi/16.5-pkgs/szip-2.1/include -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112L -DNDEBUG -UH5_DEBUG_API -c99 -Minform=inform -fast -s -tp x64 -c H5system.c -MD -fpic -DPIC -o .libs/H5system.o
PGC-I-0222-Redundant definition for symbol __THROW (/usr/include/sys/cdefs.h: 63)
PGC-I-0222-Redundant definition for symbol __extension__ (/usr/include/sys/cdefs.h: 287)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 206)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 210)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 220)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 224)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 353)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 357)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 361)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 363)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 369)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 372)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 377)
PGC-S-0039-Use of undeclared variable errno (H5system.c: 484)
PGC-S-0039-Use of undeclared variable ERANGE (H5system.c: 544)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 980)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 990)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 995)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #1 (H5system.c: 1004)
PGC-I-0155-Long value is passed to a nonprototyped function - argument #3 (H5system.c: 1010)
PGC-W-0095-Type cast required for this conversion (H5system.c: 1021)
PGC-W-0155-Pointer value created from a nonlong integral type (H5system.c: 1021)
PGC/x86-64 Linux 16.5-0: compilation completed with severe errors
make[2]: *** [H5system.lo] Error 1
make[2]: Leaving directory `/local/pbisbal/pgi-16.5/hdf5-1.10.0-patch1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/local/pbisbal/pgi-16.5/hdf5-1.10.0-patch1/src'
make: *** [all-recursive] Error 1

I'm also building with GCC 5.4.0, GCC 6.1.0, and Intel 2015, and I only get this error with the PGI compilers. Does anyone know of afix for this? Googling hasn't proivded much help. I assume the PGI compilers much be doing some overly strict checking and there is a compiler switch to turn it off, but I haven't been able to find the correct switch yet, if that's the case.

Prentice

*On 07/25/2016 01:40 PM, Prentice Bisbal wrote:*

    I'm having trouble building HDF5 with the Portland Group (PGI)
    compilers, version 16.5. Here is my configure command:

        .....

    I'm also building with GCC 5.4.0, GCC 6.1.0, and Intel 2015, and I
    only get this error with the PGI compilers. Does anyone know of
    afix for this? Googling hasn't proivded much help. I assume the
    PGI compilers much be doing some overly strict checking and there
    is a compiler switch to turn it off, but I haven't been able to
    find the correct switch yet, if that's the case.

Prentice -- I just built HDF5 1.10.0-patch1 with the PGI 16.7 compiler, which is now available.
If you're still having the above problem, I can send you the details.
My scripts would probably work just as well with PGI 16.5.

         -- Carl

···

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

Thanks for the offer. However, I found a fix for my problem. I've been meaning to update the list, but kept procrastinating, so here it is:

I fixed this problem by specifying the system cpp with CPP=cpp rather than using the PGI C preprocessor. After searching the 'net for days, this solution was mentioned as a solution to a different, but similar, issue someone else was having with the PGI compilers.

···

On 08/04/2016 03:40 PM, Carl Ponder wrote:

*On 07/25/2016 01:40 PM, Prentice Bisbal wrote:*

    I'm having trouble building HDF5 with the Portland Group (PGI)
    compilers, version 16.5. Here is my configure command:

        .....

    I'm also building with GCC 5.4.0, GCC 6.1.0, and Intel 2015, and
    I only get this error with the PGI compilers. Does anyone know of
    afix for this? Googling hasn't proivded much help. I assume the
    PGI compilers much be doing some overly strict checking and there
    is a compiler switch to turn it off, but I haven't been able to
    find the correct switch yet, if that's the case.

Prentice -- I just built HDF5 1.10.0-patch1 with the PGI 16.7 compiler, which is now available.
If you're still having the above problem, I can send you the details.
My scripts would probably work just as well with PGI 16.5.

--
Prentice