代码之家  ›  专栏  ›  技术社区  ›  Jan

Swift 4+Xcode 10编译器崩溃“silmoduletransform”强制编译

  •  1
  • Jan  · 技术社区  · 6 年前

    我打开了一个项目,这个项目曾经在Xcode10b的Xcode10中编译得很好,现在当我用一个神秘的错误消息编译时,我得到了这个崩溃。知道会是什么吗?

    CompileSwift normal arm64 /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/PEKit.swift (in target: PEKit)
        cd /Users/jan/xworkspace/aeronav-map/PEKit
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Services/StatusService.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Models/Status.swift -primary-file /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/PEKit.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Network/StatusParser.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Models/FlightPlan.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Models/Controller.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Models/Frequency.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Extensions/String+FlightPlan.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Models/Pilot.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Network/PEClient.swift -emit-module-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit~partial.swiftmodule -emit-module-doc-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit~partial.swiftdoc -serialize-diagnostics-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit.dia -emit-dependencies-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit.d -emit-reference-dependencies-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit.swiftdeps -target arm64-apple-ios10.3 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -I /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Products/Debug-iphoneos -F /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Products/Debug-iphoneos -F /Users/jan/xworkspace/aeronav-map/PEKit/Carthage/Build/iOS -enable-testing -g -import-underlying-module -module-cache-path /Users/jan/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -serialize-debugging-options -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/PEKit-generated-files.hmap -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/PEKit-own-target-headers.hmap -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/PEKit-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/PEKit-project-headers.hmap -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Products/Debug-iphoneos/include -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/DerivedSources/arm64 -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/jan/xworkspace/aeronav-map/PEKit -module-name PEKit -o /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit.o -index-store-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Index/DataStore -index-system-modules
    Source type: $Data
    Destination type: $*Data
    0  swift                    0x000000010d7d464a PrintStackTraceSignalHandler(void*) + 42
    1  swift                    0x000000010d7d3dfe SignalHandler(int) + 302
    2  libsystem_platform.dylib 0x00007fff64e82b3d _sigtramp + 29
    3  libsystem_platform.dylib 0x00007ffee6221698 _sigtramp + 2168056696
    4  swift                    0x000000010a588e71 swift::devirtualizeClassMethod(swift::FullApplySite, swift::SILValue, swift::OptRemark::Emitter*) + 3841
    5  swift                    0x000000010a58af91 swift::tryDevirtualizeApply(swift::ApplySite, swift::ClassHierarchyAnalysis*, swift::OptRemark::Emitter*) + 2417
    6  swift                    0x000000010a6bf943 runOnFunctionRecursively(swift::SILFunction*, swift::FullApplySite, llvm::DenseSet<swift::SILFunction*, llvm::DenseMapInfo<swift::SILFunction*> >&, llvm::ImmutableSet<swift::SILFunction*, llvm::ImutContainerInfo<swift::SILFunction*> >::Factory&, llvm::ImmutableSet<swift::SILFunction*, llvm::ImutContainerInfo<swift::SILFunction*> >, swift::ClassHierarchyAnalysis*) + 7459
    7  swift                    0x000000010a6bd803 (anonymous namespace)::MandatoryInlining::run() + 339
    8  swift                    0x000000010a6456fd swift::SILPassManager::execute() + 5565
    9  swift                    0x000000010a64902b swift::runSILDiagnosticPasses(swift::SILModule&) + 2331
    10 swift                    0x0000000109a64cc3 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 35331
    11 swift                    0x0000000109a58dc5 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7717
    12 swift                    0x00000001099fea35 main + 1349
    13 libdyld.dylib            0x00007fff64c99085 start + 1
    Stack dump:
    0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Services/StatusService.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Models/Status.swift -primary-file /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/PEKit.swift -primary-file /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Network/StatusParser.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Models/FlightPlan.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Models/Controller.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Models/Frequency.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Extensions/String+FlightPlan.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Models/Pilot.swift /Users/jan/xworkspace/aeronav-map/PEKit/PEKit/Network/PEClient.swift -emit-module-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit~partial.swiftmodule -emit-module-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/StatusParser~partial.swiftmodule -emit-module-doc-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit~partial.swiftdoc -emit-module-doc-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/StatusParser~partial.swiftdoc -serialize-diagnostics-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit.dia -serialize-diagnostics-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/StatusParser.dia -emit-dependencies-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit.d -emit-dependencies-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/StatusParser.d -emit-reference-dependencies-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit.swiftdeps -emit-reference-dependencies-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/StatusParser.swiftdeps -target arm64-apple-ios10.3 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -I /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Products/Debug-iphoneos -F /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Products/Debug-iphoneos -F /Users/jan/xworkspace/aeronav-map/PEKit/Carthage/Build/iOS -enable-testing -g -import-underlying-module -module-cache-path /Users/jan/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -serialize-debugging-options -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/PEKit-generated-files.hmap -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/PEKit-own-target-headers.hmap -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/PEKit-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/PEKit-project-headers.hmap -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Products/Debug-iphoneos/include -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/DerivedSources/arm64 -Xcc -I/Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/jan/xworkspace/aeronav-map/PEKit -module-name PEKit -o /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/PEKit.o -o /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Build/Intermediates.noindex/PEKit.build/Debug-iphoneos/PEKit.build/Objects-normal/arm64/StatusParser.o -index-store-path /Users/jan/Library/Developer/Xcode/DerivedData/PEKit-exwuxrtigjghhygevkcuhdtkkpkd/Index/DataStore -index-system-modules
    1.  While running pass #99 SILModuleTransform "MandatoryInlining".
    error: Illegal instruction: 4
    
    1 回复  |  直到 6 年前
        1
  •  3
  •   Jan    6 年前

    我通过重新编译二进制文件解决了这个问题。 .framework 是用以前版本的xcode编译的

    推荐文章