I recently updated my XCode Command Line Tools. After that, I started getting the following error when running cmake
% cmake
dyld[97959]: weak-def symbol not found '__ZnwmSt19__type_descriptor_t’weak-def symbol not found > ‘__ZnamSt19__type_descriptor_t’
zsh: abort cmake
I have tried downgrading my current version of the XCode Command Line Tools as well as re-installing different versions of CMake to no avail. Any help would be most appreciated.
It looks like you built CMake with build_shared_libs=on. I think you need to rebuild CMake from scratch since the dynamic libraries generally change when you change xcode versions.
This might be inevitable even if using static linking for CMake, as things like system libc++ can still be dynamically linked. The same error is noticed by others when upgrading Xcode.
I think the “bootstrap” builds CMake with vendored static libraries by default–except libc++. So I think the solution is to just rebuild CMake as you did before (e.g. with “bootstrap”).