# Problem in building swift

**URL:** <https://forums.swift.org/t/problem-in-building-swift/22040>\
**Category:** Compiler\
**Tags:** compiler, build-script, help-needed, buildin-the-compiler\
**Created:** [March 24, 2019, 7:31pm UTC](https://forums.swift.org/t/problem-in-building-swift/22040 "2019-03-24T19:31:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdullahmughal](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/abdullahmughal/32/6336_2.png) [@abdullahmughal](https://forums.swift.org/u/abdullahmughal)\
**Post date:** [March 24, 2019, 7:31pm UTC](https://forums.swift.org/t/problem-in-building-swift/22040/1 "2019-03-24T19:31:27Z")

</div>

I was build swift on Mac OS and got error "llvm/utils/llvm-build/llvm-build: [Error 2] no such file or directory ". Then I cloned utils folder from llvm (Github).

Now, I am getting an error "llvm-build: error: unable to infer LLVM source root, please specify".

---

<div class="post-metadata">

**Author:** ![SusanCheng](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/susancheng/32/9439_2.png) [@SusanCheng](https://forums.swift.org/u/SusanCheng)\
**Post date:** [March 25, 2019, 1:59am UTC](https://forums.swift.org/t/problem-in-building-swift/22040/2 "2019-03-25T01:59:55Z")

</div>

You should checkout the dependencies first.

```
git clone https://github.com/apple/swift.git
./swift/utils/update-checkout --clone

```

---

<div class="post-metadata">

**Author:** ![abdullahmughal](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/abdullahmughal/32/6336_2.png) [@abdullahmughal](https://forums.swift.org/u/abdullahmughal)\
**Post date:** [March 25, 2019, 5:12pm UTC](https://forums.swift.org/t/problem-in-building-swift/22040/3 "2019-03-25T17:12:27Z")

</div>

I have already done that. I followed every instruction on README.txt but unable to build it. I don't know why I am getting an error.
