我正在尝试为我的模拟器构建最新的Telegram IOS应用程序,但我遇到了python错误。我已经按照下面提到的所有步骤进行了操作,并安装了Bazel和yasm https://github.com/TelegramMessenger/Telegram-iOS
我已经用Telegram 7.6和7.8试过了,性能是一样的。有人能帮帮忙吗?
bazel --version
bazel 4.1.0-homebrew
yasm --version
yasm 1.3.0当我尝试生成XCode项目时,
python3 build-system/Make/Make.py \
--bazel="$HOME/bazel-dist/bazel" \
--cacheDir="$HOME/telegram-bazel-cache" \
generateProject \
--configurationPath="$HOME/telegram-configuration" \
--disableExtensions \
--disableProvisioningProfiles我看到了这个错误
Traceback (most recent call last):
File "build-system/Make/Make.py", line 560, in <module>
generate_project(arguments=args)
File "build-system/Make/Make.py", line 339, in generate_project
bazel_command_line = BazelCommandLine(
File "build-system/Make/Make.py", line 16, in __init__
self.build_environment = BuildEnvironment(
File "/Users/srcomp1/Downloads/Telegram-iOS-release-7.6/build-system/Make/BuildEnvironment.py", line 123, in __init__
actual_bazel_version = get_bazel_version(self.bazel_path)
File "/Users/srcomp1/Downloads/Telegram-iOS-release-7.6/build-system/Make/BuildEnvironment.py", line 66, in get_bazel_version
command_result = run_executable_with_output(bazel_path, ['--version']).strip('\n')
File "/Users/srcomp1/Downloads/Telegram-iOS-release-7.6/build-system/Make/BuildEnvironment.py", line 36, in run_executable_with_output
process = subprocess.Popen(
File "/Users/srcomp1/Downloads/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/srcomp1/Downloads/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/Users/srcomp1/bazel-dist/bazel'发布于 2021-07-03 22:24:29
这个问题是因为系统无法链接下载的Bazel来构建按照ReadMe指令下载的submodules.The bazel不能在我的XCode版本中工作。
通过下面的链接重新安装bazel会有所帮助
https://docs.bazel.build/versions/4.1.0/install-os-x.html
https://stackoverflow.com/questions/68153604
复制相似问题