Telegram IOS 应用无法使用 XCode 12.4 构建

Telegram IOS app unable to build with XCode 12.4

我正在尝试为我的模拟器构建最新的 Telegram IOS 应用程序,但我得到一个 python error.I 已遵循所有 下面提到的步骤并安装了 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'

问题是因为系统无法 link 下载 Bazel 以构建 submodules.The 根据自述文件说明下载的 Bazel 不适用于我的 python 版本XCode.

从下面这个 link 重新安装挡板有帮助

https://docs.bazel.build/versions/4.1.0/install-os-x.html