Using shared libs
There is an issue when turning on shared libs in the nightly build (even without python bindings). There seems to be some issue with the setup in dune-grid. Downstream modules fail due to linker errors with albertagrid
or because
/duneci/modules/dune-pdelab/build-cmake/dune/pdelab/test/testnewton-printparameters: error while loading shared libraries: libduneuggrid.so: cannot open shared object file: No such file or directory
For the former see the errors in dune-functions
and for the later see the errors in dune-pdelab
in the pipeline run for test/shared
https://gitlab.dune-project.org/infrastructure/dune-nightly-test/-/pipelines/40219
Additional issue (with python bindings and shared libdunefoo.so
):
Python modules (libraries files) are build in the dune module build directory, e.g., _common
and linked to the dune module libraries (e.g. libdunecommon
). The installation process moves the former into the site-packages and the later into prefix/lib
. If shared libraries are used the rpath in _common.so
is not correctly set and libdunecommon.so
is not found if the location prefix/lib
is not in the standard lookup path for shared libraries. This requires that we use static libraries, somehow fix the rpath, or set LD_LIBRARY_PATH before a dune Python C++ module is loaded. Note that this is also an issue with uggrid which can't be used with a static lib with python bindings.