[Trilinos-Users] Build questions....

Dustin Langewisch dustinl at mit.edu
Mon Aug 8 13:14:01 MDT 2011


Mark,

For the -fpic problem, try adding

-DCMAKE_CXX_FLAGS="-fPIC"

to the configure script. Alternatively, just run

export CXXFLAGS="-fPIC"

The latter is what I personally did to overcome the problem, but presumably
the former works as well. Also, I'm not sure if your problem is the same, or
even related, but I had to change the list of libraries being built within
Dakota to get Trikota to build successfully. In the file
.../TriKota/src/CMakeLists.txt search for the variable DAKOTA_LIBS and you
should find something like:

        SET(DAKOTA_LIBS
            dakota pecos lhs surfpack conmin
            ddace fsudace jega opt
            psuade newmat ncsuopt sparsegrid coliny colin
            pebbl utilib 3po nappspack appspack conveyor
            shared cdd cport amplsolver lhs nidr dl
          )

If this is what you have, then it needs to be changed since many of these
libraries (namely coliny) do not exist in the newest version of Dakota. You
must change this block to read:

        SET(DAKOTA_LIBS
            dakota pecos lhs surfpack conmin ddace fsudace jega opt psuade
            newmat ncsuopt sparsegrid colin interfaces momh scolib pebbl
            tinyxml utilib 3po hopspack cport amplsolver nidr dl
boost_signals
          )

Order is important - make sure libraries are listed exactly in order given
above.

Good luck,
Dustin



On Mon, Aug 8, 2011 at 11:54 AM, Mark Cartwright <mark_cartwright at mac.com>wrote:

> 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
>
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>
>


--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20110808/27aeed56/attachment.html 


More information about the Trilinos-Users mailing list