building error on ubuntu 12.04 precise pangolin

Asked by Chaffra Affouda

After upgrading to precise pangolin dolfin compiles but make test gives me the error below. Something to do with boostmpi. Am I missing something?

Linking CXX executable test_Mesh
/usr/local/lib/libdolfin.so: undefined reference to `boost::mpi::detail::packed_archive_recv(int, int, int, boost::mpi::packed_iarchive&, MPI_Status&)'
/usr/local/lib/libdolfin.so: undefined reference to `boost::mpi::communicator::operator int() const'
/usr/local/lib/libdolfin.so: undefined reference to `boost::mpi::detail::mpi_datatype_map::set(std::type_info const*, int)'
/usr/local/lib/libdolfin.so: undefined reference to `boost::mpi::communicator::communicator(int const&, boost::mpi::comm_create_kind)'
/usr/local/lib/libdolfin.so: undefined reference to `boost::mpi::detail::packed_archive_send(int, int, int, boost::mpi::packed_oarchive const&)'
/usr/local/lib/libdolfin.so: undefined reference to `Epetra_MpiComm::Epetra_MpiComm(int)'
collect2: ld returned 1 exit status
make[6]: *** [test/unit/mesh/cpp/test_Mesh] Error 1
make[5]: *** [test/unit/mesh/cpp/CMakeFiles/test_Mesh.dir/all] Error 2
make[4]: *** [all] Error 2
make[3]: *** [CMakeFiles/test] Error 2
make[2]: *** [CMakeFiles/test.dir/all] Error 2
make[1]: *** [CMakeFiles/test.dir/rule] Error 2
make: *** [test] Error 2

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Johannes Ring
Solved:
Last query:
Last reply:
Revision history for this message
Chaffra Affouda (chaffra) said :
#1

I think it's using boost 1.46

Revision history for this message
Johannes Ring (johannr) said :
#2

Did you make sure to remove old build cache and rebuild everything after upgrading to Precise? Not only DOLFIN, but also any dependencies you have in /usr/local.

Revision history for this message
Chaffra Affouda (chaffra) said :
#3

Johannes, I tried your suggestion but I does not work. I removed /usr/local/lib/python2.7/dolfin* /usr/local/include/dolfin*

I am still getting the error below and I cannot import dolfin. Any ideas? Am I missing at boost or mpi library?

Linking CXX executable test_Mesh
/usr/local/lib/libdolfin.so: undefined reference to `boost::mpi::detail::packed_archive_recv(int, int, int, boost::mpi::packed_iarchive&, MPI_Status&)'
/usr/local/lib/libdolfin.so: undefined reference to `boost::mpi::communicator::operator int() const'
/usr/local/lib/libdolfin.so: undefined reference to `boost::mpi::detail::mpi_datatype_map::set(std::type_info const*, int)'
/usr/local/lib/libdolfin.so: undefined reference to `boost::mpi::communicator::communicator(int const&, boost::mpi::comm_create_kind)'
/usr/local/lib/libdolfin.so: undefined reference to `boost::mpi::detail::packed_archive_send(int, int, int, boost::mpi::packed_oarchive const&)'
/usr/local/lib/libdolfin.so: undefined reference to `Epetra_MpiComm::Epetra_MpiComm(int)'
collect2: ld returned 1 exit status
make[6]: *** [test/unit/mesh/cpp/test_Mesh] Error 1
make[5]: *** [test/unit/mesh/cpp/CMakeFiles/test_Mesh.dir/all] Error 2
make[4]: *** [all] Error 2
make[3]: *** [CMakeFiles/test] Error 2
make[2]: *** [CMakeFiles/test.dir/all] Error 2
make[1]: *** [CMakeFiles/test.dir/rule] Error 2
make: *** [test] Error 2

Revision history for this message
Chaffra Affouda (chaffra) said :
#4

I also remove /usr/local/lib/libdolfin.so be reinstalling.

import dolfin gives me

ImportError: /usr/local/lib/libdolfin.so.1.0: undefined symbol: _ZN5boost3mpi6detail19packed_archive_recvEiiiRNS0_15packed_iarchiveER10MPI_Status

which is boost::mpi::detail::packed_archive_recv(int, int, int, boost::mpi::packed_iarchive&, MPI_Status&)

Revision history for this message
Best Johannes Ring (johannr) said :
#5

I didn't say you should remove the installed files in /usr/local/lib and in /usr/local/include, although that shouldn't harm. What I meant was that you should remove the build files, like the CMake cache files for DOLFIN. But not only for DOLFIN. You should do a clean build of everything you had manually built before upgrading to Precise.

Revision history for this message
Chaffra Affouda (chaffra) said :
#6

I build from a build directory so I did remove every I build before rebuilding. All my dependencies are from the precise repository. This is strange.

Revision history for this message
Chaffra Affouda (chaffra) said :
#7

Thanks Johannes Ring, that solved my question.