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
vtable-dumper is explicitly linking to -lstdc++ used to provide __cxa_demangle(). However, libstdc++ is only valid for gcc (and clang with gcc libstdc++). The other compilers provide __cxa_demangle() in other libraries. For example, clang in GNU-free environment uses -lc++ (well, the needed symbol is actually often provided by -lc++abi or -lcxxrt sub-library), in which case -lstdc++ is either going to be wrong (i.e. force dependency on wrong C++ library on system using purely clang suite) or fail (when there is no gcc).
To be honest, I really don't see a point in building vtable-dumper as C if it requires the C++ library anyway. Therefore, the simplest solution to the problem would be to build it using a C++ compiler which in turn will use the correct C++ library for the ecosystem used (and also guarantee correct ABI for __cxa_demangle() calls — it would also be more correct to #include <cxxabi.h> instead of redeclaring the function).
The text was updated successfully, but these errors were encountered:
vtable-dumper is explicitly linking to
-lstdc++
used to provide__cxa_demangle()
. However, libstdc++ is only valid for gcc (and clang with gcc libstdc++). The other compilers provide__cxa_demangle()
in other libraries. For example, clang in GNU-free environment uses-lc++
(well, the needed symbol is actually often provided by-lc++abi
or-lcxxrt
sub-library), in which case-lstdc++
is either going to be wrong (i.e. force dependency on wrong C++ library on system using purely clang suite) or fail (when there is no gcc).To be honest, I really don't see a point in building vtable-dumper as C if it requires the C++ library anyway. Therefore, the simplest solution to the problem would be to build it using a C++ compiler which in turn will use the correct C++ library for the ecosystem used (and also guarantee correct ABI for
__cxa_demangle()
calls — it would also be more correct to#include <cxxabi.h>
instead of redeclaring the function).The text was updated successfully, but these errors were encountered: