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.
Chris, The error messages you are seeing, such as: > netcdf_f.h(15): warning #77: this declaration has no storage class or type > specifier > EXTERNL int nc_inq_var_chunking_ints(int ncid, int varid, int *contiguousp, > int *chunksizesp); > ^ all indicate that the macro "EXTERNL" is not being expanded properly, perhaps because of a problem referencing the header file in which it is defined. Please check that this file, that should have been installed when you ran "make install" for the netCDF C library, exists and is readable: /scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/netcdf-4.2_intel_mpt/include/netcdf.h Then check that the following statements appear in that file about lines 395-399: #else #define MSC_EXTRA #endif /* defined(DLL_NETCDF) */ # define EXTERNL MSC_EXTRA extern Also, I see that your invocation of "icc" has "-DDLL_EXPORT" specified on the command line, defining that macro. That seems wrong for a Linux platform, as I believe it's only intended for a Windows system. It may be that definition is causing "EXTERNL" to get the wrong definition. For a Linux system, I think it should just get defined as "extern". Did you explicitly include "-DDLL_EXPORT" in CPPFLAGS or some other environment variable that would get included when "icc" is invoked? This is just a guess, but otherwise, I don't know why the "EXTERNL" macro isn't getting correctly defined in netcdf.h. --Russ > I downloaded and installed the netcdf-4.2 C package and successfully > configured it and built it. All "make check" tests for it passed. I have > downloaded the netcdf-fortran-4.2 and am trying to get it to build, but it > won't. It configures fine, but icc gives me fatal compiler errors during > "make check". I've searched for other reports and haven't found any. I > apologize if this has already been reported, and solved, but I can't find > reference to it. > > I am building on an SGI ICE system running Redhat 6 using the Intel v12.0.4 > compiler with SGI's MPT version of MPI. Am I looking at a compiler bug? I > tried icc v11.1 and had the same problem. > > [Christopher.W.Harrop@r15i1n7 netcdf-fortran-4.2]$ ./configure CC=icc > CXX=icpc F77=ifort F90=ifort FC=ifort --with-pic --enable-parallel-tests > --disable-shared CPPFLAGS="-I$HDF4/include > -I/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/hdf5-1.8.9_intel/include > -I$SZIP/include > -I/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/netcdf-4.2_intel_mpt/include" > LDFLAGS="-L$HDF4/lib > -L/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/hdf5-1.8.9_intel/lib > -L$SZIP/lib > -L/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/netcdf-4.2_intel_mpt/lib" > LIBS="-lmpi -lmfhdf -ldf -lhdf5_hl -lhdf5 -lsz -lnetcdf" > --prefix=/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/netcdf-4.2_intel_mpt > configure: netCDF-Fortran 4.2 > checking build system type... x86_64-unknown-linux-gnu > checking host system type... x86_64-unknown-linux-gnu > checking target 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 a thread-safe mkdir -p... /bin/mkdir -p > checking for gawk... gawk > checking whether make sets $(MAKE)... yes > configure: checking user options > checking whether extra valgrind tests should be run... no > checking whether parallel IO tests should be run... yes > checking whether netCDF extra tests should be run (developers only)... no > checking whether F90 API is desired... yes > checking whether fortran type sizes should be checked... yes > checking whether large file (> 2GB) tests should be run... no > checking whether benchmaks should be run (experimental)... no > checking where to put large temp files if large file tests are run... . > configure: finding C compiler > checking for gcc... icc > checking whether the C compiler works... yes > checking for C compiler default output file name... a.out > checking for suffix of executables... > checking whether we are cross compiling... no > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether icc accepts -g... yes > checking for icc option to accept ISO C89... none needed > checking for style of include used by make... GNU > checking dependency style of icc... gcc3 > checking whether icc and cc understand -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 ifort accepts -g... yes > checking whether we are using the GNU Fortran 77 compiler... no > checking whether ifort accepts -g... yes > configure: setting up Fortran 90 > checking what FC is set to... ifort > checking for Fortran flag to compile .f90 files... none > checking fortran 90 modules inclusion flag... -I > configure: setting up libtool > checking how to print strings... printf > 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 icc... /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... 98304000 > checking whether the shell understands some XSI constructs... yes > checking whether the shell understands "+="... yes > checking for /usr/bin/ld option to reload object files... -r > checking for objdump... objdump > checking how to recognize 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 icc object... ok > checking how to run the C preprocessor... icc -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 for objdir... .libs > checking if icc supports -fno-rtti -fno-exceptions... yes > checking for icc option to produce PIC... -fPIC -DPIC > checking if icc PIC flag -fPIC -DPIC works... yes > checking if icc static flag -static works... no > checking if icc supports -c -o file.o... yes > checking if icc supports -c -o file.o... (cached) yes > checking whether the icc 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 whether stripping libraries is possible... yes > checking if libtool supports shared libraries... yes > checking whether to build shared libraries... no > checking whether to build static libraries... yes > checking if libtool supports shared libraries... yes > checking whether to build shared libraries... no > checking whether to build static libraries... yes > checking for ifort option to produce PIC... -fPIC > checking if ifort PIC flag -fPIC works... yes > checking if ifort static flag -static works... no > checking if ifort supports -c -o file.o... yes > checking if ifort supports -c -o file.o... (cached) yes > checking whether the ifort linker (/usr/bin/ld -m elf_x86_64) supports shared > libraries... yes > checking dynamic linker characteristics... (cached) 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... no > checking whether to build static libraries... yes > checking for ifort option to produce PIC... -fPIC > checking if ifort PIC flag -fPIC works... yes > checking if ifort static flag -static works... no > checking if ifort supports -c -o file.o... yes > checking if ifort supports -c -o file.o... (cached) yes > checking whether the ifort linker (/usr/bin/ld -m elf_x86_64) supports shared > libraries... yes > checking dynamic linker characteristics... (cached) GNU/Linux ld.so > checking how to hardcode library paths into programs... immediate > configure: finding other utilities > configure: trying to set fortran flags for this platform > checking what FC is set to... ifort > 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 for /usr/bin/nm... /usr/bin/nm -B > checking nm flags... > checking for C-equivalent to Fortran routine "SUB"... sub_ > checking for Fortran "byte"... yes > checking for Fortran "integer*2"... yes > checking if Fortran "byte" is C "signed char"... yes > checking if Fortran "byte" is C "short"... no > checking if Fortran "byte" is C "int"... no > checking if Fortran "byte" is C "long"... no > checking if Fortran "integer*2" is C "short"... yes > checking if Fortran "integer*2" is C "int"... no > checking if Fortran "integer*2" is C "long"... no > checking if Fortran "integer" is C "int"... yes > checking if Fortran "real" is C "float"... yes > checking if Fortran "doubleprecision" is C "double"... yes > checking for Fortran-equivalent to netCDF "byte"... byte > checking for Fortran-equivalent to netCDF "short"... integer*2 > checking if Fortran 90 compiler capitalizes .mod filenames... no > checking whether extra example tests should be run... no > checking whether a win32 DLL is desired... no > configure: checking types, headers, and functions > checking netcdf.h usability... yes > checking netcdf.h presence... yes > checking for netcdf.h... yes > checking for library containing nc_open... no > checking for nc_def_opaque... no > checking for nccreate... no > checking for nc_set_log_level... no > checking for oc_open... no > checking for nc_use_parallel_enabled... no > checking netCDF v2 API present... no > checking netCDF-4 present... no > checking for stdlib.h... (cached) yes > checking for sys/types.h... (cached) yes > checking sys/param.h usability... yes > checking sys/param.h presence... yes > checking for sys/param.h... yes > checking for dirent.h that defines DIR... yes > checking for library containing opendir... none required > checking for ANSI C header files... (cached) yes > checking for sys/wait.h that is POSIX.1 compatible... yes > checking whether time.h and sys/time.h may both be included... yes > checking locale.h usability... yes > checking locale.h presence... yes > checking for locale.h... yes > checking stdio.h usability... yes > checking stdio.h presence... yes > checking for stdio.h... yes > checking stdarg.h usability... yes > checking stdarg.h presence... yes > checking for stdarg.h... yes > checking errno.h usability... yes > checking errno.h presence... yes > checking for errno.h... yes > checking ctype.h usability... yes > checking ctype.h presence... yes > checking for ctype.h... yes > checking fcntl.h usability... yes > checking fcntl.h presence... yes > checking for fcntl.h... yes > checking malloc.h usability... yes > checking malloc.h presence... yes > checking for malloc.h... yes > checking for stdlib.h... (cached) yes > checking for string.h... (cached) yes > checking for strings.h... (cached) yes > checking for unistd.h... (cached) yes > checking for sys/stat.h... (cached) yes > checking getopt.h usability... yes > checking getopt.h presence... yes > checking for getopt.h... yes > checking sys/time.h usability... yes > checking sys/time.h presence... yes > checking for sys/time.h... yes > checking sys/resource.h usability... yes > checking sys/resource.h presence... yes > checking for sys/resource.h... yes > checking for vprintf... yes > checking for _doprnt... no > checking for stdbool.h that conforms to C99... yes > checking for _Bool... yes > checking for working alloca.h... yes > checking for alloca... yes > checking for size_t... yes > checking for off_t... yes > checking for ssize_t... yes > checking for ptrdiff_t... yes > checking for uchar... no > checking for longlong... no > checking whether char is unsigned... no > checking size of short... 2 > checking size of int... 4 > checking size of long... 8 > checking size of float... 4 > checking size of double... 8 > checking size of off_t... 8 > checking size of size_t... 8 > configure: generating header files and makefiles > configure: creating ./config.status > config.status: creating Makefile > config.status: creating nf-config > config.status: creating netcdf-fortran.pc > config.status: creating man4/Makefile > config.status: creating fortran/Makefile > config.status: creating nf_test/Makefile > config.status: creating f90/Makefile > config.status: creating examples/Makefile > config.status: creating examples/F90/Makefile > config.status: creating examples/F77/Makefile > config.status: creating config.h > config.status: creating fortran/nfconfig1.inc > config.status: executing depfiles commands > config.status: executing libtool commands > [Christopher.W.Harrop@r15i1n7 netcdf-fortran-4.2]$ make check > Making check in f90 > make[1]: Entering directory > `/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/build/netcdf-fortran-4.2/f90' > ifort -g -c -o typeSizes.o typeSizes.f90 > make check-am > make[2]: Entering directory > `/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/build/netcdf-fortran-4.2/f90' > /bin/sh ../libtool --tag=FC --mode=compile ifort -g -c -o typeSizes.lo > typeSizes.f90 > libtool: compile: ifort -g -c typeSizes.f90 -fPIC -o typeSizes.o > /bin/sh ../libtool --tag=FC --mode=compile ifort -g -c -o netcdf.lo > netcdf.f90 > libtool: compile: ifort -g -c netcdf.f90 -fPIC -o netcdf.o > /bin/sh ../libtool --tag=FC --mode=link ifort -g > -L/apps/hdf4/4.2.7-intel-12.0.4.191/lib > -L/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/hdf5-1.8.9_intel/lib > -L/apps/szip/2.1-intel-12.0.4.191/lib > -L/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/netcdf-4.2_intel_mpt/lib > -o libnetcdff90.la typeSizes.lo netcdf.lo -lmpi -lmfhdf -ldf -lhdf5_hl > -lhdf5 -lsz -lnetcdf > libtool: link: ar cru .libs/libnetcdff90.a typeSizes.o netcdf.o > libtool: link: ranlib .libs/libnetcdff90.a > libtool: link: ( cd ".libs" && rm -f "libnetcdff90.la" && ln -s > "../libnetcdff90.la" "libnetcdff90.la" ) > make[2]: Leaving directory > `/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/build/netcdf-fortran-4.2/f90' > make[1]: Leaving directory > `/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/build/netcdf-fortran-4.2/f90' > Making check in fortran > make[1]: Entering directory > `/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/build/netcdf-fortran-4.2/fortran' > echo '! NetCDF-3.' > netcdf.inc > cat ../fortran/netcdf3.inc >> netcdf.inc > make check-am > make[2]: Entering directory > `/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/build/netcdf-fortran-4.2/fortran' > depbase=`echo fort-attio.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ > /bin/sh ../libtool --tag=CC --mode=compile icc -DHAVE_CONFIG_H -I. -I.. > -DDLL_EXPORT -I/apps/hdf4/4.2.7-intel-12.0.4.191/include > -I/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/hdf5-1.8.9_intel/include > -I/apps/szip/2.1-intel-12.0.4.191/include > -I/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/netcdf-4.2_intel_mpt/include > -g -O2 -MT fort-attio.lo -MD -MP -MF $depbase.Tpo -c -o fort-attio.lo > fort-attio.c &&\ > mv -f $depbase.Tpo $depbase.Plo > libtool: compile: icc -DHAVE_CONFIG_H -I. -I.. -DDLL_EXPORT > -I/apps/hdf4/4.2.7-intel-12.0.4.191/include > -I/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/hdf5-1.8.9_intel/include > -I/apps/szip/2.1-intel-12.0.4.191/include > -I/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/netcdf-4.2_intel_mpt/include > -g -O2 -MT fort-attio.lo -MD -MP -MF .deps/fort-attio.Tpo -c fort-attio.c > -fPIC -DPIC -o fort-attio.o > netcdf_f.h(15): warning #77: this declaration has no storage class or type > specifier > EXTERNL int nc_inq_var_chunking_ints(int ncid, int varid, int *contiguousp, > int *chunksizesp); > ^ > > netcdf_f.h(15): error: expected a ";" > EXTERNL int nc_inq_var_chunking_ints(int ncid, int varid, int *contiguousp, > int *chunksizesp); > ^ > > netcdf_f.h(17): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(17): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(20): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(20): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(24): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(24): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(28): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(28): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(31): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(31): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(34): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(34): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(37): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(37): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(42): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(42): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(45): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(45): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(48): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(48): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(51): warning #12: parsing restarts here after previous syntax error > int ndims, int *dim_sizesp); > ^ > > netcdf_f.h(53): warning #77: this declaration has no storage class or type > specifier > EXTERNL int > ^ > > netcdf_f.h(53): error: expected a ";" > EXTERNL int > ^ > > netcdf_f.h(56): warning #12: parsing restarts here after previous syntax error > int *dim_sizesp); > ^ > > compilation aborted for fort-attio.c (code 2) > make[2]: *** [fort-attio.lo] Error 1 > make[2]: Leaving directory > `/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/build/netcdf-fortran-4.2/fortran' > make[1]: *** [check] Error 2 > make[1]: Leaving directory > `/scratch1/portfolios/BMC/nesccmgmt/Christopher.W.Harrop/opt/build/netcdf-fortran-4.2/fortran' > make: *** [check-recursive] Error 1 > [Christopher.W.Harrop@r15i1n7 netcdf-fortran-4.2]$ > > Thanks, > > Chris > > ----------------------------------------------------------------------------------------------------------- > Christopher W. Harrop email: address@hidden > Global Systems Division > voice: (303) 497-6808 > NOAA Earth System Research Laboratory fax: > (303) 497-7259 > 325 Broadway R/GSD2 > Boulder, CO 80303 > > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: GKD-688075 Department: Support netCDF Priority: Normal Status: Closed