Skip to content

Comments

Fix error when path to Xcode contains a space#464

Merged
brentleyjones merged 1 commit intobazelbuild:masterfrom
jszumski:fix-path-to-xcode-spaces
Oct 7, 2025
Merged

Fix error when path to Xcode contains a space#464
brentleyjones merged 1 commit intobazelbuild:masterfrom
jszumski:fix-path-to-xcode-spaces

Conversation

@jszumski
Copy link
Contributor

@jszumski jszumski commented Oct 6, 2025

Fixes a truncated DEVELOPER_DIR by quoting the path in case it has spaces like "/Applications/Xcode 26b2.app":

ERROR: /private/var/tmp/_bazel_jszumski/ed7e7efa198ffcfaf8285220a74bc6f4/external/apple_support+/crosstool/BUILD:25:20: Executing apple_genrule @@apple_support+//crosstool:exec_wrapped_clang_pp.target_config [for tool] failed: (Exit 127): bash failed: error executing Genrule command (from target @@apple_support+//crosstool:exec_wrapped_clang_pp.target_config) 
  (cd /private/var/tmp/_bazel_jszumski/ed7e7efa198ffcfaf8285220a74bc6f4/execroot/_main && \
  exec env - \
    APPLE_SDK_PLATFORM=MacOSX \
    APPLE_SDK_VERSION_OVERRIDE=26.1 \
    PATH=/bin:/usr/bin:/usr/local/bin \
    XCODE_VERSION_OVERRIDE=26.1.0.17B5035f \
  /bin/bash -c '
env -i   DEVELOPER_DIR=${DEVELOPER_DIR:-}   xcrun     --sdk macosx     clang     -mmacosx-version-min=10.15     -std=c++17     -lc++     -arch arm64     -arch x86_64     -O3     -o bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/external/apple_support+/crosstool/wrapped_clang_pp     external/apple_support+/crosstool/wrapped_clang.cc
')
# Configuration: 6333d181a5f82bde4a7ec940d100cbaefed6490d8b66e3b3fdf7b50d0ec816f3
# Execution platform: @@platforms//host:host
env: 26b2.app/Contents/Developer: No such file or directory

@jszumski jszumski force-pushed the fix-path-to-xcode-spaces branch from 1abdd5c to 1d71bdb Compare October 7, 2025 14:33
@brentleyjones brentleyjones merged commit 841d011 into bazelbuild:master Oct 7, 2025
12 checks passed
@jszumski jszumski deleted the fix-path-to-xcode-spaces branch October 7, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants