Trilinos OSX Installation Problem

Asked by L Nagy

Hello,

I'm currently attempting to build FEniCS using the dorsal script which I've obtained using bazaar. Unfortunately the build fails when attempting to build trilinos. I'm using OSX Lion version 10.7.5, with XCode 4.5.2 and macports 2.1.2. I've installed the packages suggested by the dorsal script prior to installation and I've also made the necessary changes to the python interpreter and CC/CXX environment variables. When building I get the following error message (which I've truncated to where the error occurs):

Scanning dependencies of target thyraepetra
[ 55%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/KLU/Source/amesos_klu_factor.c.o
[ 55%] Building CXX object packages/thyra/adapters/epetra/src/CMakeFiles/thyraepetra.dir/Thyra_DiagonalEpetraLinearOpWithSolveFactory.cpp.o
[ 55%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/KLU/Source/amesos_klu_free_numeric.c.o
[ 55%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/KLU/Source/amesos_klu_free_symbolic.c.o
[ 55%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/KLU/Source/amesos_klu_kernel.c.o
[ 56%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/KLU/Source/amesos_klu_memory.c.o
[ 56%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/KLU/Source/amesos_klu_refactor.c.o
[ 56%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/KLU/Source/amesos_klu_scale.c.o
[ 56%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/KLU/Source/amesos_klu_solve.c.o
[ 56%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/KLU/Source/amesos_klu_sort.c.o
[ 56%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/KLU/Source/amesos_klu_tsolve.c.o
[ 56%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/BTF/Source/amesos_btf_order.c.o
[ 56%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/BTF/Source/amesos_btf_maxtrans.c.o
[ 56%] Building C object packages/amesos/src/CMakeFiles/amesos.dir/SuiteSparse/BTF/Source/amesos_btf_strongcomp.c.o
[ 56%] Building CXX object packages/amesos/src/CMakeFiles/amesos.dir/Amesos.cpp.o
[ 56%] Building CXX object packages/thyra/adapters/epetra/src/CMakeFiles/thyraepetra.dir/Thyra_EpetraLinearOp.cpp.o
[ 56%] Building CXX object packages/amesos/src/CMakeFiles/amesos.dir/CrsMatrixTranspose.cpp.o
[ 57%] Building CXX object packages/amesos/src/CMakeFiles/amesos.dir/Amesos_Lapack.cpp.o
[ 57%] Building CXX object packages/thyra/adapters/epetra/src/CMakeFiles/thyraepetra.dir/Thyra_EpetraOperatorViewExtractorStd.cpp.o
[ 57%] Building CXX object packages/thyra/adapters/epetra/src/CMakeFiles/thyraepetra.dir/Thyra_EpetraOperatorWrapper.cpp.o
Linking CXX shared library libamesos.dylib
Undefined symbols for architecture x86_64:
  "_SuiteSparse_time", referenced from:
      _umfpack_tic in libumfpack.a(umfpack_gn_tictoc.o)
      _umfpack_toc in libumfpack.a(umfpack_gn_tictoc.o)
  "_cholmod_analyze", referenced from:
      _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o)
  "_cholmod_finish", referenced from:
      _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o)
     (maybe you meant: _amesos_cholmod_finish)
  "_cholmod_free_factor", referenced from:
      _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o)
  "_cholmod_free_sparse", referenced from:
      _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o)
     (maybe you meant: _amesos_cholmod_free_sparse)
  "_cholmod_print_common", referenced from:
      _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o)
  "_cholmod_start", referenced from:
      _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o)
     (maybe you meant: _amesos_cholmod_start)
  "_cholmod_transpose", referenced from:
      _umf_i_cholmod in libumfpack.a(umf_i_cholmod.o)
     (maybe you meant: _amesos_cholmod_transpose_sym, _amesos_cholmod_transpose_unsym , _amesos_cholmod_transpose )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [packages/amesos/src/libamesos.dylib] Error 1
make[1]: *** [packages/amesos/src/CMakeFiles/amesos.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 57%] Building CXX object packages/thyra/adapters/epetra/src/CMakeFiles/thyraepetra.dir/Thyra_EpetraThyraWrappers.cpp.o
[ 57%] Building CXX object packages/thyra/adapters/epetra/src/CMakeFiles/thyraepetra.dir/Thyra_get_Epetra_Operator.cpp.o
Linking CXX shared library libthyraepetra.dylib
[ 57%] Built target thyraepetra
make: *** [all] Error 2
Failure with exit status: 2
Exit message: There was a problem building trilinos-11.0.3-Source.

Any assistance you could give me would be greatly appreciated.

Kindest regards
Les

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
L Nagy
Solved:
Last query:
Last reply:
Revision history for this message
Jack Hale (jack-hale) said :
#1

I'm having exactly the same problem trying to compile on Mountain Lion. I also have the latest version of XCode. Despite the fact that I set the environment variables CXX and CC cmake always seems to pickup my compilers as being clang. Is this a problem? Presumably we want dolfin and all of it's dependencies working with clang as many non-linux unix-like systems are moving across to it.

I've found a similar report here:

https://trac.macports.org/ticket/35176

which seems to suggest a fix. I've tried it and it appears to work, but obviously it would be good to get something pushed into dorsal.

Revision history for this message
Jack Hale (jack-hale) said :
#2

OK, now I have a linking problem with PyTrilinos and Python. Quite tricky getting this all running on OS X.

I suspect this is because cmake isn't picking up my CC and CXX variables correctly. Any suggestions? This is a brand new and clean machine, only the commands suggested in dorsal run in the macports install.

Revision history for this message
Jack Hale (jack-hale) said :
#3

OK, now I have a linking problem with PyTrilinos and Python. Quite tricky getting this all running on OS X.

I suspect this is because cmake isn't picking up my CC and CXX variables correctly. Any suggestions? This is a brand new and clean machine, only the commands suggested in dorsal run in the macports install.

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

I have made some fixes for Trilinos on OS X now. Please pull in the latest changes from the development version of Dorsal and try again.

Revision history for this message
L Nagy (l-nagy) said :
#5

Thanks for the comments/suggestions Jack and Johannes.

I checked out the latest dorsal version and attempted to build it using dorsal and recieved an error similar to the one reported here: https://answers.launchpad.net/dorsal/+question/213121. However, setting the STABLE_BUILD flag to false in dorsal.cfg resulted in a successful build.

I also had to manually add a DYLD_LIBRARY_PATH variable to the fenics.conf file which is generated by the build since I was unable to run my c++ binaries with just LD_LIBRARY_PATH on OSX.

Kind regards
Les