I built the Swift toolchain for both Ninja and Xcode following the directions in the Getting Started Guide, but am getting a series of errors that I can't figure out.
First, I was able to get the Xcode project to build successfully but at runtime, I would get the below errors:
:0: warning: unable to perform implicit import of "_Concurrency" module: no such module found :0: error: fatal error encountered during compilation; please submit a bug report (Swift.org - Contributing) and include the project :0: note: Compiler-internal integrated REPL has been removed; use the LLDB-enhanced REPL instead.
Then I fetched the latest swift build and updated my project in case I had made a change that caused issues from the original build and now I'm getting a new error at build time and I don't know how to resolve this:
I'm not sure that the second error is related to the previous warning. In any case, prepending the environment variable should be enough to ignore the concurrency features not available on older Xcode versions.
I'm still looking for a solution to my failed swift-frontend build.
I decided to delete everything and attempt a clean build again. I'm now getting a new error:
"clang: error: no such file or directory: '/Users/.../swift-project/build/Xcode-RelWithDebInfoAssert/cmark-macosx-x86_64/src/Debug/libcmark.a'
Command Ld failed with a nonzero exit code".
It looks like CMark (which is a dependency) was not built. I know at one point, there was some issue with the Xcode generator not putting CMark in the right place. You could check for that using something like:
find /path/to/swift-project/swift-project/build/Xcode-RelWithDebInfoAssert/cmark-macosx-x86_64/src -type f libcmark.a
If it's in some other directory like Release instead of Debug, you could try creating a symlink to hack around it ln -s Release Debug.
Alternately, you could try using the Ninja generator along with some other editor to get yourself unblocked, the Ninja generator typically doesn't run into build issues.