Missing C++ Standard Library Headers When Building Wheels On Mac
@thomasrockhu-codecov ci sta già lavorando.
Dal 10/10/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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?
- Lingua principale
- Python
- Stelle
- 89
- Fork
- 64
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di codecov/codecov-cli
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
codecov/codecov-cli#795 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
codecov/codecov-cli#721 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
codecov/codecov-cli#777 ·
-
Codecov is joining Harness Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 5/100
codecov/codecov-cli#715 ·
-
codecov/codecov-cli#706 · 1 commento · 1 assegnatario ·
Tutte le issue di codecov/codecov-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/skills#1811 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
speaches-ai/speaches#678 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
datalayer/mcp-compose#42 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
UKGovernmentBEIS/inspect_evals#2523 ·