Parallel build on FreeBSD 11.2 fails


#1

Hello,

I’m trying to build a parallel version of hdf5 1.10.4 against OpenMPI 2.1.5 on FreeBSD 11.2. I am using the following configuration:

MAKE=gmake
LDFLAGS=-Wl,rpath=-L/usr/local/lib/gcc8
CC=/usr/local/mpi/openmpi2/bin/mpicc
CXX=/usr/local/mpi/openmpi2/bin/mpicxx
FC=/usr/local/mpi/openmpi2/bin/mpifort
…/hdf5-1.10.4/configure
–prefix=/opt/hdf5-mpi
–enable-shared
–enable-cxx
–enable-fortran
–enable-parallel
–enable-unsupported
–with-gnu-ld

The build fails like this:

libtool: compile: /usr/local/mpi/openmpi2/bin/mpifort -I. -I…/…/…/hdf5-1.10.4/fortran/src -I…/…/src -pedantic -Wall -Wextra -Wunderflow -Wimplicit-interface -Wsurprising -Wno-c-binding-type -s -O2 -I…/…/…/hdf5-1.10.4/src -I…/…/…/hdf5-1.10.4/fortran/src -c H5_gen.F90 -fPIC -o .libs/H5_gen.o

libtool: compile: /usr/local/mpi/openmpi2/bin/mpifort -I. -I…/…/…/hdf5-1.10.4/fortran/src -I…/…/src -pedantic -Wall -Wextra -Wunderflow -Wimplicit-interface -Wsurprising -Wno-c-binding-type -s -O2 -I…/…/…/hdf5-1.10.4/src -I…/…/…/hdf5-1.10.4/fortran/src -c H5_gen.F90 -o H5_gen.o >/dev/null 2>&1
CC H5f90kit.lo
CC H5_f.lo
CC H5Af.lo
CC H5Df.lo
CC H5Ef.lo
CC H5Ff.lo
CC H5Gf.lo
CC H5If.lo
CC H5Lf.lo
CC H5Of.lo
CC H5Pf.lo
CC H5Rf.lo
CC H5Sf.lo
CC H5Tf.lo
CC H5Zf.lo
PPFC HDF5.lo
libtool: compile: /usr/local/mpi/openmpi2/bin/mpifort -I. -I…/…/…/hdf5-1.10.4/fortran/src -I…/…/src -pedantic -Wall -Wextra -Wunderflow -Wimplicit-interface -Wsurprising -Wno-c-binding-type -s -O2 -I…/…/…/hdf5-1.10.4/src -I…/…/…/hdf5-1.10.4/fortran/src -c …/…/…/hdf5-1.10.4/fortran/src/HDF5.F90 -fPIC -o .libs/HDF5.o
libtool: compile: /usr/local/mpi/openmpi2/bin/mpifort -I. -I…/…/…/hdf5-1.10.4/fortran/src -I…/…/src -pedantic -Wall -Wextra -Wunderflow -Wimplicit-interface -Wsurprising -Wno-c-binding-type -s -O2 -I…/…/…/hdf5-1.10.4/src -I…/…/…/hdf5-1.10.4/fortran/src -c …/…/…/hdf5-1.10.4/fortran/src/HDF5.F90 -o HDF5.o >/dev/null 2>&1
FCLD libhdf5_fortran.la
/usr/local/bin/ld: cannot find -l-L/usr/local/lib/gcc8/gcc/i386-portbld-freebsd11.2/8.2.0

It looks as though the linker is trying to link against some library, but getting a library path instead.

I appreciate any help.

Thanks,
Roger


#2

I am just curious if OpenMPI was also build with gcc8?

May be you can drop setting LDFLAGS and --with-gnu-ld configure option and see what will happen?

Elena