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.
Hi Jaikumar, > Thank You For Your Response. > I download the following packages netcdf-cxx-4.2.tar.gz , > netcdf-fortran-4.2.tar.gz. > After downloading while I am going to install. Before you install either of those packages, you must first doenload and install the netCDF C library, because both the netCDF Fortran library and netCDF C++ libraries depend on the netCDF C library. The latest released version of the netCDF C library is version 4.3.1, and the source package from which you can build and install it is available here: http://www.unidata.ucar.edu/downloads/netcdf/ After you have built and installed that, follow these instructions to build and install the netCDF Fortran library: http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html and similarly for the netCDF C++ library, if you need it. --Russ > I am getting below error message for both netcdf-cxx and netcdf-fortran > installation. > > # ./configure --prefix=/app/netcdf-4.2 > configure: netCDF-cxx 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 netCDF extra tests should be run (developers only)... no > checking whether large file (> 2GB) tests should be run... no > checking where to put large temp files if large file tests are run... . > configure: finding C++ compiler (will not be used if C++ API is not desired) > checking for g++... g++ > 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 g++ accepts -g... yes > checking for style of include used by make... GNU > checking dependency style of g++... gcc3 > configure: setting up libtool > checking how to print strings... printf > checking for gcc... gcc > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking dependency style of gcc... 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 gcc... /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... 3458764513820540925 > 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 gcc object... ok > checking how to run the C preprocessor... gcc -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 gcc supports -fno-rtti -fno-exceptions... no > checking for gcc option to produce PIC... -fPIC -DPIC > checking if gcc PIC flag -fPIC -DPIC works... yes > checking if gcc static flag -static works... no > checking if gcc supports -c -o file.o... yes > checking if gcc supports -c -o file.o... (cached) yes > checking whether the gcc 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 how to run the C++ preprocessor... g++ -E > checking for ld used by g++... /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 g++ linker (/usr/bin/ld -m elf_x86_64) supports > shared libraries... yes > checking for g++ option to produce PIC... -fPIC -DPIC > checking if g++ PIC flag -fPIC -DPIC works... yes > checking if g++ static flag -static works... no > checking if g++ supports -c -o file.o... yes > checking if g++ supports -c -o file.o... (cached) yes > checking whether the g++ 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 > checking for special C compiler options needed for large files... no > checking for _FILE_OFFSET_BITS value needed for large files... no > checking netcdf.h usability... no > checking netcdf.h presence... no > checking for netcdf.h... no > *configure: error: netcdf.h could not be found. Please set CPPFLAGS.* > > So, with out netcdf installation , then how can i give netcdf.h header > file in the CPPFLAGS. > Could you guide me? > > Regards, > *Jaikumar S, > HCL Infotech Ltd. > (A subsidiary of HCL INFOSYSTEMS LTD) > PH : 09751855415 > Email: address@hidden > Technology that touches lives > * > > > Unidata netCDF Support wrote: > > Hello, > > > > Starting with netCDF 4.2.0, the C++ and Fortran libraries have been > > separated from the netCDF-C library; they must be installed independently. > > > > The source code for the Fortran and C++ libraries may be found on the > > following page: > > > > http://www.unidata.ucar.edu/downloads/netcdf/index.jsp > > > > You should be able to download, unpack, configure and > > build them individually. Note that you will need to specify > > the location of the netCDF-C library for them to link against, > > using CFLAGS/LDFLAGS. > > > > Please let me know if you have any questions about the install > > process and I will do my best to help! > > > > Thank you, > > > > -Ward > > > > > > On 1/16/14, 8:48 AM, address@hidden wrote: > > > >> New Ticket: netcdf 4.3.0 and netcdf 4.1.3 Installation Library Difference. > >> > >> Dear Support, > >> > >> We install the netcdf 4.3.0 and netcdf 4.1.3. > >> > >> *Netcdf 4.3.0 Library > >> > >> > >> [root@login1 src]# ls /app/netcdf-4.3.0-t2/lib/ > >> libnetcdf.a libnetcdf.la libnetcdf.so libnetcdf.so.7 > >> libnetcdf.so.7.2.0 pkgconfig > >> > >> *Netcdf 4.1.3 Library > >> > >> > >> [root@login1 src]# ls /app/netcdf-4.1.3-new/lib/ > >> libnetcdf.a libnetcdf_c++.so libnetcdff.a > >> libnetcdff.so.5 libnetcdf.so libnetcdf.so.7.1.1 > >> libnetcdf_c++.a libnetcdf_c++.so.4 libnetcdff.la > >> libnetcdff.so.5.1.0 libnetcdf.so.7 pkgconfig > >> libnetcdf_c++.la libnetcdf_c++.so.4.1.0 libnetcdff.so > >> libnetcdf.la libnetcdf.so.7.0.1 > >> > >> Why what are the library are present in netcdf-4.1.3 are not present in > >> the netcdf-4.3.0? > >> > >> What we have to do get that library in the netcdf-4.3.0 installation? > >> > >> > > > > > > > > Ticket Details > > =================== > > Ticket ID: YRI-429791 > > Department: Support netCDF > > Priority: Normal > > Status: Open > > > > > > > ::DISCLAIMER:: > ---------------------------------------------------------------------------------------------------------------------------------------------------- > > The contents of this e-mail and any attachment(s) are confidential and > intended for the named recipient(s) only. > E-mail transmission is not guaranteed to be secure or error-free as > information could be intercepted, corrupted, > lost, destroyed, arrive late or incomplete, or may contain viruses in > transmission. The e mail and its contents > (with or without referred errors) shall therefore not attach any liability on > the originator or HCL or its affiliates. > Views or opinions, if any, presented in this email are solely those of the > author and may not necessarily reflect the > views or opinions of HCL or its affiliates. Any form of reproduction, > dissemination, copying, disclosure, modification, > distribution and / or publication of this message without the prior written > consent of authorized representative of > HCL is strictly prohibited. If you have received this email in error please > delete it and notify the sender immediately. > Before opening any email and/or attachments, please check them for viruses > and other defects. > > ---------------------------------------------------------------------------------------------------------------------------------------------------- > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: YRI-429791 Department: Support netCDF Priority: Normal Status: Closed