在启用位码的情况下导出时出错(对于体系结构armv7未找到符号) [英] Error while exporting with Bitcode enabled (symbol not found for architecture armv7)

查看:167
本文介绍了在启用位码的情况下导出时出错(对于体系结构armv7未找到符号)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相当老的项目,其最低部署目标设置为iOS 8.4。出于技术原因,必须启用位码 。项目可以正常构建并运行。但是,当尝试导出存档的版本时,出现了问题。我正在使用Xcode 8.2.1。

I have a fairly old project with a minimum deployment target set to iOS 8.4. For technical reasons bitcode must be enabled. The project builds and runs fine. When trying to export an archived build however, things go wrong. I am using Xcode 8.2.1.

当我创建一个测试版本(使用企业证书签名)时,选项为从位码重建后,导出将在编译位码的阶段失败。

When I create a test build (signed with Enterprise certificate) with the option Rebuild from bitcode enabled, the export fails at the stage when it is compiling bitcode.

以下是日志的相关部分:

Here is the relevant part of the log:

"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/lib/darwin/libclang_rt.ios.a" "-o" "/private/var/folders/qy/cgq_nq7x2tx1j3z__7f4yx100000gn/T/<redacted target name>WX9bPu/<redacted target name>.armv7.out" 
    -= Output =-
    Undefined symbols for architecture armv7:
      "_llvm_gcov_init", referenced from:
          __hidden#2_ in 001.o
          __hidden#3_ in 001.o
          __hidden#4_ in 001.o
          __hidden#5_ in 001.o
          __hidden#6_ in 001.o
          __hidden#7_ in 001.o
          __hidden#8_ in 001.o
          ...
      "_llvm_gcda_end_file", referenced from:
          __hidden#0_ in 001.o
          __hidden#0_ in 002.o
          __hidden#0_ in 003.o
          __hidden#0_ in 004.o
          __hidden#0_ in 005.o
          __hidden#0_ in 006.o
          __hidden#0_ in 007.o
          ...
      "_llvm_gcda_emit_function", referenced from:
          __hidden#0_ in 001.o
          __hidden#0_ in 002.o
          __hidden#0_ in 004.o
          __hidden#0_ in 005.o
          __hidden#0_ in 006.o
          __hidden#0_ in 007.o
          __hidden#0_ in 008.o
          ...
      "_llvm_gcda_emit_arcs", referenced from:
          __hidden#0_ in 001.o
          __hidden#0_ in 002.o
          __hidden#0_ in 004.o
          __hidden#0_ in 005.o
          __hidden#0_ in 006.o
          __hidden#0_ in 007.o
          __hidden#0_ in 008.o
          ...
      "_llvm_gcda_start_file", referenced from:
          __hidden#0_ in 001.o
          __hidden#0_ in 002.o
          __hidden#0_ in 003.o
          __hidden#0_ in 004.o
          __hidden#0_ in 005.o
          __hidden#0_ in 006.o
          __hidden#0_ in 007.o
          ...
      "_llvm_gcda_summary_info", referenced from:
          __hidden#0_ in 001.o
          __hidden#0_ in 002.o
          __hidden#0_ in 003.o
          __hidden#0_ in 004.o
          __hidden#0_ in 005.o
          __hidden#0_ in 006.o
          __hidden#0_ in 007.o
          ...
    ld: symbol(s) not found for architecture armv7
    Exited with 1


    error: Failed to compile bundle: /var/folders/qy/cgq_nq7x2tx1j3z__7f4yx100000gn/T/<redacted target name>WX9bPu/<redacted target name>.armv7.xar


Stderr:
>
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:202:in `run'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1987:in `block in CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1944:in `each'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1944:in `CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2119:in `ProcessIPA'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2687:in `<main>'";
            info =             {
            };
            level = ERROR;
            type = exception;
        }
    );
    thinnableAssetCatalogs =     (
        "/var/folders/qy/cgq_nq7x2tx1j3z__7f4yx100000gn/T/XcodeDistPipeline.hn6/Root/Payload/<redacted target name>.app/Assets.car"
    );
}
2017-03-31 12:21:37 +0000 [MT] Exporting using IDEDistributionPackageExportStep
2017-03-31 12:21:58 +0000 [MT] Canceled distribution assistant

当我禁用从位码重建时,导出成功,并且生成的结果运行良好。但是,当将构建版本提交到iTunes Connect时,这会给您带来麻烦。

When I disable Rebuild from bitcode, the export is successful and the resulting build runs fine. I'm afraid this will give problems when the build will be submitted to iTunes Connect however.

有人知道为什么会出现此错误以及如何解决此错误吗?我有点不知所措。

Does anyone have a clue why this error occurs and how to fix this? I'm a bit at a loss here.

要说明:是的,在目标级别启用了位码。以下是链接的库:

To clarify: yes, bitcode is enabled at the target level. Here are the linked libraries:

这些是依赖项:

# Reporting
pod 'Fabric'
pod 'Crashlytics'
pod 'GoogleAnalytics'
pod 'CocoaLumberjack', '~> 1.6.2'

# Networking
pod 'AFNetworking', '~> 2.6.3'
pod 'RestKit', '~> 0.27'
pod 'Reachability'

# Other
pod 'UIColor-Utilities', '~> 1.0.1'
pod 'ViewDeck', '~> 2.4'
pod 'SDWebImage', '~> 3.7.0'
pod 'AMRatingControl', '~> 1.3.0'


推荐答案

Sven Drielecker (及其他)的有用建议,此问题已得到解决。

After some trial and error and by the helpful suggestions by Sven Drielecker (and others) the issue has ben fixed.

对于调试 GCC_INSTRUMENT_PROGRAM_FLOW_ARCS 的构建设置均设置为 YES 。 strong>发布版本。将其关闭以进行发布已解决了该问题。

The GCC_INSTRUMENT_PROGRAM_FLOW_ARCS build setting was set to YES for both debug and release builds. Turning it off for release has fixed the issue.

这篇关于在启用位码的情况下导出时出错(对于体系结构armv7未找到符号)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