Open Noerr opened 1 year ago
I was able to complete the build of hdf5_iotest executable by starting from this failed spack install, chdir into the /tmp spack build staging. Rexecute the final link command using mpicc.
/home/noah/spack/opt/spack/linux-ubuntu22.04-icelake/gcc-11.3.0/openmpi-4.1.5-yofs4yotlug5xwx4lgkndha4jvwdcnsk/bin/mpicc -g -O2 -o hdf5_iotest configuration.o dataset.o hdf5_iotest.o ini.o read_test.o utils.o write_test.o -L /home/noah/spack/opt/spack/linux-ubuntu22.04-icelake/gcc-11.3.0/util-linux-uuid-2.38.1-mutzzr33dylliaew3ftjs2ksge4vtsmi/lib/ -L/home/noah/spack/opt/spack/linux-ubuntu22.04-icelake/gcc-11.3.0/hdf5-1.14.0-atpncwlkmdpd4ir53ladkxm2txpl77pr/lib/ -lhdf5 -luuid
Unlike other libraries, rpath doesn't get set so I have to set LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/noah/spack/opt/spack/linux-ubuntu22.04-icelake/gcc-11.3.0/util-linux-uuid-2.38.1-mutzzr33dylliaew3ftjs2ksge4vtsmi/lib/:/home/noah/spack/opt/spack/linux-ubuntu22.04-icelake/gcc-11.3.0/hdf5-1.14.0-atpncwlkmdpd4ir53ladkxm2txpl77pr/lib/:${LD_LIBRARY_PATH}
Following the spack install instructions, I arrive at the following error regarding undefined reference to
ompi_mpi_byte
andlibmpi.so.40: error adding symbols: DSO missing from command line
If we look at the gcc command line it seem odd that neither mpicc is used or -lmpi is explicitly linked.