The steps below fix it, basically we skip using clang
. Check the paths for yourself if the gcc version is correct.
-
Installed GCC via Homebrew:
brew install gcc
-
Set environment variables to use GCC 14:
export CPLUS_INCLUDE_PATH="/opt/homebrew/Cellar/gcc/14.2.0/include/c++/14/" export CC=/opt/homebrew/bin/gcc-14 export CXX=/opt/homebrew/bin/g++-14
-
Installed
python-poppler
successfully using the specific GCC version:CC=/opt/homebrew/bin/gcc-14 CXX=/opt/homebrew/bin/g++-14 pip install python-poppler