# CMake suddenly stopped working macOS Sonoma

**URL:** https://discourse.cmake.org/t/cmake-suddenly-stopped-working-macos-sonoma/10303
**Category:** Usage
**Tags:** os:macos
**Created:** [March 6, 2024, 11:05am UTC](https://discourse.cmake.org/t/cmake-suddenly-stopped-working-macos-sonoma/10303 "2024-03-06T11:05:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![SidYaj](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sidyaj/32/4304_2.png) [@SidYaj](https://discourse.cmake.org/u/SidYaj)
#### Post date: [March 6, 2024, 11:05am UTC](https://discourse.cmake.org/t/cmake-suddenly-stopped-working-macos-sonoma/10303/1 "2024-03-06T11:05:39Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![SidYaj](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sidyaj/32/4304_2.png) [@SidYaj](https://discourse.cmake.org/u/SidYaj)
#### Post date: [March 6, 2024, 11:09am UTC](https://discourse.cmake.org/t/cmake-suddenly-stopped-working-macos-sonoma/10303/2 "2024-03-06T11:09:37Z")

</div>

This is only a problem with CMake which is build from source by me and not with the CMake installed from the binary.

---

<div class="post-metadata">

### Author: ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)
#### Post date: [March 6, 2024, 1:11pm UTC](https://discourse.cmake.org/t/cmake-suddenly-stopped-working-macos-sonoma/10303/3 "2024-03-06T13:11:24Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![SidYaj](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sidyaj/32/4304_2.png) [@SidYaj](https://discourse.cmake.org/u/SidYaj)
#### Post date: [March 6, 2024, 2:21pm UTC](https://discourse.cmake.org/t/cmake-suddenly-stopped-working-macos-sonoma/10303/4 "2024-03-06T14:21:10Z")

</div>

Do you know how I could build it without the shared libraries? Where can I specify the flag?

./configure --prefix=prefix --build\_with\_shared\_libs=on?

---

<div class="post-metadata">

### Author: ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)
#### Post date: [March 6, 2024, 7:39pm UTC](https://discourse.cmake.org/t/cmake-suddenly-stopped-working-macos-sonoma/10303/5 "2024-03-06T19:39:56Z")

</div>

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](https://discourse.llvm.org/t/apples-libc-now-provides-std-type-descriptor-t-functionality-not-found-in-upstream-libc/73881) 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”).
