nightly builds with -Wl,--no-undefined
Issue #81
invalid
Once in a while the one or the other of my FEniCS apps won't execute with missing symbols from shared libraries that have been forgotten to add the link line when libdolfin.so is created.
As a fix for this, I'd suggest to add -Wl,--no-undefined
to the link line for your nightly tests, e.g., by adding -D CMAKE_SHARED_LINKER_FLAGS:STRING="-Wl,--no-undefined"
to the CMake line. For more details on --no-undefined, see https://blog.flameeyes.eu/2008/11/relationship-between-as-needed-and-no-undefined-part-1-what-do-they-do.
Right now, I'm getting errors of the form
Linking CXX shared library libdolfin.so
CMakeFiles/dolfin.dir/la/MUMPSLUSolver.cpp.o: In function `dolfin::MUMPSLUSolver::solve(dolfin::GenericVector&, dolfin::GenericVector const&)':
/home/nschloe/software/fenics/dolfin/dev/source/dolfin/la/MUMPSLUSolver.cpp:101: undefined reference to `dmumps_c'
Comments (2)
-
-
- changed status to invalid
Doesn't seem to be a common problem, and no further feedback from reporter.
- Log in to comment
You're presenting a symptom, but not the precise cause. Why is the problem only occasional? Which libraries are forgotten?
We should avoid customised, platform/compiler/linker specific option and attempt to work on the build at a high level through CMake.