Missing C++ Standard Library Headers When Building Wheels On Mac
评估
这个 Issue 还没有评估数据。
描述
Description
I've encountered a build failure on MacOS when attempting to pip install codecov-cli, which compiles these C++ components due to the lack of a pre-built wheel: https://github.com/codecov/codecov-cli/blob/v0.5.0/setup.py#L34-L54
The specific error indicates that the <vector> header file from the C++ Standard Library cannot be found, along with other C++ specific dependencies.
Error Details
The error message received during the wheel build process is as follows:
fatal error: 'vector' file not found
#include <vector>
^~~~~~~~
This suggests that the build environment is not correctly configured to locate the C++ standard library headers required for compilation.
Environment
OS: MacOS
This setup seems to work:
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Here's an example of a broken setup (no mention of c++):
$ gcc --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Steps to Reproduce
pip install codecov-clifrom a machine without a version of CommandLineTools that includes the required C++ dependencies .- Observe the failure during the wheel-building step with the error message indicating the missing
<vector>header.
Resolution Steps
I performed the following steps to resolve the issue:
-
Completely removed the existing Command Line Tools using the command:
sudo rm -rf /Library/Developer/CommandLineTools -
Reinstalled the Command Line Tools by invoking:
xcode-select --install
The fresh installation of the Command Line Tools seems to include the necessary C++ compiler and standard library headers.
Question
Is there any easier way to prevent this issue without requiring a reinstall of xcode Command Line Tools?
Do I need to start enforcing a minimum version of xcode on developer machines? Or is there work in progress to get a working wheel file?
In setup.py, should the language='c++' be set for the Extension to explicitly require a working C++ compiler?
- 主要语言
- Python
- 星标
- 90
- 派生
- 65
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codecov/codecov-cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
codecov/codecov-cli#795 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
codecov/codecov-cli#721 · 1 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 59/100
codecov/codecov-cli#801 · 2 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 65/100
codecov/codecov-cli#777 ·
-
难度 1/5 1 小时以内 新手友好度 5/100
codecov/codecov-cli#715 ·
查看 codecov/codecov-cli 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
RedHatQE/mtv-api-tests#721 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 85/100
pytest-dev/pluggy#757 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 85/100
NousResearch/hermes-agent#134960 ·
维护者通常 1 天内回复
-
HTML backend: `<br>` leaks the internal sentinel U+E000 into list items, headings and captions可能已有人在做 @morten-lagabote 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
docling-project/docling#4671 ·
维护者通常 1 天内回复