Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] RFC: Add SunStudio/Libtool helper script for post-configure
From: Ethan Mallove (ethan.mallove_at_[hidden])
Date: 2008-11-20 12:52:09


On Wed, Nov/19/2008 03:24:16PM, Ethan Mallove wrote:
> On Wed, Nov/19/2008 01:42:55PM, Ethan Mallove wrote:
> > On Wed, Nov/19/2008 05:12:03PM, Ralf Wildenhues wrote:
> > > Hello Ethan,
> > >
> > > * Ethan Mallove wrote on Wed, Nov 19, 2008 at 04:11:23PM CET:
> > > > There are a couple issues with SunStudio and Libtool:
> > >
> > > Which Libtool version are you using? If not 2.2.2 or newer, then please
> > > retry with 2.2.6. If the problem persists, then we should fix Libtool
> > > rather than patching OpenMPI. That way, other packages benefit from the
> > > fix as well.
> > >
> >
> > I'm using 2.2 (for Solaris) and 2.1b (for Linux). I'll try
> > 2.2.6.
> >
>
> I'm seeing the same issue with the faulty "wl" Libtool
> variable in 2.2.6 with Linux SunStudio:
>
> ...
> make[5]: Entering directory `ompi/mpi/f90'
> /bin/sh ../../../libtool --mode=link f90 -I../../../ompi/include -I../../../ompi/include -M. -I. -I../../../ompi/mpi/f90 -m32 -xO5 -export-dynamic -o libmpi_f90.la -rpath /opt/SUNWhpc/HPC8.1/sun/lib mpi.lo mpi_sizeof.lo mpi_comm_spawn_multiple_f90.lo mpi_testall_f90.lo mpi_testsome_f90.lo mpi_waitall_f90.lo mpi_waitsome_f90.lo mpi_wtick_f90.lo mpi_wtime_f90.lo ../../../ompi/libmpi.la -lnsl -lutil -lm
> libtool: link: f90 -G .libs/mpi.o .libs/mpi_sizeof.o .libs/mpi_comm_spawn_multiple_f90.o .libs/mpi_testall_f90.o .libs/mpi_testsome_f90.o .libs/mpi_waitall_f90.o .libs/mpi_waitsome_f90.o .libs/mpi_wtick_f90.o .libs/mpi_wtime_f90.o -Wl,-rpath -Wl,ompi/.libs -Wl,-rpath -Wl,/tmp/mtt-scratch-patch-libtool-for-sun-studio/mpi-install/HFfN/src/ompi-ct8.1-v1.3-sandbox/orte/.libs -Wl,-rpath -Wl,/tmp/mtt-scratch-patch-libtool-for-sun-studio/mpi-install/HFfN/src/ompi-ct8.1-v1.3-sandbox/opal/.libs -Wl,-rpath -Wl,/opt/SUNWhpc/HPC8.1/sun/lib -L/tmp/mtt-scratch-patch-libtool-for-sun-studio/mpi-install/HFfN/src/ompi-ct8.1-v1.3-sandbox/orte/.libs -L/tmp/mtt-scratch-patch-libtool-for-sun-studio/mpi-install/HFfN/src/ompi-ct8.1-v1.3-sandbox/opal/.libs ../../../ompi/.libs/libmpi.so /tmp/mtt-scratch-patch-libtool-for-sun-studio/mpi-install/HFfN/src/ompi-ct8.1-v1.3-sandbox/orte/.libs/libopen-rte.so
> opal/.libs/libopen-pal.so -ldl -lnsl -lutil -lm -m32 -mt -Wl,-soname -Wl,libmpi_f90.so.0 -o .libs/libmpi_f90.so.0.0.0
> f90: Warning: Option -Wl,-rpath passed to ld, if ld is invoked, ignored otherwise
> f90: Warning: Option -Wl,ompi/.libs passed to ld, if ld is invoked, ignored otherwise
> f90: Warning: Option -Wl,-rpath passed to ld, if ld is invoked, ignored otherwise
> f90: Warning: Option -Wl,orte/.libs passed to ld, if ld is invoked, ignored otherwise
> f90: Warning: Option -Wl,-rpath passed to ld, if ld is invoked, ignored otherwise
> f90: Warning: Option -Wl,opal/.libs passed to ld, if ld is invoked, ignored otherwise
> f90: Warning: Option -Wl,-rpath passed to ld, if ld is invoked, ignored otherwise
> f90: Warning: Option -Wl,/opt/SUNWhpc/HPC8.1/sun/lib passed to ld, if ld is invoked, ignored otherwise
> f90: Warning: Option -Wl,-soname passed to ld, if ld is invoked, ignored otherwise
> f90: Warning: Option -Wl,libmpi_f90.so.0 passed to ld, if ld is invoked, ignored otherwise
> /usr/bin/ld: unrecognized option '-Wl,-rpath'
> /usr/bin/ld: use the --help option for usage information
> make[5]: *** [libmpi_f90.la] Error 1
> make[5]: Leaving directory `ompi/mpi/f90'
> make[4]: *** [install-recursive] Error 1
> make[4]: Leaving directory `ompi/mpi/f90'
> make[3]: *** [install] Error 2
> make[3]: Leaving directory `ompi/mpi/f90'
> make[2]: *** [install-recursive] Error 1
> make[2]: Leaving directory `ompi'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `ompi'
> make: *** [install-recursive] Error 1
>
> The wl var in auto-generated libtool script should be set to
> "".

