Absolute path inclusions found in macOS15
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Description of the bug:
# Steps to reproduce
I follow the https://bazel.build/start/cpp?hl=zh-cn to test
1. ```git clone https://github.com/bazelbuild/examples```
2. ```cd cpp-tutorial/stage1 ```
3. ``` bazel build //main:hello-world --verbose_failures```
It show error below:
### Which category does this issue belong to?
_No response_
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
_No response_
### Which operating system are you running Bazel on?
macOS 15.1 (24B83)
### What is the output of `bazel info release`?
release 7.4.1-homebrew
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
_No response_
### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
_No response_
### Have you found anything relevant by searching the web?
I've tried looking for similar issues like
https://github.com/bazelbuild/bazel/issues/21718
https://github.com/protocolbuffers/protobuf/issues/16289
But unfortunately it doesn't work for me
### Any other information, logs, or outputs that you want to share?
```
stage1 git:(master) ✗ bazel build //main:hello-world --verbose_failures
INFO: Analyzed target //main:hello-world (2 packages loaded, 2 targets configured).
ERROR: /Users/xiaoxiang/Documents/code/global/WebViewPrefetch/bazel/examples/cpp-tutorial/stage1/main/BUILD:1:10: Compiling main/hello-world.cc failed: absolute path inclusion(s) found in rule '//main:hello-world':
the source file 'main/hello-world.cc' includes the following non-builtin files with absolute paths (if these are builtin files, make sure these paths are in your toolchain):
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime'
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__assert'
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__assertion_handler'
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config'
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config_site'
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__verbose_abort'
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__availability'
....
Too long to cut
....
Target //main:hello-world failed to build
INFO: Elapsed time: 0.998s, Critical Path: 0.79s
INFO: 3 processes: 3 internal.
ERROR: Build did NOT complete successfully
```
Thank you!
Contributor guide
Research direction
Start by running `bazel build //main:hello-world --verbose_failures` in `examples/cpp-tutorial/stage1` on macOS 15.1, then inspect `main/BUILD` and `main/hello-world.cc` alongside the reported absolute SDK include paths. Done means the tutorial target builds without absolute path inclusion errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, macos
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100