I've configured and built openmpi-1.8.5 on FreeBSD-11
with

% ./configure --prefix /usr/local/openmpi-1.8.5 --disable-shared \
   --enable-static --enable-mpirun-prefix-by-default

This, of course, disables shared libraries and enables static 
libs.  Now, when I go to build my program, I see

% make -DMPI
/usr/local/openmpi-1.8.5/bin/mpif90 -O2 -pipe -static -I/home/kargl/modules  \
   -o sasmp sasmp.f90  -L/home/kargl/lib -L. -L/usr/local/lib -L. -loa -ltgt \
  -L/home/kargl/lib -L. -L/usr/local/lib -lm90 -llapack -lblas
/usr/lib/libexecinfo.a(symtab.o): In function `symtab_create':
/usr/src/lib/libexecinfo/../../contrib/libexecinfo/symtab.c:(.text+0x7f): \
   undefined reference to `elf_version'
/usr/src/lib/libexecinfo/../../contrib/libexecinfo/symtab.c:(.text+0x95): 
   undefined reference to `elf_begin'

The undefined symbols live in /usr/lib/libelf.a.  In grepping through
the Makefiles, I find

LIBS = -lexecinfo -lm -lutil
OPAL_WRAPPER_EXTRA_LIBS = -lm -L/usr/local/lib -lpciaccess -lexecinfo -lutil 
OMPI_WRAPPER_EXTRA_LIBS = -lm -L/usr/local/lib -lpciaccess -lexecinfo -lutil 
ORTE_WRAPPER_EXTRA_LIBS = -lm -L/usr/local/lib -lpciaccess -lexecinfo -lutil

Where do I modify the the configure infrastructure to add -lelf to these
variables?

-- 
Steve

Reply via email to