Good afternoon, I’m trying to build a Telegram project.
When I try to build the project I get the following error.
MacOS 12.1
Xcode 13.3 (13E113)
Bazel 5.0.0
m1
For assembly I use the official readme Git with this script:
python3 build-system/Make/Make.py
--cacheDir="$HOME/telegram-bazel-cache"
build
--configurationPath="$HOME/telegram-configuration"
--buildNumber=100001
--configuration=release_universal
I understand that the error starts with this line, the necessary files are not created, but why?
Warning: /Users/igrssv/Telegram-iOS/build-input/bazel-5.0.0-x86_64: No such
It can’t install the right version of Bazel according to the line in Make.py?
Full text of the error:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file
Warning: /Users/igrssv/Telegram-iOS/build-input/bazel-5.0.0-x86_64: No such
Warning: file or directory
100 9 100 9 0 0 33 0 --:--:-- --:--:-- --:--:-- 34
curl: (23) Failure writing output to destination
Traceback (most recent call last):
File "/Users/igrssv/Telegram-iOS/build-system/Make/Make.py", line 638, in <module>
bazel_path = locate_bazel(base_path=os.getcwd())
File "/Users/igrssv/Telegram-iOS/build-system/Make/BazelLocation.py", line 17, in locate_bazel
call_executable([
File "/Users/igrssv/Telegram-iOS/build-system/Make/BuildEnvironment.py", line 60, in call_executable
subprocess.check_call(resolved_arguments, env=resolved_env)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/curl', '-L', 'https://github.com/bazelbuild/bazel/releases/download/5.0.0/bazel-5.0.0-x86_64', '--output', '/Users/igrssv/Telegram-iOS/build-input/bazel-5.0.0-x86_64']' returned non-zero exit status 23.
2
Answers
create build-input and try again
The first time you install and download, there will be a security prompt. I tried to download manually, and after executing the command, in the system security settings, clicked to open
As of late March, 2022, there are several bugs in the latest commit (
702f254
) of Telegram iOS:build-input
is not automatically created:mkdir build-input
Downloading script of Bazel has bugs sometimes:
The latest push has a dependency bug. Please
git checkout 2a32c8718
About one week ago, I wrote a blog post about it: https://blog.wildcat.io/2022/03/build-and-debug-telegram-ios/