5 Replies
      Latest reply on Jul 20, 2019 12:44 AM by bartvk
      bartvk Level 1 Level 1 (0 points)

        I've got a framework project with mixed Objective-C and Swift code. When archiving this project with Xcode 11 beta 4, I'm getting multiple errors that start with "Could not find or use auto-linked library". The full error stack is:

         

        Ld /Users/bartvk/Library/Developer/Xcode/DerivedData/Connect-bofdyopfqudfrrfrdzcxywnzzqvt/Build/Intermediates.noindex/ArchiveIntermediates/Connect/IntermediateBuildFilesPath/Connect.build/Release-iphoneos/Connect.build/Objects-normal/armv7/Binary/Connect normal armv7 (in target 'Connect' from project 'Connect')
            cd /Users/bartvk/Projects/Connect
            /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target armv7-apple-ios9.3 -dynamiclib -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk -L/Users/bartvk/Library/Developer/Xcode/DerivedData/Connect-bofdyopfqudfrrfrdzcxywnzzqvt/Build/Intermediates.noindex/ArchiveIntermediates/Connect/BuildProductsPath/Release-iphoneos -F/Users/bartvk/Library/Developer/Xcode/DerivedData/Connect-bofdyopfqudfrrfrdzcxywnzzqvt/Build/Intermediates.noindex/ArchiveIntermediates/Connect/BuildProductsPath/Release-iphoneos -filelist /Users/bartvk/Library/Developer/Xcode/DerivedData/Connect-bofdyopfqudfrrfrdzcxywnzzqvt/Build/Intermediates.noindex/ArchiveIntermediates/Connect/IntermediateBuildFilesPath/Connect.build/Release-iphoneos/Connect.build/Objects-normal/armv7/Connect.LinkFileList -install_name @rpath/Connect.framework/Connect -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/bartvk/Library/Developer/Xcode/DerivedData/Connect-bofdyopfqudfrrfrdzcxywnzzqvt/Build/Intermediates.noindex/ArchiveIntermediates/Connect/IntermediateBuildFilesPath/Connect.build/Release-iphoneos/Connect.build/Objects-normal/armv7/Connect_lto.o -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/bartvk/Library/Developer/Xcode/DerivedData/Connect-bofdyopfqudfrrfrdzcxywnzzqvt/Build/Intermediates.noindex/ArchiveIntermediates/Connect/BuildProductsPath/Release-iphoneos -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/bartvk/Library/Developer/Xcode/DerivedData/Connect-bofdyopfqudfrrfrdzcxywnzzqvt/Build/Intermediates.noindex/ArchiveIntermediates/Connect/IntermediateBuildFilesPath/Connect.build/Release-iphoneos/Connect.build/Objects-normal/armv7/Connect.swiftmodule -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/bartvk/Library/Developer/Xcode/DerivedData/Connect-bofdyopfqudfrrfrdzcxywnzzqvt/Build/Intermediates.noindex/ArchiveIntermediates/Connect/IntermediateBuildFilesPath/Connect.build/Release-iphoneos/Connect.build/Objects-normal/armv7/Connect_dependency_info.dat -o /Users/bartvk/Library/Developer/Xcode/DerivedData/Connect-bofdyopfqudfrrfrdzcxywnzzqvt/Build/Intermediates.noindex/ArchiveIntermediates/Connect/IntermediateBuildFilesPath/Connect.build/Release-iphoneos/Connect.build/Objects-normal/armv7/Binary/Connect
        
        ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
        ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
        ld: warning: Could not find or use auto-linked library 'swiftFoundation'
        ld: warning: Could not find or use auto-linked library 'swiftsimd'
        ld: warning: Could not find or use auto-linked library 'swiftMetal'
        ld: warning: Could not find or use auto-linked library 'swiftDarwin'
        ld: warning: Could not find or use auto-linked library 'swiftUIKit'
        ld: warning: Could not find or use auto-linked library 'swiftQuartzCore'
        ld: warning: Could not find or use auto-linked library 'swiftCore'
        ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
        ld: warning: Could not find or use auto-linked library 'swiftDispatch'
        ld: warning: Could not find or use auto-linked library 'swiftAVFoundation'
        ld: warning: Could not find or use auto-linked library 'swiftCoreMedia'
        ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
        ld: warning: Could not find or use auto-linked library 'swiftCoreAudio'
        Undefined symbols for architecture armv7:
          "type metadata for Swift.AnyObject", referenced from:
              generic specialization <__C.UITouch> of Swift.Set.subscript.getter : (Swift.Set.Index) -> A in
        

         

        And then about 100 errors follow, that seem to be related to the above. Note that compiling works, it's that archiving doesn't. Under Xcode 10.2.1, archiving is entirely possible. Deleting the DerivedData folder doesn't help. In Build Settings, there's a setting Valid Architectures, and its default value is "arm64 arm64e armv7 armv7s". If I edit this value to only include armv7s, then Xcode can Archive this project.

         

        Why is this, and what am I missing if I don't include armv7?