Can't find clang headers, swiftmodule folders not created

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.

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

2 Likes

https://bugs.swift.org/browse/SR-10029

1 Like