Hi,
I have installed zlib from source code (install path is /usr/local/zlib), and I have also installed HDF5 with zlib using the following command:
CC=/opt/intel/compilers_and_libraries_2020.4.304/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.4.304/linux/bin/intel64/icpc FC=/opt/intel/compilers_and_libraries_2020.4.304/linux/bin/intel64/ifort CPPFLAGS=-I/usr/local/ufs-develop/zlib/include LDFLAGS=-L/usr/local/ufs-develop/zlib/lib ./configure --prefix=/usr/local/ufs-develop/hdf5 --with-zlib=/usr/local/ufs-develop/zlib --with-szlib=/usr/local/ufs-develop/szip --enable-hl --enable-fortran --enable-cxx
However, when I installed WRF or RTTOV application, there is an error, i.e.,
cd …/…/tmp-ifort/test && ifort -o …/…/.//bin/example_aer_file_fwd.exe …/…/.//obj/example_aer_file_fwd.o -L…/…/.//lib -lrttov12_test -lrttov12_other -lrttov12_brdf_atlas -lrttov12_emis_atlas -lrttov12_mw_scatt -lrttov12_coef_io -lrttov12_hdf -lrttov12_parallel -lrttov12_main -L/usr/local/ufs-develop/netcdf/lib -lnetcdff -L/usr/local/ufs-develop/hdf5/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz
ld: cannot find -lz
In the ZLIB install path, libz.a, libz.so, libz.so.1 and libz.so.1.2.11 have been successfully installed. I am confused that why the zlib library is not be found, and how can I fix it? (System: Ubuntu 20.04.1)
PS: I have successfully installed WRF and RTTOV applications on Ubuntu 18.04. But fails on Ubuntu 20.04.1.
Thanks.
Jepaung