Dear WRF Community,
I am writing for a problem when compiling wrf and wrfchem. When executing ./compile em_real &> compile.log, there is always errors for H5* as follows:
/usr/local/lib/netcdf/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): In function `nc4_open_file':
nc4file.c.text+0x4518): undefined reference to `H5check_version'
nc4file.c.text+0x451d): undefined reference to `H5open'
nc4file.c.text+0x4538): undefined reference to `H5check_version'
nc4file.c.text+0x453d): undefined reference to `H5open'
nc4file.c.text+0x45fc): undefined reference to `H5open'
nc4file.c.text+0x4603): undefined reference to `H5P_CLS_FILE_ACCESS_ID_g'
nc4file.c.text+0x460b): undefined reference to `H5Pcreate'
nc4file.c.text+0x4633): undefined reference to `H5Pset_fclose_degree'
nc4file.c.text+0x466e): undefined reference to `H5Pset_cache'
nc4file.c.text+0x46a3): undefined reference to `H5LTopen_file_image'
nc4file.c.text+0x46e9): undefined reference to `H5Fopen'
nc4file.c.text+0x475d): undefined reference to `H5Pclose'
nc4file.c.text+0x479c): undefined reference to `H5Pclose'
It seems something relative to Netcdf HDF5 support. Any indications? Thanks.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
P.S. I am using the following scripts for installing netcdf:
cd /home/lsl/Downloads/SOFT/INSTALL_WRF/Libraries/netcdf-4.6.1
sudo CPPFLAGS="-I/usr/local/lib/hdf5-1.10.4/include/ -I/usr/local/lib/curl-7.62.0/include/ -I/usr/local/lib/zlib-1.2.11/include" LDFLAGS="-L/usr/local/lib/hdf5-1.10.4/lib/ -lhdf5_hl -lhdf5 -L/usr/local/lib/curl-7.62.0/lib/ -L/usr/local/lib/zlib-1.2.11/lib/" ./configure --with-hdf5=/usr/local/lib/hdf5-1.10.4/ --with-zlib=/usr/local/lib/zlib-1.2.11 --prefix=/usr/local/lib/netcdf --disable-shared --disable-dap --enable-netcdf-4
sudo make install
cd ~/Downloads/WRF-INSTALL/netcdf-fortran-4.4.4
=>cd /home/lsl/Downloads/SOFT/INSTALL_WRF/Libraries/netcdf-fortran-4.4.4
sudo CPPFLAGS="-I/usr/local/lib/hdf5-1.10.4/include/ -I/usr/local/lib/netcdf/include/" LDFLAGS="-L/usr/local/lib/hdf5-1.10.4/lib/ -L/usr/local/lib/netcdf/lib/" ./configure --prefix=/usr/local/lib/netcdf --enable-fortran --enable-large-file-test
sudo make install
I am writing for a problem when compiling wrf and wrfchem. When executing ./compile em_real &> compile.log, there is always errors for H5* as follows:
/usr/local/lib/netcdf/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): In function `nc4_open_file':
nc4file.c.text+0x4518): undefined reference to `H5check_version'
nc4file.c.text+0x451d): undefined reference to `H5open'
nc4file.c.text+0x4538): undefined reference to `H5check_version'
nc4file.c.text+0x453d): undefined reference to `H5open'
nc4file.c.text+0x45fc): undefined reference to `H5open'
nc4file.c.text+0x4603): undefined reference to `H5P_CLS_FILE_ACCESS_ID_g'
nc4file.c.text+0x460b): undefined reference to `H5Pcreate'
nc4file.c.text+0x4633): undefined reference to `H5Pset_fclose_degree'
nc4file.c.text+0x466e): undefined reference to `H5Pset_cache'
nc4file.c.text+0x46a3): undefined reference to `H5LTopen_file_image'
nc4file.c.text+0x46e9): undefined reference to `H5Fopen'
nc4file.c.text+0x475d): undefined reference to `H5Pclose'
nc4file.c.text+0x479c): undefined reference to `H5Pclose'
It seems something relative to Netcdf HDF5 support. Any indications? Thanks.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
P.S. I am using the following scripts for installing netcdf:
cd /home/lsl/Downloads/SOFT/INSTALL_WRF/Libraries/netcdf-4.6.1
sudo CPPFLAGS="-I/usr/local/lib/hdf5-1.10.4/include/ -I/usr/local/lib/curl-7.62.0/include/ -I/usr/local/lib/zlib-1.2.11/include" LDFLAGS="-L/usr/local/lib/hdf5-1.10.4/lib/ -lhdf5_hl -lhdf5 -L/usr/local/lib/curl-7.62.0/lib/ -L/usr/local/lib/zlib-1.2.11/lib/" ./configure --with-hdf5=/usr/local/lib/hdf5-1.10.4/ --with-zlib=/usr/local/lib/zlib-1.2.11 --prefix=/usr/local/lib/netcdf --disable-shared --disable-dap --enable-netcdf-4
sudo make install
cd ~/Downloads/WRF-INSTALL/netcdf-fortran-4.4.4
=>cd /home/lsl/Downloads/SOFT/INSTALL_WRF/Libraries/netcdf-fortran-4.4.4
sudo CPPFLAGS="-I/usr/local/lib/hdf5-1.10.4/include/ -I/usr/local/lib/netcdf/include/" LDFLAGS="-L/usr/local/lib/hdf5-1.10.4/lib/ -L/usr/local/lib/netcdf/lib/" ./configure --prefix=/usr/local/lib/netcdf --enable-fortran --enable-large-file-test
sudo make install