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.
Hello, > Respected sir, > > I was trying to install NetCDF (netcdf-4.1.3) in my machine(iMac, OS X > 10.9.3). Files are extracted in Downloads. > I installed gcc and gfortran that is working properly. The version are > given below, > > Jayasankars-iMac:~ jayasankar$ gcc -v > > Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr > --with-gxx-include-dir=/usr/include/c++/4.2.1 > Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) > Target: x86_64-apple-darwin13.2.0 > Thread model: posix > > Jayasankars-iMac:~ jayasankar$ gfortran -v > > Using built-in specs. > COLLECT_GCC=gfortran > COLLECT_LTO_WRAPPER=/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin13/4.9.0/lto-wrapper > Target: x86_64-apple-darwin13 > Configured with: ../gcc-4.9.0/configure --prefix=/usr/local/gfortran > --with-gmp=/Users/fx/devel/gcc/deps-static/x86_64 > --build=x86_64-apple-darwin13 > --enable-languages=c,c++,fortran,objc,obj-c++ > Thread model: posix > gcc version 4.9.0 (GCC) > > After that I did, > > Jayasankars-iMac:netcdf-4.1.3 jayasankar$ export CC=/usr/bin/gcc > Jayasankars-iMac:netcdf-4.1.3 jayasankar$ export FC=gfortran > Jayasankars-iMac:netcdf-4.1.3 jayasankar$ export F77=gfortran > Jayasankars-iMac:netcdf-4.1.3 jayasankar$ export F90=gfortran > Jayasankars-iMac:netcdf-4.1.3 jayasankar$ export CFLAGS=?-O3′ > I find the following error in the config.log file you provided: configure:4511: /usr/bin/gcc ’-O3′ conftest.c >&5 clang: error: no such file or directory: '’-O3′' This indicates to me that your compiler does not like the -O3 flag you are specifying. I would remove the CFLAG definition you are setting and try again to see if that eliminates the issue. Please let me know if this does not fix the issue, -Ward > then I did, > > Jayasankars-iMac:netcdf-4.1.3 jayasankar$ ./configure > configure: netCDF 4.1.3 > checking build system type... x86_64-apple-darwin13.2.0 > checking host system type... x86_64-apple-darwin13.2.0 > checking target system type... x86_64-apple-darwin13.2.0 > checking for a BSD-compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking for a thread-safe mkdir -p... ./install-sh -c -d > checking for gawk... no > checking for mawk... no > checking for nawk... no > checking for awk... awk > 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 a NCIO_MINBLOCKSIZE was specified... 256 > checking whether udunits is to be built... no > checking if fsync support is enabled... yes > checking whether extra valgrind tests should be run... no > checking whether we should try to build netCDF-4... yes > checking whether libcf is to be built... no > checking whether reading of HDF4 SD files is to be enabled... no > checking whether to fetch some sample HDF4 files from Unidata ftp site to > test HDF4 reading (requires wget)... no > checking whether parallel I/O for classic and 64-bit offset files using > parallel-netcdf is to be enabled... no > checking whether new netCDF-4 C++ API is to be built... no > checking whether extra example tests should be run... no > checking whether parallel IO tests should be run... no > checking whether a default chunk size in bytes was specified... 4194304 > checking whether a maximum per-variable cache size for HDF5 was > specified... 67108864 > checking whether a number of chunks for the default per-variable cache was > specified... 10 > checking whether a default file cache size for HDF5 was specified... 4194304 > checking whether a default file cache maximum number of elements for HDF5 > was specified... 1009 > checking whether a default cache preemption for HDF5 was specified... 0.75 > checking whether netCDF-4 logging is enabled... no > checking whether cdmremote client is to be built... no > checking whether DAP client is to be built... yes > checking for style of include used by make... GNU > checking for gcc... /usr/bin/gcc > checking whether the C compiler works... no > configure: error: in `/Users/jayasankar/Downloads/netcdf-4.1.3': > configure: error: C compiler cannot create executables > See `config.log' for more details > > > This was the error I am getting. > > Here I am sending you the config.log file. > Please help me to install netcdf in my machine because it is very much > required for my research purpose. > > I am expecting a positive reply. > Thanking you. > > -- > +---------------------------------------------+ > Jayasankar C B > Junior Research Fellow, > CSIR-Fourth Paradigm Institute (CSIR-4PI), > NAL Belur Campus, > Bangalore 560037, India. > Phone:- +918762539672 > +---------------------------------------------+ > > Ticket Details =================== Ticket ID: JGB-314401 Department: Support netCDF Priority: Normal Status: Closed