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

`generateProject` command fails with error

Open shivanraptor opened this issue 6 months ago • 4 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

Using the following command, the generate Xcode project ends up with an error: third-party/webrtc/BUILD:3121:13: configurable attribute "srcs" in //third-party/webrtc:webrtc doesn't match this configuration. Would a default condition help?

The command is:

USE_BAZEL_VERSION=8.2.1 python3 build-system/Make/Make.py --overrideXcodeVersion --bazel="/usr/local/bin/bazel" --cacheDir="$HOME/telegram-bazel-cache" generateProject --configurationPath="$HOME/telegram-configuration/development-configuration.json" --codesigningInformationPath="$HOME/telegram-configuration/fake-codesigning"

Expected Behavior

The Xcode project should be generated without a problem. The prior tags (versions) do not have such problem.

Actual Behavior

The generate Xcode project ends up with an error: third-party/webrtc/BUILD:3121:13: configurable attribute "srcs" in //third-party/webrtc:webrtc doesn't match this configuration. Would a default condition help?

Steps to Reproduce

  1. Checked out release-11.13 using the command: git clone --recursive -j8 [email protected]:TelegramMessenger/Telegram-iOS.git -b release-11.13 -- release-11.13
  2. Try to generate the Xcode project using the above command
  3. Ends up with the error above

Environment

macOS version: Sequoia 15.5 iOS version: 18.5 Xcode version: 16.4 App version: 11.13 Bazel version: 8.2.1 (via Bazelisk)

using Intel iMac. (I know it won't compile an IPA, but it's new that the Xcode project cannot be generated; the project can be generated with release-11.12)

Full log:

No matching processes belonging to you were found
INFO: Analyzed target //Telegram:Telegram_xcodeproj (1 packages loaded, 1 target configured).
INFO: Found 1 target...
Target //Telegram:Telegram_xcodeproj up-to-date:
  bazel-bin/Telegram/Telegram_xcodeproj-runner.sh
INFO: Elapsed time: 1.261s, Critical Path: 0.01s
INFO: 1 process: 11 action cache hit, 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/Telegram/Telegram_xcodeproj-runner.sh

Generating "Telegram/Telegram.xcodeproj"
WARNING: Option 'experimental_remote_cache_async' is deprecated: Use --remote_cache_async instead
WARNING: Option 'experimental_action_cache_store_output_metadata' is deprecated: Use --action_cache_store_output_metadata instead
INFO: Invocation ID: 1bb1e2ca-4f86-4993-a96e-39e0fcf1f233
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=157
INFO: Reading rc options for 'run' from /Users/adv/Documents/workspace/Xcode/xCodeProjects/telegram/release-11.13/xcodeproj.bazelrc:
  Inherited 'build' options: --announce_rc --features=swift.use_global_module_cache --verbose_failures --experimental_remote_cache_async --features=swift.enable_batch_mode --@build_bazel_rules_swift//swift:copt=-j19 --@build_bazel_rules_swift//swift:copt=-whole-module-optimization --define=buildNumber=10000 --define=telegramVersion=11.13 --disk_cache=/Users/adv/telegram-bazel-cache --override_repository=build_configuration=/Users/adv/Documents/workspace/Xcode/xCodeProjects/telegram/release-11.13/build-input/configuration-repository --//Telegram:disableStripping --features=-swift.debug_prefix_map
INFO: Reading rc options for 'run' from /Users/adv/Documents/workspace/Xcode/xCodeProjects/telegram/release-11.13/.bazelrc:
  Inherited 'build' options: --action_env=ZERO_AR_DATE=1 --apple_platform_type=ios --enable_platform_specific_config --apple_crosstool_top=@local_config_apple_cc//:toolchain --crosstool_top=@local_config_apple_cc//:toolchain --host_crosstool_top=@local_config_apple_cc//:toolchain --per_file_copt=.*.m$,@-fno-objc-msgsend-selector-stubs --per_file_copt=.*.mm$,@-fno-objc-msgsend-selector-stubs --features=debug_prefix_map_pwd_is_dot --features=swift.cacheable_swiftmodules --features=swift.debug_prefix_map --features=swift.enable_vfsoverlays --strategy=Genrule=standalone --spawn_strategy=standalone --strategy=SwiftCompile=standalone --define RULES_SWIFT_BUILD_DUMMY_WORKER=1
