Spud build fails with OpenMPI compilers

Bug #1246776 reported by Tim Greaves
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Spud
New
Undecided
Unassigned

Bug Description

When built on a system running Ubuntu LTS 12.04 with system OpenMPI, the following set of commands:

bzr co lp:spud
cd spud
CC=mpicc FC=mpif90 CXX=mpicxx ./configure
make

fails with:

libtool: link: mpif90 -shared -fPIC .libs/spud.o .libs/spud_interfaces.o .libs/tinystr.o .libs/tinyxml.o .libs/tinyxmlerror.o .libs/tinyxmlparser.o .libs/fspud.o -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,-rpath -Wl,/usr/lib/openmpi/lib -lstdc++ -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -l /usr/lib/openmpi/lib/libmpi_f90.so /usr/lib/openmpi/lib/libmpi_f77.so /usr/lib/openmpi/lib/libmpi.so /usr/lib/openmpi/lib/libopen-rte.so /usr/lib/openmpi/lib/libopen-pal.so -lnsl -lutil -ldl -lgfortran -lquadmath -lm -lpthread -lc -lgcc_s -O3 -pthread -Wl,-soname -Wl,libspud.so.0 -o .libs/libspud.so.0.0.0
/usr/bin/ld: cannot find -l/usr/lib/openmpi/lib/libmpi_f90.so
collect2: ld returned 1 exit status
make: *** [libspud.la] Error 1
tmb1@rubik:/tmp/spud$

I.e. looks to be either putting an empty -l , or failing to entirely remove a -l<something>.

This is reproduceable on a redhat system and looks to be a reasonably general failure.

This appears to be linked to the use of -rpath in the Makefile.in at line 58:

./libtool --mode=link --tag=FC $(FC) $(FCFLAGS) -o $(LIB) $(OBJS) $(LIBS) -rpath @prefix@/lib

Without the -rpath specified, the build completes fine.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.