You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ld.lld: error: undefined symbol: vtable for sofa::linearalgebra::FullVector
referenced by ld-temp.o
lto.tmp:(sofa::component::odesolver::testing::getVector(boost::intrusive_ptrsofa::simulation::Node, sofa::core::TVecId<(sofa::core::
VecType)0, (sofa::core::VecAccess)0>, bool))
did you mean: typeinfo for sofa::linearalgebra::FullVector
defined in: ../../../../../lib/libSofa.LinearAlgebra.so.23.06.00
the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Sofa/Component/ODESolver/Backward/tests/CMakeFiles/Sofa.Component.ODESolver.Backward_test.dir/build.make:212: bin/Sofa.Component.ODESolver
.Backward_test] Error 1
make[1]: *** [CMakeFiles/Makefile2:5981: Sofa/Component/ODESolver/Backward/tests/CMakeFiles/Sofa.Component.ODESolver.Backward_test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs...
To Resolve this, we have included definition of key function of FullVector calss in FullVector.cpp. The key function seems to be resize() - i.e the first non-pure, non-linear and virtual function in a polymorphic class. The actual definition of resize() is present in FullVector.inl file and we have commented it out.
Please let us know if the changes are good.
Thanks,
Sandeep.
The text was updated successfully, but these errors were encountered:
thanks for reporting a build problem. I have not had the chance to play with LLVM 16 yet.
I agree that the key function of FullVector is resize. However, it is defined in the inl file. The template is explicitly instantiated in the cpp file, and it corresponds to the template parameter used in getVector (function from EigenTestUtilities.h). The cpp file includes the inl file. Therefore, I don't understand that the linker emit an error suggesting that it is not defined...
Hi,
While trying to compile SOFA(https://github.com/sofa-framework/sofa => branch "v23.06") with LLVM 16 , we are getting linker errors as below,
ld.lld: error: undefined symbol: vtable for sofa::linearalgebra::FullVector
To Resolve this, we have included definition of key function of FullVector calss in FullVector.cpp. The key function seems to be resize() - i.e the first non-pure, non-linear and virtual function in a polymorphic class. The actual definition of resize() is present in FullVector.inl file and we have commented it out.
Please let us know if the changes are good.
Thanks,
Sandeep.
The text was updated successfully, but these errors were encountered: