[Trilinos-Users] cmake and linking to .so

Jason Slemons slemons at cray.com
Wed Jul 29 16:32:36 MDT 2009


I have got a configure script that seems to be working, but a problem has come up now with my make process.
Now 'make' stops at errors about not being able to find "liblibsci.a" when I had specified the libsci.a was the library. So I changed the name of the library to sci, and now I get a different error:

/opt/cray/xt-asyncpe/3.2.9/bin/CC     -g -O0  -fPIC CMakeFiles/Epetra_my_example.dir/cxx_main.cpp.o  -o Epetra_my_example.exe -rdyn\
amic -L/home/users/slemons/trilinos-090603a-Source/2.BUILD/packages/epetra/src ../../src/libepetra.a /opt/xt-libsci/default/gnu/lib\
/libsci_quadcore.a /opt/xt-libsci/default/gnu/lib/libsci.so /opt/xt-libsci/default/gnu/lib/libsci_quadcore.a /opt/xt-libsci/default\
/gnu/lib/libsci.so -Wl,-rpath,/home/users/slemons/trilinos-090603a-Source/2.BUILD/packages/epetra/src:/opt/xt-libsci/default/gnu/li\
b
/opt/cray/xt-asyncpe/3.2.9/bin/CC: INFO: linux target is being used
/opt/amd/binutils-070220-amd-sles9/bin/ld: attempted static link of dynamic object `/opt/xt-libsci/default/gnu/lib/libsci.so'
collect2: ld returned 1 exit status

Actually I see this error 3 times in CMakeFiles/CMakeError.log. I'm not sure how to get it to look for just libsci.a and not try the libsci.so. my configure script is below: 

#!/bin/bash
cmake\
 -D BLAS_LIBRARY_NAMES:STRING="sci_quadcore;sci" \
 -D BLAS_LIBRARY_DIRS:PATH=/opt/xt-libsci/default/gnu/lib\
 -D LAPACK_LIBRARY_NAMES:STRING="sci_quadcore;sci" \
 -D LAPACK_LIBRARY_DIRS:PATH=/opt/xt-libsci/default/gnu/lib\
 -D Trilinos_ENABLE_AMESOS:BOOL=ON\
 -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON\
 -D Trilinos_ENABLE_TESTS:BOOL=ON\
 -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=ON\
 -D Trilinos_VERBOSE_CONFIGURE:BOOL=ON --debug-output --trace\
 -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE\
 -D BUILD_SHARED_LIBS:BOOL=OFF\
 -D MPI_BASE_DIR:PATH="/opt/mpt/3.4.0/xt/mpich2-gnu/"\
 -D CMAKE_CXX_COMPILER:STRING="/opt/cray/xt-asyncpe/3.2.9/bin/CC"\
 -D CMAKE_C_COMPILER:STRING="/opt/cray/xt-asyncpe/3.2.9/bin/cc"\
 -D CMAKE_Fortran_COMPILER:STRING="/opt/cray/xt-asyncpe/3.2.9/bin/ftn"\
 -D TPL_ENABLE_MPI:BOOL=ON \
 -D DART_TESTING_TIMEOUT:STRING=600 \
 -D CMAKE_BUILD_TYPE:STRING=DEBUG \
 ${TRILINOS_HOME}

-Jason Slemons



More information about the Trilinos-Users mailing list