# AppleClang 15 new linker general issues

**URL:** https://discourse.cmake.org/t/appleclang-15-new-linker-general-issues/9106
**Category:** Usage
**Created:** [September 29, 2023, 9:53pm UTC](https://discourse.cmake.org/t/appleclang-15-new-linker-general-issues/9106 "2023-09-29T21:53:23Z")
**Posts on this page:** 2
**Page:** 1

<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: [September 29, 2023, 9:53pm UTC](https://discourse.cmake.org/t/appleclang-15-new-linker-general-issues/9106/1 "2023-09-29T21:53:23Z")

</div>

This is not a CMake issue, but people may open issues in projects using CMake as the [new linker in AppleClang 15](https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking) is causing ld link warnings and errors. This may occur for try\_compile, check\_source\_compiles and similar and when building as usual. This same issue occurs when building by hand, with Make, Autotools, etc. as it’s the new fussier linker, NOT CMake that’s the issue.

The workaround as suggested by Apple is for users to set environment variable `LDFLAGS=-Wl,-ld_classic`

In general the CMake-using projects need to update their CMakeLists.txt to deal with whatever obsolete/incorrect flags are emitted by their options.

For example, this new linker impacts OpenMPI on macOS as their `mpif90 -show` emits a linker flag not compatible with AppleClang 15.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [September 30, 2023, 3:23pm UTC](https://discourse.cmake.org/t/appleclang-15-new-linker-general-issues/9106/2 "2023-09-30T15:23:25Z")

</div>

We should have an issue tracking “things Xcode 15 changed that matters to CMake”.
