libdolfin.so.1.2: undefined symbol

Asked by Troy Butler

Running on linux mint, and have tried installing from sudo apt-get fenics and also from the source files. Either way, whenever I run any demo, I get the exact same undefined symbol error. Here is one particular example:

> python demo_cahn-hilliard.py
Traceback (most recent call last):
  File "demo_cahn-hilliard.py", line 27, in <module>
    from dolfin import *
  File "/usr/local/lib/python2.7/dist-packages/dolfin/__init__.py", line 16, in <module>
    import cpp
  File "/usr/local/lib/python2.7/dist-packages/dolfin/cpp/__init__.py", line 40, in <module>
    exec("import %s" % module_name)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/dolfin/cpp/common.py", line 30, in <module>
    _common = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/dolfin/cpp/common.py", line 26, in swig_import_helper
    _mod = imp.load_module('_common', fp, pathname, description)
ImportError: /home/troy/Desktop/FEniCS_Files/dolfin-1.2.0/dolfin/libdolfin.so.1.2: undefined symbol: _ZN5boost3mpi6detail19packed_archive_recvEiiiRNS0_15packed_iarchiveER10MPI_Status

When I run:
> c++filt _ZN5boost3mpi6detail19packed_archive_recvEiiiRNS0_15packed_iarchiveER10MPI_Status

It returns:
boost::mpi::detail::packed_archive_recv(int, int, int, boost::mpi::packed_iarchive&, MPI_Status&)

My libboost_mpi files are in /usr/lib, I have included this directory as an environmental variable LD_LIBRARY_PATH and also tried including this directory simultaneously in the BOOST_DIR, BOOST_ROOT, and BOOST_LIBRARYDIR environmental variables. Nothing seems to fix this.

I have deleted the cmake cache in the dolfin-1.2.0 directory every time I redo this to no avail. Any ideas?

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Kent-Andre Mardal (kent-and) said :
#1

On Tuesday, 9 April 2013, Troy Butler wrote:

> New question #226309 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/226309
>
> Running on linux mint, and have tried installing from sudo apt-get fenics
> and also from the source files. Either way, whenever I run any demo, I get
> the exact same undefined symbol error. Here is one particular example:
>
> > python demo_cahn-hilliard.py
> Traceback (most recent call last):
> File "demo_cahn-hilliard.py", line 27, in <module>
> from dolfin import *
> File "/usr/local/lib/python2.7/dist-packages/dolfin/__init__.py", line
> 16, in <module>
> import cpp
> File "/usr/local/lib/python2.7/dist-packages/dolfin/cpp/__init__.py",
> line 40, in <module>
> exec("import %s" % module_name)
> File "<string>", line 1, in <module>
> File "/usr/local/lib/python2.7/dist-packages/dolfin/cpp/common.py", line
> 30, in <module>
> _common = swig_import_helper()
> File "/usr/local/lib/python2.7/dist-packages/dolfin/cpp/common.py", line
> 26, in swig_import_helper
> _mod = imp.load_module('_common', fp, pathname, description)
> ImportError:
> /home/troy/Desktop/FEniCS_Files/dolfin-1.2.0/dolfin/libdolfin.so.1.2:
> undefined symbol:
> _ZN5boost3mpi6detail19packed_archive_recvEiiiRNS0_15packed_iarchiveER10MPI_Status
>
> When I run:
> > c++filt
> _ZN5boost3mpi6detail19packed_archive_recvEiiiRNS0_15packed_iarchiveER10MPI_Status
>
>
Use nm to look at the symbols in the boost library, then use ldd to check
if dolfin links correctly

Kent

> It returns:
> boost::mpi::detail::packed_archive_recv(int, int, int,
> boost::mpi::packed_iarchive&, MPI_Status&)
>
> My libboost_mpi files are in /usr/lib, I have included this directory as
> an environmental variable LD_LIBRARY_PATH and also tried including this
> directory simultaneously in the BOOST_DIR, BOOST_ROOT, and BOOST_LIBRARYDIR
> environmental variables. Nothing seems to fix this.
>
> I have deleted the cmake cache in the dolfin-1.2.0 directory every time I
> redo this to no avail. Any ideas?
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>

Revision history for this message
Troy Butler (butler-troy-d) said :
#2

 > nm libboost_mpi.so
nm: libboost_mpi.so: no symbols

But,
> nm libboost_mpi.a

has LOTS of symbols, but not the exact one from my post. I have boost 1.49.0, should I install a different version?

Revision history for this message
Troy Butler (butler-troy-d) said :
#3

