CUDA_HOME warning messing up installation of HDF4

Hi,

When I try to install HDF4 from source, the Makefile is messed up because of the:
pgcc-Warning-CUDA_HOME has been deprecated. message that pgcc spits out if the system has aCUDA_HOME set. That message ewnds up inside the Makefile as part of the compiler name!

Other packages seem to be able to avoid this, but just wanted to let you know.
Maybe have that warning only show up if the user has an elevated warning flag?

– Ron

Hi Ron,

Very odd. Looks like HDF4’s configure is using the following command to grab the compiler version (aka CC_VERSION).

$ pgcc -V 2>&1 | grep pgcc
pgcc-Warning-CUDA_HOME has been deprecated. Please, use NVHPC_CUDA_HOME instead.
pgcc (aka nvc) 22.11-0 64-bit target on x86-64 Linux -tp zen2

The causes the CC_VERSION line to have a newline, thus causing the makefile to fail.

Easiest work around is to uinset CUDA_HOME before running configure.

Though you can also edit line 64 of “config/linux-gnu” to grep for nvc instead of pgcc so only the version string is found.

    *pgcc*)
        cc_version_info=`$CC $CFLAGS $H5_CFLAGS -V 2>&1 | grep 'nvc'`
        ;;

Maybe have that warning only show up if the user has an elevated warning flag?

When we put breaking changes like this we want to make sure folks are informed and hiding it under an elevated flag would defeat this purpose. Though I’ll see if there’s a way to suppress the warning when running with the version flag, “-V”.

-Mat