[Trilinos-Users] can't build Trilinos 10.2.0 with shared libraries on 10.6.3 Mac OS X

Jonathan Guyer guyer at nist.gov
Wed Apr 28 10:35:56 MDT 2010


I am attempting to build Trilinos 10.2.0 with PyTrilinos support on a
MacBook running Snow Leopard 10.6.3 and with MPI built agaist Apple's build
of gcc 4.2.1. I've also taken MPI out of the mix and it doesn't change
anything.

I'm running cmake with:

    cmake \
      -D CMAKE_INSTALL_PREFIX=$VIRTUAL_ENV \
      -D CMAKE_OSX_ARCHITECTURES=x86_64 \
      -D CMAKE_OSX_DEPLOYMENT_TARGET=10.6 \
      -D Trilinos_INSTALL_INCLUDE_DIR:PATH=${VIRTUAL_ENV}/include \
      -D Trilinos_INSTALL_LIB_DIR:PATH=${VIRTUAL_ENV}/lib \
      -D Trilinos_INSTALL_RUNTIME_DIR:PATH=${VIRTUAL_ENV}/bin \
      -D CMAKE_BUILD_TYPE:STRING=DEBUG \
      -D MPI_BASE_DIR:PATH=${VIRTUAL_ENV} \
      -D TPL_ENABLE_MPI:BOOL=ON \
      -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=ON \
      -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON \
      -D BUILD_SHARED_LIBS:BOOL=ON \
      -D Trilinos_ENABLE_PyTrilinos:BOOL=ON \
      -D PyTrilinos_INSTALL_PREFIX:PATH=${VIRTUAL_ENV} \
      -D SWIG_EXECUTABLE:FILEPATH=${VIRTUAL_ENV}/bin/swig \
      -D Trilinos_ENABLE_TESTS:BOOL=ON \
      -D DART_TESTING_TIMEOUT:STRING=600 \
      -D Trilinos_ENABLE_Fortran:BOOL=OFF \
      ../

but make fails with:


    Linking CXX shared library libtpetratestlib.dylib
    Undefined symbols:
      "Teuchos::ActiveRCPNodesSetup::ActiveRCPNodesSetup()", referenced from:
          __static_initialization_and_destruction_0(int, int)in UnitTestMissingExplicitInstantiations.cpp.o
      "Teuchos::ActiveRCPNodesSetup::~ActiveRCPNodesSetup()", referenced from:
          ___tcf_2 in UnitTestMissingExplicitInstantiations.cpp.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make[2]: *** [packages/tpetra/test/libtpetratestlib.dylib] Error 1
    make[1]: *** [packages/tpetra/test/CMakeFiles/tpetratestlib.dir/all] Error 2
    make: *** [all] Error 2

If I re-run cmake without '-D Trilinos_ENABLE_TESTS:BOOL=ON', then make fails with

    Linking CXX shared library libfei_trilinos.dylib
    Undefined symbols:
      "fei::Vector_core::assembleFieldData(int, int, int, int const*, double const*, bool, int)", referenced from:
          fei::Vector_Impl<Epetra_MultiVector>::copyInFieldData(int, int, int, int const*, double const*, int)in fei_Factory_Trilinos.cpp.o
          fei::Vector_Impl<Epetra_MultiVector>::sumInFieldData(int, int, int, int const*, double const*, int)in fei_Factory_Trilinos.cpp.o
          fei::Vector_Impl<fei::LinearProblemManager>::copyInFieldData(int, int, int, int const*, double const*, int)in fei_Factory_Trilinos.cpp.o
          fei::Vector_Impl<fei::LinearProblemManager>::sumInFieldData(int, int, int, int const*, double const*, int)in fei_Factory_Trilinos.cpp.o

      blah blah blah

    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make[2]: *** [packages/fei/support-Trilinos/libfei_trilinos.dylib] Error 1
    make[1]: *** [packages/fei/support-Trilinos/CMakeFiles/fei_trilinos.dir/all] Error 2
    make: *** [all] Error 2

(complete list of missing symbols available if you want them).



I see similar issues reported last October "Compiling Trilinos 10.0.1 on
Mac." and in December "Compiling Trilinos 10", but my undefined symbols are
happening in tpetratestlib and fei_trilinos, rather than in thyra or
stratimikos. I don't have access to either the mail archives or to bug 
4570 to know if this has been reported and/or fixed before.

I haven't the foggiest idea what to attempt to patch the CMakeLists.txt 
files with, if that's still the solution.






More information about the Trilinos-Users mailing list