Hello,
New to Bazel, trying to get the hang of it. I try running the tutorial, but when I run it I get:
vlarad@MacBook-Air-Vlad stage1 % bazel build //main:hello-world
INFO: Analyzed target //main:hello-world (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/vlarad/play/examples/cpp-tutorial/stage1/main/BUILD:3:10: Compiling main/hello-world.cc failed: I/O exception during sandboxed execution: xcrun failed with code 1.
This most likely indicates that SDK version [10.11] for platform [MacOSX] is unsupported for the target version of xcode.
Process exited with status 1
stdout: stderr: 2023-10-03 00:43:29.229 xcodebuild[15215:388771] Writing error result bundle to /var/folders/wk/f4c2f1ys0cg527vsrpmjlxx40000gn/T/ResultBundle_2023-03-10_00-43-0029.xcresult
xcodebuild: error: SDK "macosx10.11" cannot be located.
2023-10-03 00:43:30.769 xcodebuild[15218:388810] Writing error result bundle to /var/folders/wk/f4c2f1ys0cg527vsrpmjlxx40000gn/T/ResultBundle_2023-03-10_00-43-0030.xcresult
xcodebuild: error: SDK "macosx10.11" cannot be located.
xcrun: error: unable to lookup item 'Path' in SDK 'macosx10.11'
Target //main:hello-world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.459s, Critical Path: 4.34s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
Now, I'm curious what is going on that I pointed apparently bazel to the xcode compiler? I suspect that load("@rules_cc//cc:defs.bzl", "cc_binary") is doing _a lot_ of work in the background.
Note, I'm on MacOs Sonoma 14.0 and I do have installed xcode, as far as I can tell.
Best,
Vlad R.