dealii
dealii copied to clipboard
Undefined references when linking with ld.lld
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutInterface<1, 1>::validate_dataset_names() const [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<1, 1>::no_neighbor [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<1, 1>::Patch() [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<1, 1>::swap(dealii::DataOutBase::Patch<1, 1>&) [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutInterface<1, 2>::validate_dataset_names() const [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<1, 2>::no_neighbor [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<1, 2>::Patch() [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<1, 2>::swap(dealii::DataOutBase::Patch<1, 2>&) [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutInterface<2, 2>::validate_dataset_names() const [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<2, 2>::no_neighbor [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<2, 2>::Patch() [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<2, 2>::swap(dealii::DataOutBase::Patch<2, 2>&) [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutInterface<2, 3>::validate_dataset_names() const [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<2, 3>::no_neighbor [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<2, 3>::Patch() [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<2, 3>::swap(dealii::DataOutBase::Patch<2, 3>&) [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutInterface<3, 3>::validate_dataset_names() const [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<3, 3>::no_neighbor [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<3, 3>::Patch() [--no-allow-shlib-undefined]
ld.lld: error: /home/tamiko/workspace/dealii/build/lib/libdeal_II.g.so.9.5.0-pre: undefined reference to dealii::DataOutBase::Patch<3, 3>::swap(dealii::DataOutBase::Patch<3, 3>&) [--no-allow-shlib-undefined]
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
Setting DEAL_II_LINKER_FLAGS="-Wl,--allow-shlib-undefined"
works around the issue. Ideally, however, we should fix all undefined references.
What do we need to do about this?
@bangerth I will try to reproduce early next week.
We would either need to add some explicit (dummy) instantiations, or remove some obscure instantations, I guess.
I can no longer reproduce.