Just to see what would happen, I edited the CMakeCache.txt for all boost libraries with actual symbols (all the ones it listed have no symbols). I changed it to:

//Build DOLFIN with shared libraries.
BUILD_SHARED_LIBS:BOOL=ON

//The Boost CHRONO library
Boost_CHRONO_LIBRARY:FILEPATH=/usr/lib/libboost_chrono-mt.a

//Boost chrono library (debug)
Boost_CHRONO_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_chrono-mt.so

//Boost chrono library (release)
Boost_CHRONO_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_chrono-mt.so

//The Boost FILESYSTEM library
Boost_FILESYSTEM_LIBRARY:FILEPATH=/usr/lib/libboost_filesystem-mt.a

//Boost filesystem library (debug)
Boost_FILESYSTEM_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_filesystem-mt.so

//Boost filesystem library (release)
Boost_FILESYSTEM_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_filesystem-mt.so

//Path to a file.
Boost_INCLUDE_DIR:PATH=/usr/lib/boost_1_49_0

//The Boost IOSTREAMS library
Boost_IOSTREAMS_LIBRARY:FILEPATH=/usr/lib/libboost_iostreams-mt.a

//Boost iostreams library (debug)
Boost_IOSTREAMS_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_iostreams-mt.so

//Boost iostreams library (release)
Boost_IOSTREAMS_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_iostreams-mt.so

//Boost library directory
Boost_LIBRARY_DIRS:FILEPATH=/usr/lib/boost_1_49_0/stage/lib

//The Boost MPI library
Boost_MPI_LIBRARY:FILEPATH=/usr/lib/libboost_mpi-mt.a

//Boost mpi library (debug)
Boost_MPI_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_mpi-mt.so

//Boost mpi library (release)
Boost_MPI_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_mpi-mt.so

//The Boost PROGRAM_OPTIONS library
Boost_PROGRAM_OPTIONS_LIBRARY:FILEPATH=/usr/lib/libboost_program_options-mt.a

//Boost program_options library (debug)
Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_program_options-mt.so

//Boost program_options library (release)
Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_program_options-mt.so

//The Boost SERIALIZATION library
Boost_SERIALIZATION_LIBRARY:FILEPATH=/usr/lib/libboost_serialization-mt.a

//Boost serialization library (debug)
Boost_SERIALIZATION_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_serialization-mt.so

//Boost serialization library (release)
Boost_SERIALIZATION_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_serialization-mt.so

//The Boost SYSTEM library
Boost_SYSTEM_LIBRARY:FILEPATH=/usr/lib/libboost_system-mt.a

//Boost system library (debug)
Boost_SYSTEM_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_system-mt.so

//Boost system library (release)
Boost_SYSTEM_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_system-mt.so

//The Boost THREAD library
Boost_THREAD_LIBRARY:FILEPATH=/usr/lib/libboost_thread-mt.a

//Boost thread library (debug)
Boost_THREAD_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_thread-mt.so

//Boost thread library (release)
Boost_THREAD_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_thread-mt.so

//The Boost TIMER library
Boost_TIMER_LIBRARY:FILEPATH=/usr/lib/libboost_timer-mt.a

//Boost timer library (debug)
Boost_TIMER_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_timer-mt.so

//Boost timer library (release)
Boost_TIMER_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_timer-mt.so

But this fails to resolve the problem as well.

Revision history for this message
Kent-Andre Mardal (kent-and) said :
#4

On 10 April 2013 00:21, Troy Butler <email address hidden>wrote:

> Question #226309 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/226309
>
> Status: Answered => Open
>
> Troy Butler is still having a problem:
> > nm libboost_mpi.so
> nm: libboost_mpi.so: no symbols
>
> But,
> > nm libboost_mpi.a
>
> has LOTS of symbols, but not the exact one from my post. I have boost
> 1.49.0, should I install a different version?
>
>
Yes, the linker is looking for this symbol during import.

Kent

> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>

Revision history for this message
Anders Logg (logg) said :
#5

FEniCS no longer uses Launchapd for Questions & Answers. Please
consult the documentation on the FEniCS web page for where and
how to (re)post your question: http://fenicsproject.org/support/

Revision history for this message
Anders Logg (logg) said :
#6

FEniCS no longer uses Launchapd for Questions & Answers. Please
consult the documentation on the FEniCS web page for where and
how to (re)post your question: http://fenicsproject.org/support/

Can you help with this problem?

Provide an answer of your own, or ask Troy Butler for more information if necessary.

To post a message you must log in.