Open swift-ci opened 2 years ago
This is not reproducible for me with swift-DEVELOPMENT-SNAPSHOT-2022-01-09-a-osx. I'm getting these error messages when trying to build the archive from attachments:
SwiftGLib/Sources/GLib/GLib-2.0-constants.swift:706:31: error: cannot find 'G_VA_COPY_AS_ARRAY' in scope
public let VA_COPY_AS_ARRAY = G_VA_COPY_AS_ARRAY // 1
^\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
swift --version shows this with that snapshot:
Apple Swift version 5.6-dev (LLVM 7b20e61dd04138a, Swift 9438cf6b2e83c5f)
Target: arm64-apple-macosx11.0
Comment by Rene Hexel (JIRA)
The auto-generated Glib-2.0-*.swift files are for the corresponding x86_64 .gir files, so I would not expect them to work out of the box on arm64. I don't have an arm64 Mac, but this should be reproducible on an Intel Mac.
If you wanted to try and reproduce this on arm64, these would be the steps to take (but YMMV as glib and the generated files would most likely be different):
brew install glib gobject-introspection
cd SwiftGLib
./distclean.sh
./run-gir2swift.sh
swift build
Thanks, with these steps it builds successfully for me with both Xcode 13.2.1 and swift-DEVELOPMENT-SNAPSHOT-2022-01-09-a. The latest 5.6 snapshot from swift.org is unfortunately broken for me, not with SwiftGLib, but for any purposes with unrelated errors, so I couldn't try that.
Comment by Rene Hexel (JIRA)
I did some more digging and have attached a minimal example (VAListPointer.zip) that reproduces this. This builds fine for any Xcode versions of Swift (including 5.6 from the latest beta), but crashes with the latest snapshots for both trunk and 5.6 (i.e. swift-DEVELOPMENT-SNAPSHOT-2022-01-09-a and swift-5.6-DEVELOPMENT-SNAPSHOT-2022-01-11-a).
The problem goes away when I replace UnsafeMutablePointer
With swift-DEVELOPMENT-SNAPSHOT-2022-01-09-a for x86_64, i.e.
Apple Swift version 5.6-dev (LLVM 7b20e61dd04138a, Swift 9438cf6b2e83c5f) Target: x86_64-apple-macosx12.0
I get the following crash/backtrace for the VAListPointer package example:
$ swift build Building for debugging... Failed to reconstruct type for $sSpySo13__va_list_tagVGSgD Original type: (bound_generic_enum_type decl=Swift.(file).Optional (bound_generic_struct_type decl=Swift.(file).UnsafeMutablePointer (struct_type decl=ObjC.(file).va_list_tag))) Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace. Stack dump:
LLVM_SYMBOLIZER_PATH
to point to it):
0 swift-frontend 0x000000010dd314c7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1 swift-frontend 0x000000010dd306e5 llvm::sys::RunSignalHandlers() + 85
2 swift-frontend 0x000000010dd31b00 SignalHandler(int) + 288
3 libsystem_platform.dylib 0x00007ff80220ae2d _sigtramp + 29
4 libsystem_platform.dylib 0x000000000000001b _sigtramp + 18446603370545238539
5 libsystem_c.dylib 0x00007ff802141d10 abort + 123
6 swift-frontend 0x000000010de4d611 (anonymous namespace)::IRGenDebugInfoImpl::getOrCreateType(swift::irgen::DebugTypeInfo) (.cold.8) + 113
7 swift-frontend 0x00000001092dce06 (anonymous namespace)::IRGenDebugInfoImpl::getOrCreateType(swift::irgen::DebugTypeInfo) + 4726
8 swift-frontend 0x00000001092dd57d (anonymous namespace)::IRGenDebugInfoImpl::createParameterType(llvm::SmallVectorImpl<llvm::Metadata*>&, swift::SILType) + 125
9 swift-frontend 0x00000001092dd39a (anonymous namespace)::IRGenDebugInfoImpl::createParameterTypes(swift::CanTypeWrapper
Attachment: Download
Environment
`Darwin Kernel Version 21.3.0: Mon Jan 3 23:49:26 PST 2022; root:xnu-8019.80.24~15/RELEASE_X86_64 x86_64` `Apple Swift version 5.6-dev (LLVM 64a4d678f114158, Swift 8ae983c3480462b)` `Target: x86_64-apple-macosx12.0` `glib-2.70.2` (installed via `brew install glib`)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 1 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 0268cd20d5fb23438d0cfd4a3226b4ddIssue Description:
Trying to run
swift build
with the January 11 macOS snapshot for 5.6 crashes with the following output: