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.
>From: =?gb2312?q?Grant=20He?= <address@hidden> >Organization: ? >Keywords: 200408171517.i7HFHhaW028572 netCDF PGI Hi Grant, >I am Grant. I meet a new problem. Now the >"./configure" is passed, but the command "make" shows >errors once again. I checked the directories and I >found the libsrc/libnetcdf.a, cxx/libnetcdf_c++.a, and > utilities ncgen and ncdump are all created(Though I >don't know whether they are right or wrong.) But why >does the output of "make" show errors? How can I solve >them? > >Here is the output of command "make": The important part of the 'make' output is: >make[2]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src/fortran' >c89 -c -O -I../libsrc -DNDEBUG fort-attio.c >In file included from ncfortran.h:13, > from fort-attio.c:6: >cfortran.h:134:3: #error "cfortran.h: Can't find your >environment among: - MIPS cc and f77 2.0. (e.g. >Silicon Graphics, DECstations, ...) - IBM AIX >XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 > - VAX VMS CC 3.1 and FORTRAN 5.4. > - Alpha VMS DEC C 1.3 and >DEC FORTRAN 6.0. - Alpha >OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 > - Apollo DomainOS 10.2 (sys5.3) with f77 >10.7 and cc 6.7. - CRAY > - NEC SX-4 SUPER-UX > - CONVEX > - Sun > - PowerStation Fortran with Visual C++ >- HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 >A 9000/730 - LynxOS: cc or gcc with f2c. > - VAXUltrix: >vcc,cc or gcc with f2c. gcc or cc with f77. > - f77 with vcc works; but missing link >magic for f77 I/O. - NO fort. None of >gcc, cc or vcc generate required names. - f2c : >Use #define f2cFortran, or cc -Df2cFortran > - NAG f90: Use #define NAGf90Fortran, or cc >-DNAGf90Fortran - Absoft UNIX F77: Use >#define AbsoftUNIXFortran >or cc -DAbsoftUNIXFortran - Absoft Pro Fortran: >Use #define AbsoftProFortran - Portland Group >Fortran: Use #define pgiFortran" This is telling us that you did not set the CPPFLAGS environment variable to tell 'configure' that you needed to set an additional flat for the PGI Fortran compiler. The Unidata web page that presents the set of Unix/Linux environment variables you should be setting and how they should be set is: Unidata HomePage http://my.unidata.ucar.edu netCDF http://my.unidata.ucar.edu/content/software/netcdf/index.html Installation Instructions http://my.unidata.ucar.edu/content/software/netcdf/INSTALL.html It is the last page that lists example environment variable settings for a variety of operating systems. The one that is most likely pertinent for you is a _variant_ of: CC=/usr/bin/gcc CPPFLAGS='-DNDEBUG -DpgiFortran' CFLAGS=-O FC=/opt/pgi/linux86/bin/pgf90 FFLAGS='-O -w' F90=/opt/pgi/linux86/bin/pgf90 CXX=/usr/bin/g++ export CC CPPFLAGS CFLAGS FC FFLAGS F90 CXX Note: - CPPFLAGS is defined to include the -DpgiFortran flag. This is the one that will get you past the error you are are reporting. - leave the settings for the other environment variables as you have them now After defining the above environment variables, you will need to run 'configure' again -- after -- you clean the distribution: make distclean ./configure make make install Please let us know if this does not fix your problem. Cheers, Tom >[root@localhost src]# make >make[1]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src' > >Making `all' in directory >/home/he/netcdf/netcdf-3.5.1/src/libsrc > >make[2]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src/libsrc' >c89 -c -O -I. -DNDEBUG attr.c >c89 -c -O -I. -DNDEBUG dim.c >c89 -c -O -I. -DNDEBUG error.c >c89 -c -O -I. -DNDEBUG -DVERSION=`cat ../VERSION` >libvers.c >c89 -c -O -I. -DNDEBUG nc.c >c89 -c -O -I. -DNDEBUG ncio.c >c89 -c -O -I. -DNDEBUG ncx.c >c89 -c -O -I. -DNDEBUG putget.c >c89 -c -O -I. -DNDEBUG string.c >c89 -c -O -I. -DNDEBUG v1hpg.c >c89 -c -O -I. -DNDEBUG v2i.c >c89 -c -O -I. -DNDEBUG var.c >ar cru libnetcdf.a attr.o dim.o error.o libvers.o nc.o >ncio.o ncx.o putget.o string.o v1hpg.o v2i.o var.o >ranlib libnetcdf.a >make[2]: Leaving directory >`/home/he/netcdf/netcdf-3.5.1/src/libsrc' > >Returning to directory >/home/he/netcdf/netcdf-3.5.1/src > >make[1]: Leaving directory >`/home/he/netcdf/netcdf-3.5.1/src' >make[1]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src' > >Making `all' in directory >/home/he/netcdf/netcdf-3.5.1/src/ncdump > >make[2]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src/ncdump' >c89 -c -O -I../libsrc -DNDEBUG ncdump.c >c89 -c -O -I../libsrc -DNDEBUG vardata.c >c89 -c -O -I../libsrc -DNDEBUG dumplib.c >c89 -o ncdump -O ncdump.o vardata.o dumplib.o >./libsrc/libnetcdf.a >make[2]: Leaving directory >`/home/he/netcdf/netcdf-3.5.1/src/ncdump' > >Returning to directory >/home/he/netcdf/netcdf-3.5.1/src > >make[1]: Leaving directory >`/home/he/netcdf/netcdf-3.5.1/src' >make[1]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src' > >Making `all' in directory >/home/he/netcdf/netcdf-3.5.1/src/ncgen > >make[2]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src/ncgen' >c89 -c -O -I../libsrc -I. -DNDEBUG main.c >c89 -c -O -I../libsrc -I. -DNDEBUG load.c >Warning: ncgentab.c is out-of-date with respect to >ncgen.y >Warning: It should be recreated via yacc on an OSF/1 >system >c89 -c -O -I../libsrc -I. -DNDEBUG ncgentab.c >c89 -c -O -I../libsrc -I. -DNDEBUG escapes.c >c89 -c -O -I../libsrc -I. -DNDEBUG getfill.c >c89 -c -O -I../libsrc -I. -DNDEBUG init.c >c89 -c -O -I../libsrc -I. -DNDEBUG genlib.c >c89 -o ncgen -O main.o load.o ncgentab.o escapes.o >getfill.o init.o genlib.o ../libsrc/libnetcdf.a >make[2]: Leaving directory >`/home/he/netcdf/netcdf-3.5.1/src/ncgen' > >Returning to directory >/home/he/netcdf/netcdf-3.5.1/src > >make[1]: Leaving directory >`/home/he/netcdf/netcdf-3.5.1/src' >make[1]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src' > >Making `all' in directory >/home/he/netcdf/netcdf-3.5.1/src/cxx > >make[2]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src/cxx' >c++ -c -I../libsrc -I. -DNDEBUG netcdf.cpp >c++ -c -I../libsrc -I. -DNDEBUG ncvalues.cpp >ar cru libnetcdf_c++.a netcdf.o ncvalues.o >ranlib libnetcdf_c++.a >c++ -c -I../libsrc -I. -DNDEBUG nctst.cpp >c++ -o nctst nctst.o libnetcdf_c++.a -L../libsrc >-lnetcdf >make[2]: Leaving directory >`/home/he/netcdf/netcdf-3.5.1/src/cxx' > >Returning to directory >/home/he/netcdf/netcdf-3.5.1/src > >make[1]: Leaving directory >`/home/he/netcdf/netcdf-3.5.1/src' >make[1]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src' > >Making `all' in directory >/home/he/netcdf/netcdf-3.5.1/src/fortran > >make[2]: Entering directory >`/home/he/netcdf/netcdf-3.5.1/src/fortran' >c89 -c -O -I../libsrc -DNDEBUG fort-attio.c >In file included from ncfortran.h:13, > from fort-attio.c:6: >cfortran.h:134:3: #error "cfortran.h: Can't find your >environment among: - MIPS cc and f77 2.0. (e.g. >Silicon Graphics, DECstations, ...) - IBM AIX >XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 > - VAX VMS CC 3.1 and FORTRAN 5.4. > - Alpha VMS DEC C 1.3 and >DEC FORTRAN 6.0. - Alpha >OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 > - Apollo DomainOS 10.2 (sys5.3) with f77 >10.7 and cc 6.7. - CRAY > - NEC SX-4 SUPER-UX > - CONVEX > - Sun > - PowerStation Fortran with Visual C++ >- HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 >A 9000/730 - LynxOS: cc or gcc with f2c. > - VAXUltrix: >vcc,cc or gcc with f2c. gcc or cc with f77. > - f77 with vcc works; but missing link >magic for f77 I/O. - NO fort. None of >gcc, cc or vcc generate required names. - f2c : >Use #define f2cFortran, or cc -Df2cFortran > - NAG f90: Use #define NAGf90Fortran, or cc >-DNAGf90Fortran - Absoft UNIX F77: Use >#define AbsoftUNIXFortran >or cc -DAbsoftUNIXFortran - Absoft Pro Fortran: >Use #define AbsoftProFortran - Portland Group >Fortran: Use #define pgiFortran" >make[2]: *** [fort-attio.o] Error 1 >make[2]: Leaving directory >`/home/he/netcdf/netcdf-3.5.1/src/fortran' >make[1]: *** [subdir_target] Error 1 >make[1]: Leaving directory >`/home/he/netcdf/netcdf-3.5.1/src' >make: *** [fortran/all] Error 2 >[root@localhost src]# > >I am looking forward to your help! > >Thanks! > >--Grant Hertz-- -- NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publically available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.