1024jp / GzipSwift

Swift package that enables gzip/gunzip Data using zlib
MIT License
544 stars 134 forks source link

xCode 9 crash when exporting with "rebuild from bitcode" enabled #20

Closed rotemitz closed 5 years ago

rotemitz commented 7 years ago

Hi,

I'm using your great library for a while now without any issues :) Since updating to xCode 9 last week, every time i try to export an archived enabling "rebuild from bitcode" option, xCode crash. When trying to do the same using fastlane the script gets an exception as well. While searching the export logs for the problem, it looks like GzipSwift has some issue with "symbol(s) not found for architecture armv7".

This is the exception in the log: { code = 646; description = "ipatool failed with an exception: #<CmdSpec::NonZeroExcitException: /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool exited with pid 13854 exit 1\nStdout:\n Debug: SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk\n Debug: PATH: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin', '/Applications/Xcode.app/Contents/Developer/usr/bin']\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo\n MachoInfo: cd /\n \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo\" \"-info\" \"/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/Gzip.framework/Gzip\" \n -= Output =-\n Non-fat file: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/Gzip.framework/Gzip is architecture: armv7\n Exited with 0\n \n Debug: Command took 0 seconds\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump\n GetUUID: cd /\n \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump\" \"-u\" \"/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/Gzip.framework/Gzip\" \n -= Output =-\n UUID: DB27237B-554D-30A9-B96F-BF00016E884F (armv7) /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/Gzip.framework/Gzip\n Exited with 0\n \n Debug: Command took 0 seconds\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit\n ExtractXAR: cd /\n \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit\" \"/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/Gzip.framework/Gzip\" \"-extract\" \"LLVM\" \"bundle\" \"/var/folders/v9/cldk77946531cp83qy1842w0000gn/T/GzipPB8ke/Gzip.armv7.xar\" \n -= Output =-\n Exited with 0\n \n Debug: Command took 0 seconds\n Debug: Bitcode bundle version: 1.0\n Debug: Setting platform to: iPhoneOS\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang\n Swift: cd /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/tempvzSIsU\n \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc\" \"-frontend\" \"-emit-object\" \"-target\" \"armv7-apple-ios8.0\" \"-O\" \"-module-name\" \"Gzip\" \"-disable-llvm-optzns\" \"1.bc\" \"-o\" \"1.o\" \n -= Output =-\n Exited with 0\n \n Debug: Command took 0 seconds\n Clang: cd /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/tempvzSIsU\n \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang\" \"-cc1\" \"-triple\" \"thumbv7-apple-ios8.0.0\" \"-emit-obj\" \"-disable-llvm-passes\" \"-target-abi\" \"apcs-gnu\" \"-mfloat-abi\" \"soft\" \"-Os\" \"-x\" \"ir\" \"2\" \"-o\" \"2.o\" \n -= Output =-\n Exited with 0\n \n Debug: Command took 0 seconds\n Clang: cd /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/tempvzSIsU\n \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang\" \"-cc1\" \"-triple\" \"thumbv7-apple-ios4.3.0\" \"-emit-obj\" \"-disable-llvm-passes\" \"-target-abi\" \"apcs-gnu\" \"-mfloat-abi\" \"soft\" \"-Os\" \"-x\" \"ir\" \"3\" \"-o\" \"3.o\" \n -= Output =-\n Exited with 0\n \n Debug: Command took 0 seconds\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libz.1.tbd\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libobjc.A.tbd\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libSystem.B.tbd\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libobjc.A.tbd\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftCore.dylib\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftCoreFoundation.dylib\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftDarwin.dylib\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftDispatch.dylib\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftFoundation.dylib\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftObjectiveC.dylib\n error: Ld: cd /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/tempvzSIsU\n \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld\" \"-arch\" \"armv7\" \"-dylib\" \"-compatibility_version\" \"1.0.0\" \"-current_version\" \"1.0.0.0.0\" \"-install_name\" \"@rpath/Gzip.framework/Gzip\" \"-ios_version_min\" \"8.0.0\" \"-rpath\" \"@executable_path/Frameworks\" \"-rpath\" \"@loader_path/Frameworks\" \"-dead_strip\" \"-application_extension\" \"-syslibroot\" \"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk\" \"-sdk_version\" \"11.0.0\" \"-filelist\" \"/private/var/folders/v9/cldk77946531cp83qy1842w0000gn/T/GzipPB8ke/Gzip.armv7.out.LinkFileList\" \"-ignore_auto_link\" \"-allow_dead_duplicates\" \"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libz.1.tbd\" \"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd\" \"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libobjc.A.tbd\" \"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libSystem.B.tbd\" \"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd\" \"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libobjc.A.tbd\" \"/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftCore.dylib\" \"/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftCoreFoundation.dylib\" \"/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftDarwin.dylib\" \"/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftDispatch.dylib\" \"/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftFoundation.dylib\" \"/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftObjectiveC.dylib\" \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.ios.a\" \"-o\" \"/private/var/folders/v9/cldk77946531cp83qy1842w0000gn/T/GzipPB8ke/Gzip.armv7.out\" \n -= Output =-\n Undefined symbols for architecture armv7:\n \"_llvm_profile_runtime\", referenced from:\n hidden#64_ in 1.o\n ld: symbol(s) not found for architecture armv7\n Exited with 1\n \n \n error: Failed to compile bundle: /var/folders/v9/cldk77946531cp83qy1842w0000gn/T/GzipPB8ke/Gzip.armv7.xar\n \n\nStderr:\n>\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:209:in run'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2178:inblock in CompileOrStripBitcodeInBundle'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2130:in each'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2130:inCompileOrStripBitcodeInBundle'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2314:in ProcessIPA'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2929:in

'"; info = { }; level = ERROR; type = exception; }

When disabling bitcode recompile everything works fine

1024jp commented 5 years ago

Support bitcode on 4.1.0