Kitura "swift test" Issues on PPC64LE

Hello,
I have built Apple Swift 5 toolchain on PowerPC64LE. I also managed to run all the test suites in the toolchain.
Now I am trying to build and run tests in Kitura for Swift.
I tried the following steps mentioned at https://github.com/IBM-Swift/Kitura :-

  1. Clone this repository.
    $ git clone https://github.com/IBM-Swift/Kitura

  2. Build and run tests.
    $ swift test
    However I am seeing the below issues.

     sar@267538d18c75:~/extra-tests-swift/kitura$ git clone https://github.com/IBM-Swift/Kitura
     Cloning into 'Kitura'...
     remote: Enumerating objects: 122, done.
     remote: Counting objects: 100% (122/122), done.
     remote: Compressing objects: 100% (70/70), done.
     remote: Total 7777 (delta 56), reused 101 (delta 45), pack-reused 7655
     Receiving objects: 100% (7777/7777), 6.46 MiB | 2.98 MiB/s, done.
     Resolving deltas: 100% (4696/4696), done.
     Checking connectivity... done.
    
     sar@267538d18c75:~/extra-tests-swift/kitura$ cd Kitura/
    
     sar@267538d18c75:~/extra-tests-swift/kitura/Kitura$ ls
     Configuration  LICENSE.txt  Package.swift            Package@swift-4.1.swift  README.md  Sources  docker-compose.yml  vagrantfile
     Documentation  NOTICES.txt  Package@swift-4.0.swift  Package@swift-4.2.swift  Scripts    Tests    docs
    
     sar@267538d18c75:~/extra-tests-swift/kitura/Kitura$ swift test
     Fetching https://github.com/IBM-Swift/Kitura-net.git
     Fetching https://github.com/IBM-Swift/Kitura-TemplateEngine.git
     Fetching https://github.com/IBM-Swift/KituraContracts.git
     Fetching https://github.com/IBM-Swift/TypeDecoder.git
     Fetching https://github.com/IBM-Swift/LoggerAPI.git
     Fetching https://github.com/IBM-Swift/BlueSignals.git
     Fetching https://github.com/IBM-Swift/BlueSocket.git
     Fetching https://github.com/IBM-Swift/BlueSSLService.git
     Fetching https://github.com/IBM-Swift/OpenSSL.git
     Completed resolution in 15.42s
     Cloning https://github.com/IBM-Swift/OpenSSL.git
     Resolving https://github.com/IBM-Swift/OpenSSL.git at 2.2.2
     Cloning https://github.com/IBM-Swift/LoggerAPI.git
     Resolving https://github.com/IBM-Swift/LoggerAPI.git at 1.8.1
     Cloning https://github.com/IBM-Swift/KituraContracts.git
     Resolving https://github.com/IBM-Swift/KituraContracts.git at 1.1.2
     Cloning https://github.com/IBM-Swift/Kitura-net.git
     Resolving https://github.com/IBM-Swift/Kitura-net.git at 2.2.1
     Cloning https://github.com/IBM-Swift/TypeDecoder.git
     Resolving https://github.com/IBM-Swift/TypeDecoder.git at 1.3.3
     Cloning https://github.com/IBM-Swift/BlueSSLService.git
     Resolving https://github.com/IBM-Swift/BlueSSLService.git at 1.0.45
     Cloning https://github.com/IBM-Swift/BlueSocket.git
     Resolving https://github.com/IBM-Swift/BlueSocket.git at 1.0.45
     Cloning https://github.com/IBM-Swift/Kitura-TemplateEngine.git
     Resolving https://github.com/IBM-Swift/Kitura-TemplateEngine.git at 2.0.1
     Cloning https://github.com/IBM-Swift/BlueSignals.git
     Resolving https://github.com/IBM-Swift/BlueSignals.git at 1.0.17
     Incorrect reconstructed type for $sSay7SignalsAAC6SignalO6signal_ys5Int32VXC6actiontGD
     Original type:
     (bound_generic_struct_type decl=Swift.(file).Array
       (tuple_type num_elements=2
     	(tuple_type_elt name=signal
     	  (enum_type decl=Signals.(file).Signals.Signal@/home/sar/extra-tests-swift/kitura/Kitura/.build/checkouts/BlueSignals/Sources/Signals/Signals.swift:38:14
     		(parent=class_type decl=Signals.(file).Signals@/home/sar/extra-tests-swift/kitura/Kitura/.build/checkouts/BlueSignals/Sources/Signals/Signals.swift:31:14)))
     	(tuple_type_elt name=action
     	  (function_type representation=c escaping
     		(input=function_params num_params=1
     		  (param
     			(struct_type decl=Swift.(file).Int32)))
     		(output=tuple_type num_elements=0)))))
     Reconstructed type:
     (bound_generic_struct_type decl=Swift.(file).Array
       (tuple_type num_elements=2
     	(tuple_type_elt name=signal
     	  (enum_type decl=Signals.(file).Signals.Signal@/home/sar/extra-tests-swift/kitura/Kitura/.build/checkouts/BlueSignals/Sources/Signals/Signals.swift:38:14
     		(parent=class_type decl=Signals.(file).Signals@/home/sar/extra-tests-swift/kitura/Kitura/.build/checkouts/BlueSignals/Sources/Signals/Signals.swift:31:14)))
     	(tuple_type_elt name=action
     	  (function_type representation=c
     		(input=function_params num_params=1
     		  (param
     			(struct_type decl=Swift.(file).Int32)))
     		(output=tuple_type num_elements=0)))))
     Stack dump:
     0.      Program arguments: /home/sar/extra-tests-swift/usr/bin/swift -frontend -c -primary-file /home/sar/extra-tests-swift/kitura/Kitura/.build/checkouts/BlueSignals/Sources/Signals/Signals.swift -emit-module-path /home/sar/extra-tests-swift/kitura/Kitura/.build/powerpc64le-unknown-linux/debug/Signals.build/Signals~partial.swiftmodule -emit-module-doc-path /home/sar/extra-tests-swift/kitura/Kitura/.build/powerpc64le-unknown-linux/debug/Signals.build/Signals~partial.swiftdoc -emit-dependencies-path /home/sar/extra-tests-swift/kitura/Kitura/.build/powerpc64le-unknown-linux/debug/Signals.build/Signals.d -emit-reference-dependencies-path /home/sar/extra-tests-swift/kitura/Kitura/.build/powerpc64le-unknown-linux/debug/Signals.build/Signals.swiftdeps -target powerpc64le-unknown-linux -disable-objc-interop -sdk / -I /home/sar/extra-tests-swift/kitura/Kitura/.build/powerpc64le-unknown-linux/debug -enable-testing -g -module-cache-path /home/sar/extra-tests-swift/kitura/Kitura/.build/powerpc64le-unknown-linux/debug/ModuleCache -swift-version 4 -Onone -D SWIFT_PACKAGE -D DEBUG -color-diagnostics -enable-anonymous-context-mangled-names -parse-as-library -module-name Signals -o /home/sar/extra-tests-swift/kitura/Kitura/.build/powerpc64le-unknown-linux/debug/Signals.build/Signals.swift.o -index-store-path /home/sar/extra-tests-swift/kitura/Kitura/.build/powerpc64le-unknown-linux/debug/index/store -index-system-modules
     1.      While emitting IR SIL function "@$s7SignalsAAC4trap7signalsySayAB6SignalO6signal_ys5Int32VXC6actiontG_tFZ".
      for 'trap(signals:)' (at /home/sar/extra-tests-swift/kitura/Kitura/.build/checkouts/BlueSignals/Sources/Signals/Signals.swift:123:9)
     /home/sar/extra-tests-swift/usr/bin/swift[0x150bc2a8]
     /home/sar/extra-tests-swift/usr/bin/swift[0x150b9548]
     /home/sar/extra-tests-swift/usr/bin/swift[0x150bc968]
     [0x3fff7ac404d8]
     /lib/powerpc64le-linux-gnu/libc.so.6(gsignal+0x40)[0x3fff7a5bec90]
     /lib/powerpc64le-linux-gnu/libc.so.6(abort+0x2b4)[0x3fff7a5c11f4]
     /home/sar/extra-tests-swift/usr/bin/swift[0x1039663c]
     /home/sar/extra-tests-swift/usr/bin/swift[0x103970e8]
     /home/sar/extra-tests-swift/usr/bin/swift[0x10396cb4]
     /home/sar/extra-tests-swift/usr/bin/swift[0x1038c6e4]
     /home/sar/extra-tests-swift/usr/bin/swift[0x1038d450]
     /home/sar/extra-tests-swift/usr/bin/swift[0x1038d340]
     /home/sar/extra-tests-swift/usr/bin/swift[0x103a26a4]
     /home/sar/extra-tests-swift/usr/bin/swift[0x1028dedc]
     /home/sar/extra-tests-swift/usr/bin/swift[0x101cfff0]
     /home/sar/extra-tests-swift/usr/bin/swift[0x101d0778]
     /home/sar/extra-tests-swift/usr/bin/swift[0x1012b860]
     /home/sar/extra-tests-swift/usr/bin/swift[0x10126c90]
     /home/sar/extra-tests-swift/usr/bin/swift[0x100aa89c]
     /home/sar/extra-tests-swift/usr/bin/swift[0x100a9ee0]
     /lib/powerpc64le-linux-gnu/libc.so.6(+0x2309c)[0x3fff7a5a309c]
     /lib/powerpc64le-linux-gnu/libc.so.6(__libc_start_main+0xb8)[0x3fff7a5a3298]
    
     sar@267538d18c75:~/extra-tests-swift/kitura/Kitura$
    

Can anyone explain what this piece of code is trying to do?

Also if the error looks familiar or am I missing anything here?

Hi Sarvesh.

It looks like the Swift compiler has crashed while compiling the BlueSignals dependency.

I would start by trying to produce a small standalone Swift testcase that shows the problem (not including Kitura etc.). Then you will need compiler debug skills to dig further.

As per https://github.com/IBM-Swift/BlueSignals/issues/20, this was fixed in https://github.com/apple/swift/pull/25423 - this should now compile on the latest level.