# \[Stuck Newbie Needs Help\] Can't generate Xcode project

**URL:** <https://forums.swift.org/t/stuck-newbie-needs-help-cant-generate-xcode-project/58971>\
**Category:** Compiler\
**Tags:** xcode, build-script, help-needed, buildin-the-compiler\
**Created:** [July 15, 2022, 11:58am UTC](https://forums.swift.org/t/stuck-newbie-needs-help-cant-generate-xcode-project/58971 "2022-07-15T11:58:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielfalbo](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/danielfalbo/32/24195_2.png) [@danielfalbo](https://forums.swift.org/u/danielfalbo)\
**Post date:** [July 15, 2022, 11:58am UTC](https://forums.swift.org/t/stuck-newbie-needs-help-cant-generate-xcode-project/58971/1 "2022-07-15T11:58:19Z")

</div>

Newbie here, trying to compile `@apple/swift` and play around with it using Xcode.

I'm stuck.

With ninja, everything builds successfully, and all the tests succeed.

But every time I try to generate the Xcode project with

```bash
utils/build-script --xcode

```

or similar commands, I get an error like

```plaintext
CMake Error in SwiftCompilerSources/CMakeLists.txt:
  The custom command generating

    /Users/danielfalbo/Developer/swift-project/build/Xcode-DebugAssert/swift-macosx-arm64/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/lib/swift/macosx/x86_64/libcxxshim.modulemap

  is attached to multiple targets:

    lib-swift-macosx-x86_64-libcxxshim.modulemap
    lib-swift-macosx-arm64-libcxxshim.modulemap

  but none of these is a common dependency of the other(s). This is not
  allowed by the Xcode "new build system".

```

(which is super annoying especially after hours of building, by the way, 😅).

- I've tried both Xcode 13.4.1 and Xcode 13 beta 4, same error.
- I've tried `utils/build-script --skip-build --xcode --skip-early-swift-driver`, same error.
- I've tried

```bash
utils/build-script --skip-build-benchmarks \
  --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \
  --sccache --release-debuginfo --swift-disable-dead-stripping --test \
  --xcode

```

, same error.

I also opened an issue on GitHub [#60033](https://github.com/apple/swift/issues/60033) where you can find more details about my machine, hashes, and the full output.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![anthonylatsis](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/anthonylatsis/32/39232_2.png) [@anthonylatsis](https://forums.swift.org/u/anthonylatsis)\
**Post date:** [July 16, 2022, 2:02am UTC](https://forums.swift.org/t/stuck-newbie-needs-help-cant-generate-xcode-project/58971/2 "2022-07-16T02:02:20Z")

</div>

Delete all the `build/Xcode-*` directories and try this again:

`utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" --swift-disable-dead-stripping --release-debuginfo --xcode --skip-build`

---

<div class="post-metadata">

**Author:** ![danielfalbo](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/danielfalbo/32/24195_2.png) [@danielfalbo](https://forums.swift.org/u/danielfalbo)\
**Post date:** [July 21, 2022, 5:36pm UTC](https://forums.swift.org/t/stuck-newbie-needs-help-cant-generate-xcode-project/58971/3 "2022-07-21T17:36:13Z")

</div>

Thank you much! :)

 ![Screenshot 2022-07-21 at 19.30.28](https://global.discourse-cdn.com/swift/original/3X/1/a/1a8e2e08548f9be3cfc086f1e5e2547dc6772f4a.png)
