Telegram-iOS icon indicating copy to clipboard operation
Telegram-iOS copied to clipboard

Build Failed

Open cfcor opened this issue 4 years ago • 8 comments

Checklist

  • [x] I am reporting an issue in existing functionality that does not work as intended
  • [x] I've searched for existing GitHub issues

Description

When I build the project, but I met the error. Screen Shot 2022-06-06 at 23 15 47

Actual Behavior

here is the detail information: adeiMac:Telegram-iOS imacroot$ sudo python3 build-system/Make/Make.py \

--cacheDir="$HOME/telegram-bazel-cache" \
generateProject \
--configurationPath="$HOME/telegram-configuration" \
--disableExtensions

Password: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0Warning: Failed to create the file Warning: /Users/imacroot/Documents/telegram/Telegram-iOS/build-input/bazel-5.1. Warning: 0-x86_64: No such file or directory 100 9 100 9 0 0 5 0 0:00:01 0:00:01 --:--:-- 5 curl: (23) Failed writing body (0 != 9) Traceback (most recent call last): File "/Users/imacroot/Documents/telegram/Telegram-iOS/build-system/Make/Make.py", line 718, in bazel_path = locate_bazel(base_path=os.getcwd()) File "/Users/imacroot/Documents/telegram/Telegram-iOS/build-system/Make/BazelLocation.py", line 17, in locate_bazel call_executable([ File "/Users/imacroot/Documents/telegram/Telegram-iOS/build-system/Make/BuildEnvironment.py", line 60, in call_executable subprocess.check_call(resolved_arguments, env=resolved_env) File "/usr/local/Cellar/[email protected]/3.9.4/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.1.0/bazel-5.1.0-x86_64', '--output', '/Users/imacroot/Documents/telegram/Telegram-iOS/build-input/bazel-5.1.0-x86_64']' returned non-zero exit status 23.

Environment

xcode version: 13.1 macos: '11.4'

cfcor avatar Jun 07 '22 03:06 cfcor

@ali-fareed, Can you help me with this problem? thank you!

cfcor avatar Jun 08 '22 07:06 cfcor

Best solution I found is install Bazel and use that custom Bazel installation as it's explained here, but with version 5.1.0 https://swiftobc.com/repo/TelegramMessenger-Telegram-iOS-swift-content

eduhcano avatar Jun 13 '22 17:06 eduhcano

Best solution I found is install Bazel and use that custom Bazel installation as it's explained here, but with version 5.1.0 https://swiftobc.com/repo/TelegramMessenger-Telegram-iOS-swift-content

I just see the same issue, but I didn't find the solution.

cfcor avatar Jun 17 '22 06:06 cfcor

Best solution I found is install Bazel and use that custom Bazel installation as it's explained here, but with version 5.1.0 https://swiftobc.com/repo/TelegramMessenger-Telegram-iOS-swift-content

Thank you. I try to use bazel 5.1.0 and it works!

cfcor avatar Jun 17 '22 08:06 cfcor

I used bazel5.1.0, but I met another issue. Does this mean that python was not initialized successfully, what should I do?

Screen Shot 2022-06-19 at 21 02 59

----------------------here is detail information----------------------------------------------------------

Python path configuration: PYTHONHOME = '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/runner/work/Python-iOS/Python-iOS/kivy-ios/dist/root/python3' PYTHONPATH = '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/runner/work/Python-iOS/Python-iOS/kivy-ios/dist/root/python3' program name = '/usr/local/bin/python3' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = '/usr/local/bin/python3' sys.base_prefix = '/usr/local/bin' sys.base_exec_prefix = '/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/runner/work/Python-iOS/Python-iOS/kivy-ios/dist/root/python3' sys.platlibdir = 'lib' sys.executable = '/usr/local/bin/python3' sys.prefix = '/usr/local/bin' sys.exec_prefix = '/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/runner/work/Python-iOS/Python-iOS/kivy-ios/dist/root/python3' sys.path = [ '/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin', '/Library/Apple/usr/bin', '/Applications/Wireshark.app/Contents/MacOS', '/Users/runner/work/Python-iOS/Python-iOS/kivy-ios/dist/root/python3', '/usr/local/bin/lib/python39.zip', '/usr/local/bin/lib/python3.9', '/usr/bin', '/bin', '/usr/sbin', '/sbin', '/Library/Apple/usr/bin', '/Applications/Wireshark.app/Contents/MacOS', '/Users/runner/work/Python-iOS/Python-iOS/kivy-ios/dist/root/python3/lib/python3.9/lib-dynload', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000000115f13e00 (most recent call first):

cfcor avatar Jun 20 '22 00:06 cfcor

Read this: https://stackoverflow.com/questions/38132755/importerror-no-module-named-encodings

shivanraptor avatar Jun 20 '22 08:06 shivanraptor

Please check that you are able to build the latest master commit without modifications.

ali-fareed avatar Jun 25 '22 22:06 ali-fareed

You can use Bazelisk to install the Bazel, instead of letting the build script to download a Bazel version.

shivanraptor avatar Jun 29 '22 07:06 shivanraptor