Open MPI uses GNU Libtool to build itself. I suspect that perhaps
Libtool doesn't know the Right Mojo to understand the Lahey compilers,
and that's why you're seeing this issue. As such, it might well be
that your workaround is the best one.
Ralf -- we build the OMPI 1.2 series with that same "late beta"
Libtool (2.1a) that we have forever. Do you recall offhand if Libtool
2.x before 2.2 supported the Lahey fortran compilers?
On Aug 1, 2008, at 2:54 PM, Craig Tierney wrote:
> I am trying to build OpenMPI-1.2.6 with Lahey Fortran,
> and I am running into problems. The issue is buliding
> shared libraries with Lahey. Lahey can do it, but they
> don't use the construct -fPIC to specify it. They
> use --shared.
> If I don't include anything, then the build fails near
> the end when linking with a Fortran object with an
> error message like:
> /usr/bin/ld: testcode.o: relocation R_X86_64_32S against `a local
> symbol' can not be used when making a shared object; recompile with
> If I add --shared to FCFLAGS, the configure process will not finish
> (configure line below). It crashes because when it tries to build
> a small test program, it will seg fault.
> # ./configure FCFLAGS=--shared CC=gcc CXX=g++ F77=lf95 FC=lf95
> F90=lf95 --prefix=/opt/openmpi/1.2.6-lahey-8.00a --without-
> gridengine --enable-io-romio --with-io-romio-flags=--with-file-
> sys=nfs+ufs --with-openib=/opt/hjet/ofed/1.3.1
> Relevant config.log output:
> configure:36725: checking if Fortran compiler works
> configure:36781: lf95 -o conftest --shared conftest.f >&5
> Encountered 0 errors, 0 warnings in file conftest.f.
> configure:36784: $? = 0
> configure:36790: ./conftest
> ./configure: line 36791: 29048 Segmentation fault ./conftest
> configure:36793: $? = 139
> configure: program exited with status 139
> configure: failed program was:
> | program main
> | end
> So my hack to fix this was to add --shared to the
> FCFLAGS in ompi/mpi/f90/Makefile and build the
> What is the correct way for the configure process
> to know that if the compiler is lf95, to use
> --shared when compiling objects?
> Craig Tierney (craig.tierney_at_[hidden])
> users mailing list