Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] Help on building openmpi with "-Wl, --as-needed -Wl, --no-undefined"
From: Funda Wang (fundawang_at_[hidden])
Date: 2008-07-19 23:29:57


Hello,

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,libmpi_cxx.so.0 -o .libs/libmpi_cxx.so.0.0.0
.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'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/errhandler.h:30:
undefined reference to `ompi_mpi_errors_return'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/errhandler.h:30:
undefined reference to `ompi_mpi_errors_throw_exceptions'
.libs/mpicxx.o: In function `Datatype':
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_char'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_short'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_int'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_long'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_signed_char'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_unsigned_char'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_unsigned_short'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_unsigned'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_unsigned_long'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_float'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_double'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_long_double'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_byte'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_packed'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_wchar'
/home/fwang/rpm/BUILD/openmpi-1.2.6/ompi/mpi/cxx/../../../ompi/mpi/cxx/datatype.h:71:
undefined reference to `ompi_mpi_float_int'
<snap>

Is there anything I can do about it? Thanks.