Skip to content

Instantly share code, notes, and snippets.

@tokyovigilante
Created December 31, 2018 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tokyovigilante/89a1209eb7802b8a035d6f03b63adeae to your computer and use it in GitHub Desktop.
Save tokyovigilante/89a1209eb7802b8a035d6f03b63adeae to your computer and use it in GitHub Desktop.
Swift compiler crash trying to pass C extern const struct by reference
lsb_release -r
which clang
/usr/bin/swiftc --driver-mode=swift -L /usr/lib/swift/pm/4_2 -lPackageDescription -suppress-warnings -swift-version 4.2 -I /usr/lib/swift/pm/4_2 -sdk / /home/ryan/Projects/Develop/Spitfire/Package.swift -fileno 5
/usr/bin/swiftc --driver-mode=swift -L /usr/lib/swift/pm/4 -lPackageDescription -suppress-warnings -swift-version 4 -I /usr/lib/swift/pm/4 -sdk / /home/ryan/Projects/Develop/Spitfire/.build/checkouts/HeliumLogger-01bcb105/Package.swift -fileno 5
/usr/bin/swiftc --driver-mode=swift -L /usr/lib/swift/pm/4 -lPackageDescription -suppress-warnings -swift-version 4 -I /usr/lib/swift/pm/4 -sdk / /home/ryan/Projects/Develop/Spitfire/.build/checkouts/LoggerAPI-acf04c8b/Package.swift -fileno 5
pkg-config --variable pc_path pkg-config
/usr/bin/swift-build-tool -f /home/ryan/Projects/Develop/Spitfire/.build/debug.yaml main -v
/usr/bin/swiftc -module-name LoggerAPI -incremental -emit-dependencies -emit-module -emit-module-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/LoggerAPI.swiftmodule -output-file-map /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/LoggerAPI.build/output-file-map.json -parse-as-library -c /home/ryan/Projects/Develop/Spitfire/.build/checkouts/LoggerAPI-acf04c8b/Sources/LoggerAPI/Logger.swift -I /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug -swift-version 4 -enable-batch-mode -target x86_64-unknown-linux -sdk / -Onone -g -enable-testing -j4 -DSWIFT_PACKAGE -DDEBUG -module-cache-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/ModuleCache
/usr/bin/swiftc -module-name HeliumLogger -incremental -emit-dependencies -emit-module -emit-module-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/HeliumLogger.swiftmodule -output-file-map /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/HeliumLogger.build/output-file-map.json -parse-as-library -c /home/ryan/Projects/Develop/Spitfire/.build/checkouts/HeliumLogger-01bcb105/Sources/HeliumLogger/HeliumLogger.swift /home/ryan/Projects/Develop/Spitfire/.build/checkouts/HeliumLogger-01bcb105/Sources/HeliumLogger/HeliumStreamLogger.swift -I /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug -swift-version 4 -enable-batch-mode -target x86_64-unknown-linux -sdk / -Onone -g -enable-testing -j4 -DSWIFT_PACKAGE -DDEBUG -module-cache-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/ModuleCache
/usr/bin/swiftc -module-name Harness -incremental -emit-dependencies -emit-module -emit-module-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Harness.swiftmodule -output-file-map /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Harness.build/output-file-map.json -parse-as-library -c /home/ryan/Projects/Develop/Spitfire/Sources/Harness/PrecisionTimer.swift /home/ryan/Projects/Develop/Spitfire/Sources/Harness/Utilities.swift -I /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug -swift-version 4.2 -enable-batch-mode -target x86_64-unknown-linux -sdk / -Onone -g -enable-testing -j4 -DSWIFT_PACKAGE -DDEBUG -module-cache-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/ModuleCache
/usr/bin/swiftc -module-name Airframe -incremental -emit-dependencies -emit-module -emit-module-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.swiftmodule -output-file-map /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/output-file-map.json -parse-as-library -c /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Math.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Matrix2.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Matrix3.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Matrix4.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Packable.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Size.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Vec2.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Vec3.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Vec4.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Device.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Instance.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/PhysicalDevice.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/PresentQueueInfo.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Renderer.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Surface.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Swapchain.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Scene/CubeDemo.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Scene/Window/WaylandWSIWindow.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Scene/Window/Window.swift -I /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug -swift-version 4.2 -enable-batch-mode -target x86_64-unknown-linux -sdk / -Onone -g -enable-testing -j4 -DSWIFT_PACKAGE -DDEBUG -Xcc -fmodule-map-file=/home/ryan/Projects/Develop/Spitfire/Sources/CWaylandClient/module.modulemap -Xcc -fmodule-map-file=/home/ryan/Projects/Develop/Spitfire/Sources/CVulkan/module.modulemap -module-cache-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/ModuleCache
/usr/bin/swiftc -module-name Merlin -incremental -emit-dependencies -emit-module -emit-module-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Merlin.swiftmodule -output-file-map /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Merlin.build/output-file-map.json -parse-as-library -c /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/MailWatcher/MailWatcher.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Maildir/Maildir.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Maildir/MaildirReader.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Maildir/RFC6154.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Merlin.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/RFC822/MailParser.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/RFC822/RFC5322.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Search/Notmuch.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/System/FSEvents-Darwin.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/System/FSEvents-Linux.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/System/FSEvents.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/System/FileHandle+TextOutputStream.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/System/MerlinError.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Types/MailAddress.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Types/MailPart.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Types/Message.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Types/MessageHeader.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Types/Thread.swift /home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Utilities/StreamReader.swift -I /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug -swift-version 4.2 -enable-batch-mode -target x86_64-unknown-linux -sdk / -Onone -g -enable-testing -j4 -DSWIFT_PACKAGE -DDEBUG -Xcc -fmodule-map-file=/home/ryan/Projects/Develop/Spitfire/Sources/Cnotmuch/module.modulemap -module-cache-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/ModuleCache
/home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Maildir/Maildir.swift:61:13: warning: variable 'messages' was never mutated; consider changing to 'let' constant
var messages: [URL] = []
~~~ ^
let
/home/ryan/Projects/Develop/Spitfire/Sources/Merlin/Merlin.swift:76:18: warning: replace with notmuch
#warning("replace with notmuch")
^~~~~~~~~~~~~~~~~~~~~~
/home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Swapchain.swift:79:13: warning: variable 'swapchainPresentMode' was never mutated; consider changing to 'let' constant
var swapchainPresentMode = VK_PRESENT_MODE_FIFO_KHR
~~~ ^
let
swift: /builddir/build/BUILD/swift-source/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h:187: unsigned int clang::CodeGen::CGRecordLayout::getLLVMFieldNo(const clang::FieldDecl *) const: Assertion `FieldInfo.count(FD) && "Invalid field for record!"' failed.
/usr/bin/swift[0x3b0856f]
/usr/bin/swift[0x3b06972]
/usr/bin/swift[0x3b08882]
/lib64/libpthread.so.0(+0x13030)[0x7f348be1f030]
/lib64/libc.so.6(gsignal+0x10f)[0x7f348b8a053f]
/lib64/libc.so.6(abort+0x127)[0x7f348b88a895]
/lib64/libc.so.6(+0x22769)[0x7f348b88a769]
/lib64/libc.so.6(+0x309f6)[0x7f348b8989f6]
/usr/bin/swift[0x7580cf]
/usr/bin/swift[0x758474]
/usr/bin/swift[0x74390b]
/usr/bin/swift[0x74e494]
/usr/bin/swift[0x7407b1]
/usr/bin/swift[0x74873a]
/usr/bin/swift[0x790dd4]
/usr/bin/swift[0x78df1d]
/usr/bin/swift[0x794331]
/usr/bin/swift[0x7843d5]
/usr/bin/swift[0x74033c]
/usr/bin/swift[0x740f96]
/usr/bin/swift[0x6e9e3c]
/usr/bin/swift[0x6e8b93]
/usr/bin/swift[0x6fc620]
/usr/bin/swift[0x75a315]
/usr/bin/swift[0x75935e]
/usr/bin/swift[0x7908cc]
/usr/bin/swift[0x78a69e]
/usr/bin/swift[0x7843d5]
/usr/bin/swift[0x74033c]
/usr/bin/swift[0x7402f0]
/usr/bin/swift[0x7c79c4]
/usr/bin/swift[0x7d0850]
/usr/bin/swift[0x8125a0]
/usr/bin/swift[0x825749]
/usr/bin/swift[0x820a55]
/usr/bin/swift[0x81b375]
/usr/bin/swift[0x81a8f9]
/usr/bin/swift[0x6acd04]
/usr/bin/swift[0x5cac42]
/usr/bin/swift[0x5a809f]
/usr/bin/swift[0x5a84a3]
/usr/bin/swift[0x4ccaac]
/usr/bin/swift[0x4c83ec]
/usr/bin/swift[0x4831ec]
/lib64/libc.so.6(__libc_start_main+0xf3)[0x7f348b88c413]
/usr/bin/swift[0x48141e]
Stack dump:
0. Program arguments: /usr/bin/swift -frontend -c /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Math.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Matrix2.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Matrix3.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Matrix4.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Packable.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Size.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Vec2.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Vec3.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Core/Vec4.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Device.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Instance.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/PhysicalDevice.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/PresentQueueInfo.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Renderer.swift /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Surface.swift -primary-file /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Renderer/Swapchain.swift -primary-file /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Scene/CubeDemo.swift -primary-file /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Scene/Window/WaylandWSIWindow.swift -primary-file /home/ryan/Projects/Develop/Spitfire/Sources/Airframe/Scene/Window/Window.swift -emit-module-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Swapchain~partial.swiftmodule -emit-module-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/CubeDemo~partial.swiftmodule -emit-module-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/WaylandWSIWindow~partial.swiftmodule -emit-module-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Window~partial.swiftmodule -emit-module-doc-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Swapchain~partial.swiftdoc -emit-module-doc-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/CubeDemo~partial.swiftdoc -emit-module-doc-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/WaylandWSIWindow~partial.swiftdoc -emit-module-doc-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Window~partial.swiftdoc -emit-dependencies-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Swapchain.d -emit-dependencies-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/CubeDemo.d -emit-dependencies-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/WaylandWSIWindow.d -emit-dependencies-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Window.d -emit-reference-dependencies-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Swapchain.swiftdeps -emit-reference-dependencies-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/CubeDemo.swiftdeps -emit-reference-dependencies-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/WaylandWSIWindow.swiftdeps -emit-reference-dependencies-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Window.swiftdeps -target x86_64-unknown-linux -disable-objc-interop -sdk / -I /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug -enable-testing -g -module-cache-path /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/ModuleCache -swift-version 4.2 -Onone -D SWIFT_PACKAGE -D DEBUG -Xcc -fmodule-map-file=/home/ryan/Projects/Develop/Spitfire/Sources/CWaylandClient/module.modulemap -Xcc -fmodule-map-file=/home/ryan/Projects/Develop/Spitfire/Sources/CVulkan/module.modulemap -parse-as-library -module-name Airframe -o /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Renderer/Swapchain.swift.o -o /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Scene/CubeDemo.swift.o -o /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Scene/Window/WaylandWSIWindow.swift.o -o /home/ryan/Projects/Develop/Spitfire/.build/x86_64-unknown-linux/debug/Airframe.build/Scene/Window/Window.swift.o
1. //usr/include/wayland-client-protocol.h:1087:1: Generating code for declaration 'wl_registry_bind'
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment