netcdf building

Hi all,
I recently downloaded latest trial version of PGI fortran workstation. I want to install netcdf-3.6.2 version using PGI compiler. But I am unable to do that due to some errors. I am using AMD 64-bit opteron processors with RHEL-3.0 desktop. I am getting the following error while configuring it.
configure: netCDF 3.6.2
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
configure: checking user options
checking whether CXX is set to ‘’… no
checking whether FC is set to ‘’… no
checking whether F90 is set to ‘’… no
checking whether documentation is to be installed… no
checking whether Fortran compiler(s) should be tested during configure… yes
checking whether configure should try to set compiler flags… yes
checking whether FFIO will be used… no
checking whether to skip C++, F77, or F90 APIs if compiler is broken… yes
checking whether only the C library is desired… no
checking whether examples should be built… yes
checking whether F77 API is desired… yes
checking whether F90 API is desired… yes
checking whether fortran type sizes should be checked… yes
checking whether C API is desired… yes
checking where to get netCDF C-only library for separate fortran libraries…
checking whether CXX API is desired… yes
checking whether v2 netCDF API should be built… yes
checking whether the ncgen/ncdump should be built… yes
checking whether large file (> 2GB) tests should be run… no
checking whether extreme numbers should be used in tests… yes
checking where to put large temp files if large file tests are run… .
checking whether a win32 DLL is desired… no
checking whether separate fortran libs are desired… yes
configure: finding C compiler
checking for xlc… no
checking for cc… cc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether cc accepts -g… yes
checking for cc option to accept ISO C89… none needed
checking for style of include used by make… GNU
checking dependency style of cc… gcc3
checking whether cc understands -c and -o together… yes
checking for an ANSI C-conforming const… yes
configure: finding Fortran compiler (will not be used if Fortran API is not desired)
checking whether we are using the GNU Fortran compiler… no
checking whether /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 accepts -g… yes
checking whether we are using the GNU Fortran 77 compiler… no
checking whether /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 accepts -g… yes
configure: setting up Fortran 90
checking for Fortran flag to compile .f90 files… none
checking fortran 90 modules inclusion flag… -I
checking if Fortran compiler can handle Fortran-90… yes
configure: finding C++ compiler (will not be used if C++ API is not desired)
checking for cl… no
checking for KCC… no
checking for CC… no
checking for cxx… no
checking for cc++… no
checking for xlC… no
checking for aCC… no
checking for c++… c++
checking whether we are using the GNU C++ compiler… yes
checking whether c++ accepts -g… yes
checking dependency style of c++… gcc3
checking for a sed that does not truncate output… /bin/sed
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for fgrep… /bin/grep -F
checking for ld used by cc… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking for BSD- or MS-compatible name lister (nm)… /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface… BSD nm
checking whether ln -s works… yes
checking the maximum length of command line arguments… 32768
checking whether the shell understands some XSI constructs… yes
checking whether the shell understands “+=”… no
checking for /usr/bin/ld option to reload object files… -r
checking how to recognise dependent libraries… pass_all
checking for ar… ar
checking for strip… strip
checking for ranlib… ranlib
checking command to parse /usr/bin/nm -B output from cc object… ok
checking how to run the C preprocessor… cc -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for dlfcn.h… yes
checking whether we are using the GNU C++ compiler… (cached) yes
checking whether c++ accepts -g… (cached) yes
checking dependency style of c++… (cached) gcc3
checking how to run the C++ preprocessor… c++ -E
checking whether we are using the GNU Fortran 77 compiler… (cached) no
checking whether /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 accepts -g… (cached) yes
checking whether we are using the GNU Fortran compiler… (cached) no
checking whether /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 accepts -g… (cached) yes
checking for objdir… .libs
checking if cc supports -fno-rtti -fno-exceptions… yes
checking for cc option to produce PIC… -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works… yes
checking if cc static flag -static works… yes
checking if cc supports -c -o file.o… yes
checking if cc supports -c -o file.o… (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries… yes
checking whether -lc should be explicitly linked in… no
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
checking for ld used by c++… /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld… yes
checking whether the c++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries… yes
checking for c++ option to produce PIC… -fPIC -DPIC
checking if c++ PIC flag -fPIC -DPIC works… yes
checking if c++ static flag -static works… yes
checking if c++ supports -c -o file.o… yes
checking if c++ supports -c -o file.o… (cached) yes
checking whether the c++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
checking for /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 option to produce PIC… -fPIC
checking if /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 PIC flag -fPIC works… no
checking if /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 static flag -static works… no
checking if /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 supports -c -o file.o… no
checking if /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 supports -c -o file.o… (cached) no
checking whether the /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
checking for /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 option to produce PIC… -fPIC
checking if /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 PIC flag -fPIC works… no
checking if /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 static flag -static works… no
checking if /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 supports -c -o file.o… no
checking if /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 supports -c -o file.o… (cached) no
checking whether the /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
configure: finding other utilities
checking for a BSD-compatible install… /usr/bin/install -c
configure: trying to set fortran flags for this platform
configure: trying to set flags for this platform
checking if _HPUX_SOURCE should be set… no
checking if Solaris -Xa option is needed… CFLAGS=-g -O2
configure: trying to set fortran 90 flags for this platform
checking if we need to add to FFLAGS for ifort compiler… FFLAGS=-O -W
checking if we need to set _LARGE_FILES despite results of previous tests… _LARGE_FILES=
checking for special C compiler options needed for large files… no
checking for _FILE_OFFSET_BITS value needed for large files… no
configure: displaying some results
checking CPPFLAGS… -DNDEBUG -DpgiFortran
checking CC CFLAGS… cc -g -O2
checking type cc… cc is /usr/bin/cc
checking CXX… c++
checking CXXFLAGS… -g -O2
checking type c++… c++ is /usr/bin/c++
checking FC… /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90
checking FFLAGS… -O -W
checking type /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90… /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 is /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90
checking F90… /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90
checking F90FLAGS…
checking type /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90… /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90 is /shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90
checking AR… ar
checking ARFLAGS…
checking type ar… ar is /usr/bin/ar
checking NM… /usr/bin/nm -B
checking NMFLAGS…
checking for /usr/bin/nm… /usr/bin/nm -B
checking nm flags…
checking for C-equivalent to Fortran routine “SUB”… configure: error: Could not compile conftest.f

I had used the following environment settings before that:
export FC=/shared/nagesh/Pgi_install/linux86-64/7.2-3/bin/pgf90
export LM_LICENSE_FILE=$LM_LICENSE_FILE:/shared/nagesh/Pgi_install/license.dat
export MANPATH=$MANPATH:/shared/nagesh/Pgi_install/linux86-64/7.2-3/man/
export FFLAGS="-fastsse -tp k8-64 -Minline -Mvect=recog,transform,assoc,cachesize:1048576"
export CPPFLAGS="-DNDEBUG -DpgiFortran"
./configure --prefix=/shared/nagesh/netcdf3/pgi/ --enable-64bit --enable-shared

What could be the problem ? Can anybody say that what would be the appropriate environment settings to build netcdf for RHEL-3.0 with AMD 64-bit processors system.

With regards,
G.NageswaraRao.

The config.log file would be useful to help find out why configure is failing. Where did the --enable-64bit come from? The netcdf 3.6.2 I have does not have that as an option? The configure command I used to build netcdf is:

./configure CPPFLAGS=-DpgiFortran FC=pgf90 --prefix=/opt/netcdf/linux86-64/3.6.2 --exec-prefix=/opt/netcdf/linux86-64/3.6.2

Hi G.NageswaraRao,

Below is the configure test for “SUB” in which you’re unable to compile the source file conftest.f. Given the simplicity of the test, I suspect that you do not have pgf90 installed properly. Are you able to compile a simple hello world program? What happens when you try an compile conftest.f?

  • Mat
% cat conftest.f
        call sub()
        end

% pgf90 -c -fastsse -tp k8-64 -Minline -Mvect=recog,transform,assoc,cachesize:1048576 conftest.f
% /usr/bin/nm -B conftest.o | awk '/SUB_/{print "SUB_";exit} /SUB/ {print "SUB"; exit} /sub_/{print "sub_";exit} /sub/ {print "sub"; exit}'
sub_