[Trilinos-Users] stk_util linking errors for Trilinos/Albany

Bosler, Peter Andrew pabosle at sandia.gov
Thu Mar 17 12:40:46 EDT 2016


Good morning,

I have been having problems getting Trilinos master to build on Mac (https://github.com/trilinos/Trilinos/issues/62) although the original report of this bug was a Unix build.   I have tracked the problem down to the linking of shared libraries, and I have two workarounds.

The first (and easiest) is to do a static build by setting -D BUILD_SHARED_LIBS:BOOL=OFF in the configure script.

To get a shared build to work, I had to hack four stk_util CMakeLists.txt files to explicity state the following dependencies using the TRIBITS_ADD_LIBRARY command's DEPLIBS option:
1. stk_util_use_cases depends on stk_util_parallel, stk_util_env, and stk_util_diag
2. stk_util_registry depends on stk_util_env
3. stk_util_diag depends on stk_util_env
4. stk_util_env depends on stk_util_util and stk_util_parallel

This works for Trillinos, but then I found similar problems with Albany - it could not find the appropriate Trilinos libraries for the adapt/ library unless I hacked several of the Albany CMakeLists.txt files to add explicit TARGET_LINK_LIBRARIES calls.  Albany is too big for me to do this manually, so I gave up and resorted to a static build.

Has anyone had a similar experience with shared build difficulties, particularly on Mac?  I did not have to do any of these hacks to get Trilinos/Albany to build with shared libs on the Unix HPC clusters I use - what's different about the Mac shared library environment?  Is there a way to get Cmake to figure these dependencies out by itself?

Thanks for your time,

Pete Bosler

-----
Peter Bosler, Ph.D.
Sandia National Laboratories
Center for Computing Research
Multiphysics Applications (01446)
pabosle at sandia.gov
(505) 845 - 0427


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160317/f7986fbb/attachment.html>


More information about the Trilinos-Users mailing list