seomoz/reppy

Failed installation via pip on Mac OS X Yosemite

Closed this issue · 11 comments

In file included from reppy/rep-cpp/src/agent.cpp:3:
reppy/rep-cpp/deps/url-cpp/include/url.h:8:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1

D'oh. What version of clang is that? I'll add clang to the build matrix for rep-cpp (which is what this is all dealing in). Well, I guess this part is even in url-cpp.

+1
the same problem

Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

If somebody could help me slightly i can try to debug this further.

I've just tried (admittedly, on Linux), to compile and test url-cpp on several versions of clang, though the version numbers don't line up to the Apple-provided ones. Specifically, I tried 3.6, 3.7, 3.8, 3.9, and 4.0, all of which worked perfectly.

I imagine ultimately the solution will end up being something along these lines.

Try installing with CFLAGS=-stdlib=libc++ pip install reppy -- if that works, I can update the setup.py to make it convenient for others in the future.

@ivan-is @kwikiel -- did that work for either of you?

I tried little nasty hack:
export MACOSX_DEPLOYMENT_TARGET=10.10 to force installation.

Since i've received this error:
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)

Learned from ycm-core/YouCompleteMe#1683 and https://github.com/Homebrew/homebrew-php/issues/2446

Then I've reinstalled libxml2
brew install libxml2
brew install libxslt
brew link libxml2 --force
brew link libxslt --force

And hodor that required reppy is working for me. You can close the issue and update setup.py to make it easier for Mac users. Thanks for help

same problem

@sergiobellon - did either of the above fixes work for you?

@dlecocq yes, actually I fixed it installing gcc-c++ which on my case wasn't there by default with xcode. Thanks

CFLAGS=-stdlib=libc++ pip install reppy
success on High Sierra

@Willian-Zhang: Can you confirm if it works with MACOSX_DEPLOYMENT_TARGET=10.10 pip install reppy? I think that's more generic and works with just standard xcode alone.