# Compiler failure when trying to build the new swift-collections

**URL:** <https://forums.swift.org/t/compiler-failure-when-trying-to-build-the-new-swift-collections/47170>\
**Category:** Collections\
**Created:** [April 5, 2021, 10:48pm UTC](https://forums.swift.org/t/compiler-failure-when-trying-to-build-the-new-swift-collections/47170 "2021-04-05T22:48:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_Heck](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/joseph_heck/32/22369_2.png) [@Joseph\_Heck](https://forums.swift.org/u/Joseph_Heck)\
**Post date:** [April 5, 2021, 10:48pm UTC](https://forums.swift.org/t/compiler-failure-when-trying-to-build-the-new-swift-collections/47170/1 "2021-04-05T22:48:30Z")

</div>

I cloned down the new [swift-collections repository](https://github.com/apple/swift-collections) and went to open it up, explore a bit. First thing I tried was opening it in Xcode 12.4 (Intel Mac), and when I did a fresh build, I got a compiler failure/crash.

I thought maybe there was a different with swift directly on the command line, so I tried there - but hit basically the same thing.

Is this something I should open a bug for, or am I holding it wrong?

The failure is in [swift-collections-CLI-build-failure.txt · GitHub](https://gist.github.com/heckj/a4e23c3f1593b4d49beb297ebbde9d37) - I didn't to spam it into here, but the key error message seems to be:

```
<unknown>:0: error: fatal error encountered while reading from module 'OrderedCollections'; please file a bug report with your project and the crash log
<unknown>:0: note: module 'OrderedCollections' full misc version is '5.3.2(5.3.2)/Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)'

```

To be on the safe side, I opened a bug for this: [[SR-14448] swift-collections compilation failure · Issue #56804 · apple/swift · GitHub](https://bugs.swift.org/browse/SR-14448). Happy to close it mea culpa if I'm missing something and just "holding it wrong"

---

<div class="post-metadata">

**Author:** ![lorentey](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/lorentey/32/1299_2.png) [@lorentey](https://forums.swift.org/u/lorentey)\
**Post date:** [April 5, 2021, 11:37pm UTC](https://forums.swift.org/t/compiler-failure-when-trying-to-build-the-new-swift-collections/47170/2 "2021-04-05T23:37:23Z")

</div>

That's definitely not how it should work! Please open a bug if you can; meanwhile I'll try to reproduce it locally to see what's going on.

---

<div class="post-metadata">

**Author:** ![Joseph\_Heck](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/joseph_heck/32/22369_2.png) [@Joseph\_Heck](https://forums.swift.org/u/Joseph_Heck)\
**Post date:** [April 6, 2021, 12:11am UTC](https://forums.swift.org/t/compiler-failure-when-trying-to-build-the-new-swift-collections/47170/3 "2021-04-06T00:11:28Z")

</div>

I was able to snag an M1 MacBook, and it worked brilliantly there - no issue, so the issue may be related to Intel - in either case, it's filed as [[SR-14448] swift-collections compilation failure · Issue #56804 · apple/swift · GitHub](https://bugs.swift.org/browse/SR-14448)

---

<div class="post-metadata">

**Author:** ![lorentey](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/lorentey/32/1299_2.png) [@lorentey](https://forums.swift.org/u/lorentey)\
**Post date:** [April 6, 2021, 6:49am UTC](https://forums.swift.org/t/compiler-failure-when-trying-to-build-the-new-swift-collections/47170/4 "2021-04-06T06:49:43Z")

</div>

Thank you, we're looking into it!

It looks like others are hitting the same issue: [Fails to compile (Abort trap: 6) · Issue #7 · apple/swift-collections · GitHub](https://github.com/apple/swift-collections/issues/7)

---

<div class="post-metadata">

**Author:** ![Joseph\_Heck](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/joseph_heck/32/22369_2.png) [@Joseph\_Heck](https://forums.swift.org/u/Joseph_Heck)\
**Post date:** [April 6, 2021, 4:52pm UTC](https://forums.swift.org/t/compiler-failure-when-trying-to-build-the-new-swift-collections/47170/5 "2021-04-06T16:52:47Z")

</div>

FWIW, if you're hitting this there is a workaround suggested by @lorentey (in the bug report) that's functioning: compile it with `-c release`.
