Ensure that dynamic polymorphism with templated types play well with symbol visibility on Mac #8540
Labels
component: build system
Bazel, CMake, dependencies, memory checkers, linters
priority: backlog
type: bug
Summarizing from this comment and the follow-up from #8435:
The short-term solution to this would be to somehow teach the Mac linker to produce the same
typeinfo
for these symbols downstream.TBH, it's a little mystifying to me that it can link functions of signatures with the same type, but fails to produce the same RTTI for the given symbol.
\cc @jamiesnape @jwnimmer-tri
EDIT: I understand a bit more on the symbol visibility shenanigans, why the symbols link well at compile-time, but why there's a mismatch at runtime (since
clang
and what not checks RTTI based on pointer comparison and not string comparison) (reference).Relates #7856
Will see if the PR itself can be fixed by overriding the
-fvisibility=hidden
flag frompybind11Tools.cmake
.The text was updated successfully, but these errors were encountered: