hello, I unsuccessfully tried to link the statically compiled OpenMPI library. I used for compilation:
./configure --enable-static -disable-shared make -j 4 make install When I try to link the library to my executable, I get the following error: gcc mm.c --static -I/usr/local/include/openmpi mm.c -o mm.out -L/usr/local/lib -L/usr/local/lib/openmpi -lmpi -lopen-rte -lopen-pal -Wl,--whole-archive -libverbs -Wl,--no-whole-archive -lrt -Wl,--export-dynamic -Wl,-Bdynamic -ldl -lc -lnsl -lutil -lm -ldl -fPIE -pie /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginT.o: relocation R_X86_64_32 against `__TMC_END__' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginT.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status I use openmpi-1.10.2 and Ubuntu 14.04. What am I doing wrog ? Evelina