pytrec_eval
pytrec_eval copied to clipboard
fail to install for Mac due to support of libc++ in place of stdlibc++ in the latest MacOS
when installing with pip or from source code, on the latest MacOS demonstrated the issue:
"warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead".
and later shows the error:
"src/pytrec_eval.cpp:19:10: fatal error: 'algorithm' file not found"
Seems that in the latest MacOS, stdlibc++ is no longer supported and I was expected to use libc++?
Can you install GCC using Homebrew and try building with that?
Thank you. It works by installing the latest version of GCC from homebrew and specifying CC='gcc-8' CXX='g++-8' when installing pytrec_eval.
I am wondering how to specify CC='gcc-8' CXX='g++-8' when installing pytrec_eval.
I am wondering how to specify CC='gcc-8' CXX='g++-8' when installing pytrec_eval.
$ CC='gcc-8' CXX='g++-8' pip install pytrec_eval
I asked a few MacOS users to test installing pytrec_eval. They all cloned the repository, created a virtual environment, and then ran pip install .
. They all were running OSX 10.15.7. 3 succeeded in installing and one failed. The one who failed had an old version of Xcode that seemed to be interfering with his Homebrew GCC. He also generally has trouble installing python packages that require compiling because of his setup. The other three who succeeded all use clang version 12 or 11:
gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin