[Dune] static/shared library problem

Markus Blatt markus at dr-blatt.de
Wed Nov 16 11:35:50 CET 2016


Hi,

please ignore my other reply. I was talking nonsense. Sorry for that.

On Mon, Nov 14, 2016 at 03:39:40PM +0000, Andreas Dedner wrote:
> He is compiling a shared library version of dune (BUILD_SHARED_LIBS=TRUE).
> He also has an installed version of suitesparse with a
> libsuitesparseconfig.a being picked up by the
> cmake tests - there is no suitable suitesparseconfig.so.
> This is causing
> problems now because the linker flags include the -lsuitesparse (since it
> was found) but the static library of course can't be used.
>

Would you mind posting the error messsage? For a binary it should not
make no difference. I assume the problem arises when creating
dowstream librarie. We add all the DUNE_LIBS as libraries to link to,
when creating them. 

> How do I get find_package to ignore static libs?
> I noticed a 'DUNE_USE_ONLY_STATIC_LIBS' but no corresponding
> 'DUNE_USE_ONLY_SHARED_LIBS'.

Well there is none. The reason for having a DUNE_USE_ONLY_STATIC_LIBS
was to utilize building static binaries for running on
supercomputers. When using shared libraries we had startup times for
loading the binary of nearly an hour in the past.

Having said that, I am not sure how well tested this feature is. My
impression is that short runs on supercomputers are seldomly executed
these days.

A work around is to disable suitesparse by passing
-DCMAKE_DISABLE_FIND_PACKAGE_SuiteSparse=TRUE to cmake

Markus

-- 
Using PT-Scotch with DUNE https://t.co/hZH8lxf5ZF

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20161116/8bb5c951/attachment.sig>


More information about the Dune mailing list