# Having some trouble building the compiler

**URL:** <https://forums.swift.org/t/having-some-trouble-building-the-compiler/20746>\
**Category:** Compiler\
**Tags:** compiler, build-script, help-needed, buildin-the-compiler\
**Created:** [February 21, 2019, 4:07am UTC](https://forums.swift.org/t/having-some-trouble-building-the-compiler/20746 "2019-02-21T04:07:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![suyashsrijan](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/suyashsrijan/32/5292_2.png) [@suyashsrijan](https://forums.swift.org/u/suyashsrijan)\
**Post date:** [February 21, 2019, 4:07am UTC](https://forums.swift.org/t/having-some-trouble-building-the-compiler/20746/1 "2019-02-21T04:07:56Z")

</div>

I checked out `master` and updated my Xcode to 10.2 beta 3 (10P99q), however when doing a clean build, I get the following error:

> :0: error: error opening '/Users/suyashsrijan/Documents/swift-src/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86\_64/RelWithDebInfo/lib/swift/macosx/Swift.swiftmodule/x86\_64.swiftmodule' for output: No such file or directory  
> :0: error: error opening '/Users/suyashsrijan/Documents/swift-src/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86\_64/RelWithDebInfo/lib/swift/macosx/Swift.swiftmodule/x86\_64.swiftinterface' for output: No such file or directory  
> make: \*\*\* [/Users/suyashsrijan/Documents/swift-src/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86\_64/RelWithDebInfo/lib/swift/macosx/Swift.swiftmodule/x86\_64.swiftmodule] Error 1

Tried re-checking out the branch (deleted the entire source directory, checked out again and ran `update-checkout`), but no luck. I am invoking the build script like this: `./utils/build-script -x -r --skip-build-benchmarks --clean --reconfigure`

It is consistently failing on this exact step. Did something change recently?

I am on macOS 10.14.3 (18D109) if that helps!

Note: I also have this issue sometimes where if I checkout latest changes and do a build then it fails with random errors and I have to spend a lot of time trying to fix it. I would appreciate any tips here as well.

---

<div class="post-metadata">

**Author:** ![suyashsrijan](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/suyashsrijan/32/5292_2.png) [@suyashsrijan](https://forums.swift.org/u/suyashsrijan)\
**Post date:** [February 21, 2019, 4:36am UTC](https://forums.swift.org/t/having-some-trouble-building-the-compiler/20746/2 "2019-02-21T04:36:02Z")

</div>

Manually creating `Swift.swiftmodule` and then adding a empty `x86_64.swiftmodule` file works (i.e. it gets replaced by the actual file(s)), however the build fails in the next phase with the same issue, but for Darwin. I guess I'll have to keep creating these directories?...

Going to try a ninja build now and see if it has the same issue.

EDIT: Ninja build works fine, seems like something's wrong with Xcode.
