My colleague and I are trying to install HDF5 as part of a larger WRF (Weather Research and Forecasting) model install, and running into a problem at the configure step that’s defied our debugging efforts. Unfortunately since this is a new account, I can’t upload the relevant logs and script code, but people that want to look at them can pm me, and we can work it out. I’ll at least paste what seems to us to be the key log file and script code:
configure.log:
checking for dummy main to link with Fortran libraries… unknown
configure: error: in ‘/home/work/WRF-HYDRO_Intel/Downloads/hdf5-hdf5-1_13_2’:
configure: error: linking to Fortran libraries from C fails
See `config.log’ for more details
config.log:
“/usr/bin/ld” -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /lib/x86_64-linux-gnu/crt1.o /lib/x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbegin.o -L/opt/intel/oneapi/mpi/2021.7.1/lib/release -L/opt/intel/oneapi/mpi/2021.7.1/lib -L/opt/intel/oneapi/compiler/2022.2.1/linux/bin-llvm/…/compiler/lib/intel64_lin -L/opt/intel/oneapi/compiler/2022.2.1/linux/bin-llvm/…/lib -L/opt/intel/oneapi/compiler/2022.2.1/linux/bin-llvm/…/compiler/lib/intel64_lin -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/lib64 -L/lib/x86_64-linux-gnu -L/lib/…/lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/…/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/11/…/…/… -L/lib -L/usr/lib -L/opt/intel/oneapi/vpl/2022.2.5/lib -L/opt/intel/oneapi/tbb/2021.7.1/env/…/lib/intel64/gcc4.8 -L/opt/intel/oneapi/mpi/2021.7.1//libfabric/lib -L/opt/intel/oneapi/mpi/2021.7.1//lib/release -L/opt/intel/oneapi/mpi/2021.7.1//lib -L/opt/intel/oneapi/mkl/2022.2.1/lib/intel64 -L/opt/intel/oneapi/ipp/2021.6.2/lib/intel64 -L/opt/intel/oneapi/ippcp/2021.6.2/lib/intel64 -L/opt/intel/oneapi/ipp/2021.6.2/lib/intel64 -L/opt/intel/oneapi/dnnl/2022.2.1/cpu_dpcpp_gpu_dpcpp/lib -L/opt/intel/oneapi/dal/2021.7.1/lib/intel64 -L/opt/intel/oneapi/compiler/2022.2.1/linux/compiler/lib/intel64_lin -L/opt/intel/oneapi/compiler/2022.2.1/linux/lib -L/opt/intel/oneapi/clck/2021.7.1/lib/intel64 -L/opt/intel/oneapi/ccl/2021.7.1/lib/cpu_gpu_dpcpp --enable-new-dtags -rpath /opt/intel/oneapi/mpi/2021.7.1/lib/release -rpath /opt/intel/oneapi/mpi/2021.7.1/lib -lmpifort -lmpi -ldl -lrt -lpthread -Bstatic -lsvml -Bdynamic -Bstatic -lirng -Bdynamic -Bstatic -limf -Bdynamic -lm -lgcc --as-needed -lgcc_s --no-as-needed -Bstatic -lirc -Bdynamic -ldl -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed -Bstatic -lirc_s -Bdynamic /usr/lib/gcc/x86_64-linux-gnu/11/crtend.o /lib/x86_64-linux-gnu/crtn.o
… rest of stderr output deleted …
configure:4855: $? = 1
configure:4844: mpiicc -cc=icx -V >&5
Intel® oneAPI DPC++/C++ Compiler for applications running on Intel® 64, Version 2022.2.1 Build 20221020
Copyright © 1985-2022 Intel Corporation. All rights reserved.
/usr/bin/ld: /lib/x86_64-linux-gnu/crt1.o: in function ‘_start’:
(.text+0x1b): undefined reference to `main’
icx: error: linker command failed with exit code 1 (use -v to see invocation)
configure:4855: $? = 1
We’ve double-checked the existence of the libraries in the source and build directories, so it should be finding them (and therefore the dummy main) but it’s still not for some reason.
our bash script:
…
export MPIFC=‘mpiifort -fc=ifx’
export MPIF77=‘mpiifort -fc=ifx’
export MPIF90=‘mpiifort -fc=ifx’
export MPICC=‘mpiicc -cc=icx’
export MPICXX=‘mpiicpc -cxx=icpx’
…
export HOME=cd;pwd
export WRF_FOLDER=$HOME/WRF-HYDRO_Intel
export DIR=$WRF_FOLDER/Libs
…
CC=$MPICC FC=$MPIFC CXX=$MPICXX F90=$MPIF90 F77=$MPIF77 CFLAGS="-fPIC -fPIE -diag-disable=10441" ./configure --prefix=$DIR/grib2 --with-zlib=$DIR/grib2 --enable-hl --enable-fortran --enable-parallel |& tee configure.log
…
(Ellipses indicate snipped code)
Please note that we previously had the entire script running perfectly when using the gcc/gfortran compilers, and this current problem comes as we’re testing the install process using the new Intel compilers (icx, icpx, and ifx), so bugs or other errors are expected.
If someone here can give us some insight into what’s going wrong here, that’d help us get to the root of the issue.
Thanks for your time!