Last active
May 21, 2022 03:40
-
-
Save paulz/fa0f952831b68c85fd19ca213826ec52 to your computer and use it in GitHub Desktop.
How to fix python errors from Xcode bitcode-build-tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
cd /Applications/Xcode.app/Contents/Developer/usr/lib/bitcode_build_tool/ | |
sudo patch < ${0:a:h}/buildenv.patch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /Applications/Xcode.app/Contents/Developer/usr/lib/bitcode_build_tool/buildenv.py 2022-01-18 17:32:19.000000000 -0800 | |
+++ /Applications/Xcode.app/Contents/Developer/usr/lib/bitcode_build_tool/buildenv.py 2022-05-13 12:41:23.000000000 -0700 | |
@@ -155,6 +155,7 @@ | |
self.deobfuscator = LogDeobfuscator(args.symbol_map) | |
else: | |
self.deobfuscator = None | |
+ self.sdk = None | |
self.setSDKPath(args.sdk_path) | |
self.logger.debug("SDK path: {}".format(self.sdk)) | |
self.logger.debug("SDK version: {}".format(self.sdk_version)) |
xcodebuild -version
Xcode 13.3.1
Build version 13E500a
example of error this patch can fix:
2022-05-13 09:27:42.919 *** Error: /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool, terminated with status: 2
2022-05-13 09:27:42.919 *** Error: /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool (2): bitcode-build-tool internal error
Traceback (most recent call last):
File "/Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool", line 10, in <module>
bitcode_build_tool_main(sys.argv)
File "/Applications/Xcode.app/Contents/Developer/usr/bin/../lib/bitcode_build_tool/main.py", line 65, in main
env.initState(args)
File "/Applications/Xcode.app/Contents/Developer/usr/bin/../lib/bitcode_build_tool/buildenv.py", line 159, in initState
self.logger.debug("SDK path: {}".format(self.sdk))
AttributeError: 'BuildEnvironment' object has no attribute 'sdk'
Many thanks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/Applications/Xcode.app/Contents/Developer/usr/lib/bitcode_build_tool/buildenv.py