reassign 837062 libopenmpi-dev 2.0.1-3 retitle 837062 pkgincludedir undefined in openmpi pkgconfig files affects 837062 scalapack thanks
On Thu, 08 Sep 2016 14:12:59 +0200 Bas Couwenberg <sebas...@xs4all.nl> wrote: ... > /usr/lib/gcc/x86_64-linux-gnu/6/../../../../lib/libblacs-openmpi.so: undefined reference to `MPI_Barrier' > /usr/lib/gcc/x86_64-linux-gnu/6/../../../../lib/libblacs-openmpi.so: undefined reference to `MPI_Waitall' ... There might be a clue in your build log. It shows gcc -shared -Wl,-soname=lib$i-openmpi.so.1 -o \ lib$i-openmpi.so.1.8.0 tmp/*.o -lblas -llapack -lblacsCinit-openmpi -lblacs-openmpi -lgfortran -lm;\ ln -snf lib$i-openmpi.so.1.8.0 lib$i-openmpi.so.1 ;\ where debian/rules has gcc -shared -Wl,-soname=lib$$i-openmpi.so.$(version_major) -o \ lib$$i-openmpi.so.$(version) tmp/*.o -lblas -llapack -lblacsCinit-openmpi -lblacs-openmpi $(shell pkg-config mpi-fort --libs) -lgfortran -lm;\ ln -snf lib$$i-openmpi.so.$(version) lib$$i-openmpi.so.$(version_major) ;\ So it looks like $(shell pkg-config mpi-fort --libs) is returning nothing, which would explain the undefined references in your log. Indeed for openmpi 1.10, pkg-config mpi-fort --libs returns -lmpi and friends. For openmpi 2, it returns Variable 'pkgincludedir' not defined in '/usr/lib/pkgconfig/mpi-fort.pc' And indeed it is not defined. In openmpi 1.10, /usr/lib/pkgconfig/ompi-fort.pc contains Cflags: -I${libdir} -I${includedir} -I${includedir}/openmpi/opal/mca/event/libevent2021/libevent -I${includedir}/openmpi/opal/mca/event/libevent2021/libevent/include -pthread In openmpi 2, the line is Cflags: -I${includedir} -I${includedir}/openmpi -I/usr//include -I${pkgincludedir}/opal/mca/event/libevent2022/libevent -I${pkgincludedir}/openmpi/opal/mca/event/libevent2022/libevent/include -pthread -I{libdir} Looks like this bug should be reassigned to openmpi. The openmpi pkgconfig files need to be patched.