This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: "'address@hidden'" <address@hidden> >From: nickitas georgas <address@hidden> >Subject: Please help (NETCDF installation). >Organization: UCAR/Unidata >Keywords: 200211042213.gA4MDrX25305 Hi Nickitas, > I am trying to compile the netCDF library in a LINUX environment with > > /usr/local/pgi/linux86/bin/pgf77 (Portland Group fortran 77), > and, > /usr/bin/gcc (C compiler) > > I am having problems at the "make test" level. I am NOT (unfortunatelly) a > computer scientist but an environmental engineer (modeler), so any help > could be really appreciated! > > Nickitas Georgas, M.Sc. > Engineer II > Hydroqual, Inc. > One Lethbridge Plaza > Mahwah, NJ 07430 > address@hidden > > **************** Here are the items you requested *********************** : > > A. The standard output of the command "uname -a". > Linux usa.hydroqual.com 2.4.18 #3 SMP Fri Apr 26 16:21:01 EDT 2002 i686 > unknown > B. The contents of the file VERSION, which is in the top-level source > directory. > 3.5.0 > C. The absolute pathnames of all compilers (C, Fortran, C++) used in the > build process (use the type(1) or which(1) utility to determine this). > /usr/local/pgi/linux86/bin/pgf77 (Portland Group fortran 77), > and, > /usr/bin/gcc (C compiler) ... > Making `test' in directory /usa3/OE648/CODE/netcdf-3.5.0/src/fortran > > make[2]: Entering directory `/usa3/OE648/CODE/netcdf-3.5.0/src/fortran' > + /usr/local/pgi/linux86/bin/pgf77 -c -O ftest.F > ar cru ../libsrc/libnetcdf.a fort-attio.o fort-control.o fort-dim.o > fort-genatt.o fort-geninq.o fort-genvar.o fort-lib.o fort-misc.o > fort-v2compat.o fort-vario.o fort-var1io.o fort-varaio.o fort-varmio.o > fort-varsio.o > ranlib ../libsrc/libnetcdf.a > /usr/local/pgi/linux86/bin/pgf77 -o ftest -O ftest.o ../libsrc/libnetcdf.a > ./ftest > *** Testing nccre ... > *** Testing ncddef ... > *** Testing ncvdef ... > *** Testing ncapt, ncaptc ... > *** Testing ncclos ... > *** Testing ncvpt1 ... > *** Testing ncvgt1 ... > *** Testing ncvpt ... > *** Testing ncopn, ncinq, ncdinq, ncvinq, ncanam, ncainq ... > *** Testing ncvgt, ncvgtc ... > *** Testing ncagt, ncagtc ... > *** Testing ncredf, ncdren, ncvren, ncaren, ncendf ... > *** Testing ncacpy ... > *** Testing ncadel ... > *** Testing fill values ... > make[2]: Leaving directory `/usa3/OE648/CODE/netcdf-3.5.0/src/fortran' > > Returning to directory /usa3/OE648/CODE/netcdf-3.5.0/src > > make[1]: Leaving directory `/usa3/OE648/CODE/netcdf-3.5.0/src' > make[1]: Entering directory `/usa3/OE648/CODE/netcdf-3.5.0/src' > > Making `test' in directory /usa3/OE648/CODE/netcdf-3.5.0/src/nf_test > > make[2]: Entering directory `/usa3/OE648/CODE/netcdf-3.5.0/src/nf_test' > + /usr/local/pgi/linux86/bin/pgf77 -c -O test_get.F > + /usr/local/pgi/linux86/bin/pgf77 -c -O test_put.F > + /usr/local/pgi/linux86/bin/pgf77 -c -O nf_error.F > + /usr/local/pgi/linux86/bin/pgf77 -c -O nf_test.F > + /usr/local/pgi/linux86/bin/pgf77 -c -O test_read.F > + /usr/local/pgi/linux86/bin/pgf77 -c -O test_write.F > + /usr/local/pgi/linux86/bin/pgf77 -c -O util.F > /usr/bin/gcc -c -O -DNDEBUG -Df2cFortran fortlib.c > /usr/local/pgi/linux86/bin/pgf77 -o nf_test -O test_get.o test_put.o > nf_error.o nf_test.o test_read.o test_write.o util.o fortlib.o > ../libsrc/libnetcdf.a -lm > test_get.o: In function `test_nf_get_var1_text_': > test_get.o(.text+0x4d): undefined reference to `nf_open_' > test_get.o(.text+0x116): undefined reference to `nf_get_var1_text_' > test_get.o(.text+0x170): undefined reference to `nf_get_var1_text_' > test_get.o(.text+0x21b): undefined reference to `nf_get_var1_text_' > test_get.o(.text+0x380): undefined reference to `nf_get_var1_text_' > test_get.o(.text+0x544): undefined reference to `nf_close_' It appears that you are using "-Df2cFortran" as part of your CPPFLAGS environment variable before running the "configure" script, which would be appropriate if you were using "fort77" as you Fortran compiler (it uses f2c), but since you are using pgf77 instead, I think you should be using "-DpgiFortran" instead. You'll need to "make distclean" then run the configure script again after resetting your CPPFLAGS environment variable to contain the string "-DpgiFortran". Please let us know if this doesn't work. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu