Cxxabi errors

When running a project under the debugger I get the following messages (though the program seems to behave correctly):

dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N10__cxxabiv117__class_type_infoE, N10__cxxabiv117__class_type_infoE, N10__cxxabiv121__vmi_class_type_infoE.
dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N10__cxxabiv117__class_type_infoE, N10__cxxabiv120__si_class_type_infoE, N10__cxxabiv120__si_class_type_infoE.
dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N10__cxxabiv117__class_type_infoE, N10__cxxabiv121__vmi_class_type_infoE, N10__cxxabiv120__si_class_type_infoE.
dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. St9type_info, N10__cxxabiv120__si_class_type_infoE, N10__cxxabiv117__class_type_infoE.
dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. St9type_info, N10__cxxabiv121__vmi_class_type_infoE, N10__cxxabiv117__class_type_infoE.
...

Details:

The project is compiled with LLVM clang 17 and uses libc++ as the standard library. The code is compiled as C++23 and links to several external libraries (google test, pqxx, redis, etc) that were also compiled from source using the same compiler and standard librady, but possibly using different C++ standard versions.

I am running on MacOS, so an apple-specific clang is present on the system as part of XCode. I installed LLVM 17 using homebrew, and changed the paths to use it instead of the native version.

I debug inside VSCode in lldb using the CodeLLDB plugin.

There are no error messages when I run the code outside of a debugger.

What is the cause of those messages and how can I make them go away?

Anyone?