[Trilinos-Users] Build questions....

Mark Cartwright mark_cartwright at mac.com
Mon Aug 8 11:54:28 MDT 2011


I am building Trilinos from source on an unbuntu (64bit gcc 4.4.5) box.  Primarily for use with Titan, however I would like to explore some of trilinos itself...

I've run into an issue with TriKota -- it seems parts of Dakota are not being compiled -fPIC.  And I cant 'seem to find a way to force the Dakota config to stay -fPIC -- finding myself a bit lost with the nested CMake-ness...

What I get:

Linking CXX shared library libtrikota.so
/usr/bin/ld: /home/markc/trilinos-10.6.4-build/packages/TriKota/Dakota/install/lib/libdakota.a(ParallelLibrary.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/home/markc/trilinos-10.6.4-build/packages/TriKota/Dakota/install/lib/libdakota.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [packages/TriKota/src/libtrikota.so] Error 1
make[2]: *** [packages/TriKota/src/CMakeFiles/trikota.dir/all] Error 2
make[1]: *** [packages/TriKota/src/CMakeFiles/trikota.dir/rule] Error 2
make: *** [trikota] Error 2


My "do-configure"

#!/bin/sh

export TRILINOS_HOME=/home/markc/trilinos-10.6.4-Source


EXTRA_ARGS=$@
        
        cmake \
          -D Trilinos_CONFIGURE_OPTIONS_FILE:FILEPATH=MyConfigureOptions.cmake \
          -D CMAKE_BUILD_TYPE:STRING=DEBUG \
          -D Trilinos_ENABLE_TESTS:BOOL=ON \
          $EXTRA_ARGS \
          ${TRILINOS_HOME}

  
And finally -- MyConfigureOptions.cmake

#SET(CMAKE_BUILD_TYPE DEBUG CACHE STRING "" FORCE)
SET(Trilinos_ENABLE_CHECKED_STL ON CACHE BOOL "" FORCE)
SET(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)


It's obviously something very silly that I have overlooked -- but after 8 hours for permutations -- I thought I had better ask...

Cheers,

Mark





More information about the Trilinos-Users mailing list