I think I found a potential problem. I see this in configure:

    case `$CC -V 2>&1 | sed 5q` in
    *Sun\ C*)
      # Sun C 5.9
      lt_prog_compiler_pic='-KPIC'
      lt_prog_compiler_static='-Bstatic'
      lt_prog_compiler_wl='-Wl,'
      ;;
    *Sun\ F*)
      # Sun Fortran 8.3 passes all unrecognized flags to the linker
      lt_prog_compiler_pic='-KPIC'
      lt_prog_compiler_static='-Bstatic'
      lt_prog_compiler_wl=''
      ;;
    esac
    ;;

The above appears to be looking for a Fortran version string from the
C compiler, but it wouldn't match our version string anyway:

  $ f90 -V
  f90: Sun Ceres Fortran 95 8.3 SunOS_sparc 2008/01/28

The result is that lt_prog_compiler_wl never gets set to '', and it
should. See attached (untested) patch.

>
> Less sure about the Cstd/stlport4 issue, though it does
> appear from the below thread that the issue was already
> tackled at some point:
>
> http://lists.gnu.org/archive/html/libtool/2008-02/msg00024.html
>
> The thread says the Cstd/stlport4 issue was fixed in 2006.

I'm still running into the Cstd/stlport4 issue with 2.2.6. That is,
this line appears in the libtool script:

  postdeps="-library=Cstd -library=Crun"

I thought maybe adding this before the Libtool section in configure.ac
would solve the problem, but it does not:

  if test "x$ompi_cv_c_compiler_vendor" = "xsun"; then

      # Do not link with "-library=Crun -library=Cstd" for libmpi_cxx because
      # this can lead to Cstd/stlport4 incompatiblities
      lt_postdeps_CXX=''

      # Sun Studio f90 (for Linux) does not pass -Wl values to the GNU linker
      if test -n "`echo $host | $GREP linux`"; then
          lt_prog_compiler_wl_FC=''
      fi
  fi

Is there a way to set some lt_ variables in configure.ac so that we
get a functional libtool script?

-Ethan

>
> -Ethan
>
>
> > Thanks,
> > Ethan
> >
> >
> > > Thanks,
> > > Ralf
> > > _______________________________________________
> > > devel mailing list
> > > devel_at_[hidden]
> > > http://www.open-mpi.org/mailman/listinfo.cgi/devel
> > _______________________________________________
> > devel mailing list
> > devel_at_[hidden]
> > http://www.open-mpi.org/mailman/listinfo.cgi/devel
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel