I am trying to install netcdf module for fortran. I am following steps from this link http://albeniz.eng.uci.edu/software/WRFCMAQ/NetCDF_installation_for_C_and_Fortran_libraries-HPC.pdf
I am getting error:
configure: netCDF 4.4.1.1
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
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: checking user options
checking whether a win32 DLL is desired... no
checking whether a NCIO_MINBLOCKSIZE was specified... 256
checking if fsync support is enabled... no
checking if jna bug workaround is enabledd... no
checking whether extra valgrind tests should be run... no
checking whether we should build netCDF-4... no
checking do we require hdf5 dynamic-loading support... yes
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 we should attempt to install netcdf-fortran (EXPERIMENTAL)... 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 DAP client is to be built... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/mirzaba/test/FSM2/srcNETCDF/netcdf-4.4.1.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
This is my config.log
## ---------------- ##
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value=gcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-O
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='-DNDEBUG -DgFortran'
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
ac_cv_target=x86_64-unknown-linux-gnu
am_cv_make_support_nested_variables=yes
-----------------
Output variables.
-----------------
167,1 37%
libnetcdf-dev
/libnetcdff-dev
from the Ubuntu repository? – steeldriver Feb 13 '23 at 21:33compil_nc.sh
file to correct the include and library paths – steeldriver Feb 13 '23 at 23:23$FC -O3 -c -I/usr/lib/gcc/x86_64-linux-gnu FSM2_temp.f90 $FC -O3 -c -I/usr/include FSM2_temp.f90 -o FSM2 #$FC -O3 -c -I/usr/lib64/gfortran/modules FSM2_temp.f90 #$FC -o -c -I/usr/include/netcdf.mod FSM2_temp.f90 $FC -o FSM2 FSM2_temp.o -L/usr/include -lnetcdff #$FC -o FSM2 FSM2_temp.o -L/usr/lib64 -lnetcdff mv FSM2 ../FSM2
rm out rm .mod rm .o rm FSM2_temp.f90 cd ..
– Bareera Mirza Feb 14 '23 at 03:25