# Can't find clang headers, swiftmodule folders not created

**URL:** <https://forums.swift.org/t/cant-find-clang-headers-swiftmodule-folders-not-created/21021>\
**Category:** Compiler\
**Created:** [February 28, 2019, 4:31pm UTC](https://forums.swift.org/t/cant-find-clang-headers-swiftmodule-folders-not-created/21021 "2019-02-28T16:31:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://forums.swift.org/u/Karl)\
**Post date:** [February 28, 2019, 4:31pm UTC](https://forums.swift.org/t/cant-find-clang-headers-swiftmodule-folders-not-created/21021/1 "2019-02-28T16:31:18Z")

</div>

I have a fresh checkout and I'm suddenly seeing a bunch of configuration & build errors. This is on a mac (10.14.2, Xcode 10.0, Xcode 10.2 beta 3, cmake 3.13.4).

When configuring, it appears that `LLVM_LIBRARY_DIR` contains variables which don't get expanded.

> CMake Error at stdlib/public/SwiftShims/CMakeLists.txt:106 (message):  
> Clang headers were not found in any of the following locations:  
> /(snip)/swift-sources/build/Xcode-DebugAssert/llvm-macosx-x86\_64/$(CONFIGURATION)$(EFFECTIVE\_PLATFORM\_NAME)/lib/clang/7.0.0;/$(CONFIGURATION)$(EFFECTIVE\_PLATFORM\_NAME)/lib/clang/7.0.0;/Debug/lib/clang/7.0.0  
> Call Stack (most recent call first):  
> stdlib/public/SwiftShims/CMakeLists.txt:111 (find\_llvm\_clang\_headers)

After editing the CMake file with the absolute path, configuration proceeds but building fails because it tries to output in to a bunch of '.swiftmodule' folders which apparently don't get created:

> /swift-sources/build/Xcode-DebugAssert/swift-macosx-x86\_64/Debug/lib/swift/macosx/SwiftPrivate.swiftmodule/x86\_64.swiftinterface

(This goes for Swift.swiftmodule, SwiftOnoneSupport.swiftmodule, Darwin.swiftmodule, ObjectiveC.swiftmodule, etc. I started creating them, which allowed building to proceed, but there seem to be quite a lot of them).

Is anybody else seeing these kinds of issues, or is my configuration just borked in some way?

Thanks.

---

<div class="post-metadata">

**Author:** ![jrose](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jrose/32/408_2.png) [@jrose](https://forums.swift.org/u/jrose)\
**Post date:** [February 28, 2019, 4:37pm UTC](https://forums.swift.org/t/cant-find-clang-headers-swiftmodule-folders-not-created/21021/2 "2019-02-28T16:37:44Z")

</div>

I, uh, admit to not testing my swiftmodule folder changes with Xcode. Can you file a JIRA about that?

---

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://forums.swift.org/u/Karl)\
**Post date:** [March 1, 2019, 5:17pm UTC](https://forums.swift.org/t/cant-find-clang-headers-swiftmodule-folders-not-created/21021/3 "2019-03-01T17:17:39Z")

</div>

[https://bugs.swift.org/browse/SR-10029](https://bugs.swift.org/browse/SR-10029)
