Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] Help on building openmpi with "-Wl, --as-needed -Wl, --no-undefined"
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2008-07-23 09:54:50

Brian / Ralf --

Is the attached patch what you're talking about?

If so, I'll commit to trunk, v1.2, and v1.3.

On Jul 21, 2008, at 7:08 PM, Brian W. Barrett wrote:

> On Sun, 20 Jul 2008 21:13:48 +0200, Ralf Wildenhues
> <Ralf.Wildenhues_at_[hidden]> wrote:
>> * Funda Wang wrote on Sun, Jul 20, 2008 at 05:29:57AM CEST:
>>> I'm currently building openmpi 1.2.6 under Mandriva cooker, and its
>>> default LDFLAGS is "-Wl,--as-needed -Wl,--no-undefined".
>>> But openmpi 1.2.6 builds failed with:
>>> libtool: link: g++ -shared -nostdlib
>>> /usr/lib/gcc/i586-manbo-linux-gnu/4.3.1/../../../crti.o
>>> /usr/lib/gcc/i586-manbo-linux-gnu/4.3.1/crtbeginS.o .libs/mpicxx.o
>>> .libs/intercepts.o .libs/comm.o .libs/datatype.o .libs/file.o
>>> .libs/win.o -lnsl -lutil -L/usr/lib/gcc/i586-manbo-linux-gnu/4.3.1
>>> -L/usr/lib/gcc/i586-manbo-linux-gnu/4.3.1/../../.. -lstdc++ -lm
>>> -lpthread -lc -lgcc_s
>>> /usr/lib/gcc/i586-manbo-linux-gnu/4.3.1/crtendS.o
>>> /usr/lib/gcc/i586-manbo-linux-gnu/4.3.1/../../../crtn.o -march=i586
>>> -mtune=generic -pthread -Wl,--no-undefined -pthread -Wl,-soname
>>> -Wl, -o .libs/
>>> .libs/mpicxx.o: In function `Errhandler':
> /home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/
> cxx/errhandler.h:30:
>>> undefined reference to `ompi_mpi_errors_are_fatal'
>> I suppose ompi/mpi/cxx/ is missing some
>> libmpi_cxx_la_LIBADD
>> line.
> Yeah, Ralf's correct -- Open MPI's missing the LIBADD fields to
> cause the
> C++, F77, and F90 bindings to not link against (which they
> depend
> upon).
> There's no good solution to this problem in Open MPI 1.2.6, other
> than to
> not build with -Wl,--no-undefined. The fix requires rebuilding the
> Makefile, which is a little dicy from an Open MPI release tarball.
> Hopefully, one of the current developers can patch this for upcoming
> releases. Unfortunately, most of the time, such a link isn't really
> required, so this never came up before. It does seem weird that a
> distribution would enable that option by default, since many
> projects don't
> properly handle the situation well.
> Brian
> _______________________________________________
> devel mailing list
> devel_at_[hidden]

Jeff Squyres
Cisco Systems