abseil / abseil/abseil-hello

Unable to compile abseil-hello on MacOS Sequoia due to missing C++ standard libraries

未關閉
#12 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
47
分支
41
PR 合併指標
30 天內沒有已合併 PR

描述

I am unable to compile abseil-hello on MacOS Sequoia

`
bazel run //:hello_main
INFO: Analyzed target //:hello_main (0 packages loaded, 0 targets configured).
ERROR: /Users/popurir/abseil-hello/bazel-hello/BUILD.bazel:33:10: Compiling hello_main.cc failed: (Exit 1): cc_wrapper.sh failed: error executing CppCompile command (from target //:hello_main) external/bazel_tools~cc_configure_extension~local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object ... (remaining 29 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from hello_main.cc:15:
./hello.h:15:10: fatal error: 'string' file not found
15 | #include
| ^~~~~~~~
1 error generated.
Target //:hello_main failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.155s, Critical Path: 0.92s
INFO: 18 processes: 18 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
`

Below is Mac compilation setup details

-----------
/usr/bin/gcc --version
Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: x86_64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

--------------------
softwareupdate -l
Software Update Tool

Finding available software
No new software available.

-----------------------

xcode-select -v
xcode-select version 2409.

------------------------------

xcode-select -v
xcode-select version 2409.
C02FL3VCMD6R:SDKs popurir$ xcode-select -p
/Library/Developer/CommandLineTools
C02FL3VCMD6R:SDKs popurir$ cd /Library/Developer/CommandLineTools/
C02FL3VCMD6R:CommandLineTools popurir$ ls
Library SDKs usr
C02FL3VCMD6R:CommandLineTools popurir$ cd SDKs/
C02FL3VCMD6R:SDKs popurir$ ls -lh
total 0
lrwxr-xr-x 1 root wheel 14B Nov 14 12:49 MacOSX.sdk -> MacOSX13.1.sdk
drwxr-xr-x 7 root wheel 224B Nov 12 2022 MacOSX13.1.sdk
drwxr-xr-x 8 root wheel 256B Nov 14 12:48 MacOSX14.5.sdk
lrwxr-xr-x 1 root wheel 14B Nov 13 15:39 MacOSX14.sdk -> MacOSX14.5.sdk
drwxr-xr-x 8 root wheel 256B Nov 14 12:49 MacOSX15.1.sdk
lrwxr-xr-x 1 root wheel 14B Nov 13 15:37 MacOSX15.sdk -> MacOSX15.1.sdk
lrwxr-xr-x 1 root wheel 14B Nov 13 15:40 MacOSX_old.sdk -> MacOSX15.1.sdk

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

The error is a missing C++ standard library header (``) during Bazel compilation on macOS Sequoia. Examine the Bazel configuration in the repository root and the `BUILD.bazel` file at line 33. Check the C++ toolchain configuration and the SDK paths. The issue likely relates to the macOS Command Line Tools installation or Bazel's detection of the correct sysroot. Start by running `bazel info` to see the current configuration and verify the C++ compiler and include paths. The fix may involve updating Bazel's C++ toolchain or setting environment variables to point to the correct SDK.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cpp
領域
build-system
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
描述清楚
新手友好度
40/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。