gpt4 book ai didi

ios - 在启用 Bitcode 的情况下导出时出错(找不到体系结构 armv7 的符号)

转载 作者:可可西里 更新时间:2023-11-01 03:19:10 30 4
gpt4 key购买 nike

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

当我创建测试版本(使用企业证书签名)并启用选项 Rebuild from bitcode 时,导出在编译 bitcode 阶段失败。

Screenshot bitcode setting

Screenshot export error

这是日志的相关部分:

"/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

当我禁用 Rebuild from bitcode 时,导出成功并且生成的构建运行良好。然而,当将构建提交到 iTunes Connect 时,恐怕这会带来问题。

有没有人知道为什么会出现这个错误以及如何解决这个问题?我在这里有点不知所措。


编辑:

澄清一下:是的,在目标级别启用了位码。以下是链接库:

Screenshot of 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 的有用建议(和其他人)问题已得到解决。

GCC_INSTRUMENT_PROGRAM_FLOW_ARCS build设置针对调试 发布build设置为YES。将其关闭以发布已解决此问题。

关于ios - 在启用 Bitcode 的情况下导出时出错(找不到体系结构 armv7 的符号),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43141793/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com