[Trilinos-Users] [EXTERNAL] [CMAKE] linking trilinos with other app

Perschbacher, Brent M bmpersc at sandia.gov
Wed Feb 5 08:03:36 MST 2014


Sunghwan Choi,
  This looks like you have some how gotten ahold of a shared build of Trilinos on a platform that doesn't support shared objects. Are you using a version that came installed with the OS by any chance?

Likely the only solution to this is to build Trilinos with the options "-DBUILD_SHARED_LIBS=OFF" and "-DTPL_FIND_SHARED_LIBS=OFF" to ensure that you will get static libraries that don't inadvertently link shared objects.

Brent

From: Sunghwan Choi <sunghwanchoi91 at gmail.com<mailto:sunghwanchoi91 at gmail.com>>
Date: Wednesday, February 5, 2014 5:48 AM
To: "trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>" <trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>>
Subject: [EXTERNAL] [Trilinos-Users] [CMAKE] linking trilinos with other app

I got the cmake warning when I compile my app with trilinos library. I modified the CMakeLists.txt in http://trilinos.sandia.gov/Finding_Trilinos.txt .
But whenever I did cmake, I got several tens of warnings such as


CMake Warning (dev) at /appl/trilinos/libs/lib/cmake/Trilinos/TrilinosTargets.cmake:109 (ADD_LIBRARY):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  /appl/trilinos/libs/lib/cmake/Trilinos/TrilinosConfig.cmake:103 (INCLUDE)
  Find_Trilinos.cmake:23 (FIND_PACKAGE)
  CMakeLists.txt:17 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

If I ignored it, I faced the error when I link trilinos with my app.
/usr/bin/ld: attempted static link of dynamic object `/appl/trilinos/libs/lib/libanasazitpetra.so'
I don’t know how to fix it. If anyone has a piece of idea, please let me know

Sunghwan Choi

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


More information about the Trilinos-Users mailing list