Missing C++ Standard Library Headers When Building Wheels On Mac
@thomasrockhu-codecov đang làm issue này rồi.
Từ ngày 10/10/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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?
- Ngôn ngữ chính
- Python
- Star
- 89
- Fork
- 64
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codecov/codecov-cli
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
codecov/codecov-cli#795 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
codecov/codecov-cli#721 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
codecov/codecov-cli#777 ·
-
Codecov is joining Harness Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 5/100
codecov/codecov-cli#715 ·
-
codecov/codecov-cli#706 · 1 bình luận · 1 người được giao ·
Tất cả issue của codecov/codecov-cli
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·