INFO: Found applicable config definition common:rules_xcodeproj_generator in file /private/var/tmp/_bazel_adv/c267b77a24d8820477fb7a924681a542/execroot/_main/bazel-out/darwin_x86_64-fastbuild/bin/Telegram/Telegram_xcodeproj.bazelrc: --config=rules_xcodeproj
INFO: Found applicable config definition common:rules_xcodeproj in file /private/var/folders/jq/lml3bg2146b_9np0qbyt0s080000gq/T/tmp.KQentTj1Qy/pre_xcodeproj.bazelrc: --xcode_version=16C5032a --repo_env=USE_CLANG_CL=16C5032a --repo_env=XCODE_VERSION=16C5032a --repo_env=DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
INFO: Found applicable config definition common:rules_xcodeproj in file /private/var/tmp/_bazel_adv/c267b77a24d8820477fb7a924681a542/execroot/_main/bazel-out/darwin_x86_64-fastbuild/bin/Telegram/Telegram_xcodeproj.bazelrc: --verbose_failures --cache_computed_file_digests=500000 --compilation_mode=dbg --experimental_action_cache_store_output_metadata --experimental_convenience_symlinks=ignore --experimental_use_cpp_compile_action_args_params_file --define=apple.experimental.tree_artifact_outputs=1 --features=apple.swizzle_absolute_xcttestsourcelocation --features=oso_prefix_is_pwd --features=relative_ast_path --features=swift.cacheable_swiftmodules --features=swift.index_while_building --features=swift.use_global_index_store --features=swift.use_global_module_cache --nolegacy_important_outputs --show_result=0 --noworker_sandboxing --spawn_strategy=remote,worker,local
WARNING: For repository 'bazel_features', the root module requires module version [email protected], but got [email protected] in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: Option 'experimental_remote_cache_async' is deprecated: Use --remote_cache_async instead
WARNING: Option 'experimental_action_cache_store_output_metadata' is deprecated: Use --action_cache_store_output_metadata instead
ERROR: /Users/adv/Documents/workspace/Xcode/xCodeProjects/telegram/release-11.13/third-party/webrtc/BUILD:3121:13: configurable attribute "srcs" in //third-party/webrtc:webrtc doesn't match this configuration. Would a default condition help?

Conditions checked:
 @@rules_apple+//apple:ios_arm64
 //build-system:ios_sim_arm64

To see a condition's definition, run: bazel query --output=build <condition label>.

This instance of //third-party/webrtc:webrtc has configuration identifier 5d0b788. To inspect its configuration, run: bazel config 5d0b788.

For more help, see https://bazel.build/docs/configurable-attributes#faq-select-choose-condition.

ERROR: Analysis of target '@@rules_xcodeproj++internal+rules_xcodeproj_generated//generator/Telegram/Telegram_xcodeproj:Telegram_xcodeproj' failed; build aborted: Analysis failed
INFO: Elapsed time: 1.800s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED: 
    Fetching repository @@bazel_tools+xcode_configure_extension+local_config_xcode; Building xcode-locator
    Fetching repository @@apple_support++apple_cc_configure_extension+local_config_apple_cc; starting
    Fetching repository @@+_repo_rules+cmake_tar_gz; starting
Traceback (most recent call last):
  File "/Users/adv/Documents/workspace/Xcode/xCodeProjects/telegram/release-11.13/build-system/Make/Make.py", line 1293, in <module>
    generate_project(bazel=bazel_path, arguments=args)
  File "/Users/adv/Documents/workspace/Xcode/xCodeProjects/telegram/release-11.13/build-system/Make/Make.py", line 614, in generate_project
    xcodeproj_path = generate(
                     ^^^^^^^^^
  File "/Users/adv/Documents/workspace/Xcode/xCodeProjects/telegram/release-11.13/build-system/Make/ProjectGeneration.py", line 58, in generate
    return generate_xcodeproj(build_environment, disable_extensions, disable_provisioning_profiles, include_release, generate_dsym, configuration_path, bazel_app_arguments, target_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/adv/Documents/workspace/Xcode/xCodeProjects/telegram/release-11.13/build-system/Make/ProjectGeneration.py", line 51, in generate_xcodeproj
    call_executable(bazel_generate_arguments)
  File "/Users/adv/Documents/workspace/Xcode/xCodeProjects/telegram/release-11.13/build-system/Make/BuildEnvironment.py", line 104, in call_executable
    subprocess.check_call(resolved_arguments, env=resolved_env)
  File "/Users/adv/opt/miniconda3/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/bazel', 'run', '//Telegram:Telegram_xcodeproj', '--override_repository=build_configuration=/Users/adv/Documents/workspace/Xcode/xCodeProjects/telegram/release-11.13/build-input/configuration-repository', '--//Telegram:disableStripping']' returned non-zero exit status 1.

shivanraptor avatar Jul 07 '25 10:07 shivanraptor

Hello friend

Samuel-wa avatar Jul 08 '25 18:07 Samuel-wa

Update: The same code can generate project with M1 CPU. This issue is probably related to CPU architecture

shivanraptor avatar Jul 16 '25 09:07 shivanraptor

having the same issue.

binodil avatar Oct 07 '25 05:10 binodil

+1 M3 CPU. Any ideas?

k0ry avatar Nov 14 '25 00:11 k0ry