I’m trying to build openmpi (1.2.2 or 1.2.3) with the PGI version 7.0-6 compiler and have an fpic issue.
I noticed this has been discussed in another message:
However, there appears to be no answer or further help in getting this to work.
I have configured openmpi with the following flags:
./configure CC=pgcc CXX=pgCC F77=pgf77 FC=pgf90 --prefix=/usr/local/openmpi_pgi
when I run the make command, it proceeeds through until I get the fpic error:
/usr/bin/ld: class/.libs/opal_free_list.o: relocation R_X86_64_PC32 against `__pgio_ini’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
I am unsure as how to proceed, I’ve looked at the build output and opal_free_list.o was compiled with -fpic:
/bin/sh …/libtool --tag=CC --mode=compile pgcc -DHAVE_CONFIG_H -I. -I. -I…/opal/include -I…/orte/include -I…/ompi/include -I…/ompi/include -I… -O -DNDEBUG -c -o class/opal_free_list.lo class/opal_free_list.c
libtool: compile: pgcc -DHAVE_CONFIG_H -I. -I. -I…/opal/include -I…/orte/include -I…/ompi/include -I…/ompi/include -I… -O -DNDEBUG -c class/opal_free_list.c > -fpic > -DPIC -o class/.libs/opal_free_list.o
I don’t have these problems when building openmpi with gcc 4.1.2