Kitura/Kitura-Sample

Get crash when build this project

Closed this issue · 5 comments

$ swift build
Cloning https://github.com/IBM-Swift/Kitura.git
git clone --recursive --depth 10 https://github.com/IBM-Swift/Kitura.git /mnt/hgfs/SwiftServer/	Kitura-Sample/Packages/Kitura.git

fatal error: unexpectedly found nil while unwrapping an Optional value
Current stack trace:
0    libswiftCore.so                    0x00007fc96a26e8e0 swift_reportError + 117
1    libswiftCore.so                    0x00007fc96a27fe00 _swift_stdlib_reportFatalError + 61
2    libswiftCore.so                    0x00007fc96a08b8a3 <unavailable> + 0
3    libswiftCore.so                    0x00007fc96a1e8ffd <unavailable> + 0
4    libswiftCore.so                    0x00007fc96a08b8a3 <unavailable> + 0
5    libswiftCore.so                    0x00007fc96a1aa8b0 specialized _fatalErrorMessage(StaticString, StaticString, StaticString, UInt, flags : UInt32) -> Never + 96
6    swift-build                        0x00000000004933a5 <unavailable> + 0
7    swift-build                        0x0000000000650007 <unavailable> + 0
8    swift-build                        0x000000000065ee5d <unavailable> + 0
9    swift-build                        0x0000000000660b62 <unavailable> + 0
10   swift-build                        0x0000000000655d11 <unavailable> + 0
11   swift-build                        0x0000000000657c8e <unavailable> + 0
12   swift-build                        0x00000000006573ad <unavailable> + 0
13   swift-build                        0x0000000000657d5c <unavailable> + 0
14   libswiftCore.so                    0x00007fc96a12d0a0 Sequence.flatMap<A where ...> ((A.Iterator.Element) throws -> A1) throws -> [A1.Iterator.Element] + 576
15   swift-build                        0x0000000000653fac <unavailable> + 0
16   swift-build                        0x0000000000653984 <unavailable> + 0
17   swift-build                        0x000000000065c002 <unavailable> + 0
18   swift-build                        0x00000000006cd67b <unavailable> + 0
19   swift-build                        0x00000000006fd335 <unavailable> + 0
20   swift-build                        0x00000000004166d8 <unavailable> + 0
21   libc.so.6                          0x00007fc968245740 __libc_start_main + 240
22   swift-build                        0x0000000000416599 <unavailable> + 0
Illegal instruction



$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.1 LTS
Release:	16.04
Codename:	xenial


$ swift --version
Swift version 3.0.1 (swift-3.0.1-RELEASE)
Target: x86_64-unknown-linux-gnu

Sorry, I made mistake.

I am experiencing this too. What was the problem?

@changer6360 What crash are you experiencing?

poweruser@poweruser-VirtualBox:~/Desktop/project1$ swift build
Cloning https://github.com/IBM-Swift/Kitura.git
git clone --recursive --depth 10 https://github.com/IBM-Swift/Kitura.git /home/poweruser/Desktop/project1/Packages/Kitura.git

fatal error: unexpectedly found nil while unwrapping an Optional value
Current stack trace:
0    libswiftCore.so                    0x00007fe39be84fc0 swift_reportError + 117
1    libswiftCore.so                    0x00007fe39be97df0 _swift_stdlib_reportFatalError + 63
2    libswiftCore.so                    0x00007fe39bca56a3 <unavailable> + 0
3    libswiftCore.so                    0x00007fe39be02dfd <unavailable> + 0
4    libswiftCore.so                    0x00007fe39bca56a3 <unavailable> + 0
5    libswiftCore.so                    0x00007fe39bdc46b0 specialized _fatalErrorMessage(StaticString, StaticString, StaticString, UInt, flags : UInt32) -> Never + 96
6    swift-build                        0x00000000005a9ad5 <unavailable> + 0
7    swift-build                        0x0000000000652707 <unavailable> + 0
8    swift-build                        0x000000000065e08d <unavailable> + 0
9    swift-build                        0x000000000065fd92 <unavailable> + 0
10   swift-build                        0x0000000000654f41 <unavailable> + 0
11   swift-build                        0x0000000000656ebe <unavailable> + 0
12   swift-build                        0x00000000006565dd <unavailable> + 0
13   swift-build                        0x0000000000656f8c <unavailable> + 0
14   libswiftCore.so                    0x00007fe39bd46ea0 Sequence.flatMap<A where ...> ((A.Iterator.Element) throws -> A1) throws -> [A1.Iterator.Element] + 576
15   swift-build                        0x00000000006531dc <unavailable> + 0
16   swift-build                        0x0000000000652bb4 <unavailable> + 0
17   swift-build                        0x000000000065b232 <unavailable> + 0
18   swift-build                        0x0000000000703f0b <unavailable> + 0
19   swift-build                        0x00000000006f9615 <unavailable> + 0
20   swift-build                        0x00000000004156b8 <unavailable> + 0
21   libc.so.6                          0x00007fe399e5d740 __libc_start_main + 240
22   swift-build                        0x0000000000415579 <unavailable> + 0
Illegal instruction (core dumped)

poweruser@poweruser-VirtualBox:~/Desktop/project1$ swift --version
Swift version 3.0.2 (swift-3.0.2-RELEASE)
Target: x86_64-unknown-linux-gnu

@changer6360 You probably need to install git. I had the same issue and installing git solved it.