wbolster / plyvel

Plyvel, a fast and feature-rich Python interface to LevelDB
https://plyvel.readthedocs.io/
Other
529 stars 75 forks source link

Can't install plyvel on macOS #85

Closed guhur closed 5 years ago

guhur commented 6 years ago

From PyPI or direct repo, I get the same issue when installing:

cython --version Cython version 0.28.5 cython --cplus --fast-fail --annotate plyvel/_plyvel.pyx python setup.py build_ext --inplace --force running build_ext building 'plyvel._plyvel' extension creating build creating build/temp.macosx-10.13-x86_64-3.6 creating build/temp.macosx-10.13-x86_64-3.6/plyvel clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/pierre-louis/.pyenv/versions/3.6.5/include/python3.6m -c plyvel/_plyvel.cpp -o build/temp.macosx-10.13-x86_64-3.6/plyvel/_plyvel.o -Wall -g -mmacosx-version-min=10.7 -stdlib=libc++ plyvel/_plyvel.cpp:584:10: fatal error: 'ios' file not found

include "ios"

     ^

1 error generated. error: command 'clang' failed with exit status 1 make: *** [ext] Error 1

leveldb and xcode are already installed.

Thanks for your help :)

wbolster commented 5 years ago

somehow cython thinks you're on ios but you don't have its development headers... :disappointed:

geyang commented 5 years ago

same issue here.

milkyklim commented 5 years ago

Since the issue is closed, can anyone comment on the solution? 😅

muerl commented 5 years ago

As far as I can tell the solution is CFLAGS='-stdlib=libc++' (Worked for me with 1.1.0 and OSx 10.14.6. I cribbed it from here: https://github.com/wbolster/plyvel/issues/66#issuecomment-481263734 The other two options in the list are addressed in https://github.com/wbolster/plyvel/pull/97. The PR seems to have removed that flag but adds a different one from the issue thread.

Maybe @importjake could comment?

schmty commented 4 years ago

@episodeyang @muerl @milkyklim sorry for not reaching out sooner, I'll try to help as best I can. I think it would be helpful to open a new issue with a more specific breakdown of your problems trying to install so I can try to better help (as I currently cannot reproduce this issue). Just FYI I'll be fairly slow to respond for the next week or so as I'll be away on a trip but I'm hoping to help whenever I have the time 😄

milkyklim commented 4 years ago

Solution for me was running the installation with CC=clang CXX=clang++ flags.

schmty commented 4 years ago

@milkyklim that's great, but I need help and more info about how you got this error relating to ios headers. Your solution may very well be the correct solution but I want to be able to understand how to reproduce this bug myself so I can be certain that adding these other flags would help.

What version of OSX and python and plyvel were you trying to install and did you get the same error as the OP above (where somehow cython looks for ios headers)?

milkyklim commented 4 years ago

I was not trying to install plyvel directly but it was among the dependencies.

The issue is old enough that I don't really remember where it occurred. 🙈 But the error message looked the same as OP.

schmty commented 4 years ago

Fair enough, I'll just say then that for the short term adding those extra flags is probably the best bet, and if I see a new issue filed with someone experiencing this issue or one similar then either I or anyone else motivated could open a PR adding those flags

muerl commented 4 years ago

@importjake I am switch laptops this week, so if I run into the issue again I will log a new issue.