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

Getting OSError: [Errno 8] Exec format error

Open sreedeeppaul opened this issue 5 years ago • 1 comments

I am trying to build the latest Telegram IOS app in Xcode 12.4 as well as 12.5 for my Simulator but I am getting a python error.I have followed all the steps mentioned below and have installed Bazel and yasm https://github.com/TelegramMessenger/Telegram-iOS

I have tried it with Telegram 7.6 and 7.8 and behaviour is same. Can someone please help?

bazel --version
bazel 4.1.0-homebrew
yasm --version
yasm 1.3.0

When i try to generate the XCode project,

python3 build-system/Make/Make.py \
    --bazel="$HOME/bazel-dist/bazel" \
    --cacheDir="$HOME/telegram-bazel-cache" \
    generateProject \
    --configurationPath="$HOME/telegram-configuration" \
    --disableExtensions \
    --disableProvisioningProfiles

I am seeing this error

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'

sreedeeppaul avatar Jun 27 '21 17:06 sreedeeppaul

Is the bazel binary located at $HOME/bazel-dist/bazel?

ali-fareed avatar Jun 28 '21 21:06 ali-fareed