Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error on MacOS #191

Closed
pengup opened this issue Aug 26, 2020 · 3 comments
Closed

Installation error on MacOS #191

pengup opened this issue Aug 26, 2020 · 3 comments

Comments

@pengup
Copy link

pengup commented Aug 26, 2020

I have a similar issue that installation on MacOS Catalalina (10.15.6) failed

pip install bjoern
Collecting bjoern
  Using cached https://files.pythonhosted.org/packages/8f/d9/729bed4f535574bd2ca7d541e88f94f5ae678c341f4df153a70a3ff3a695/bjoern-3.1.0.tar.gz
Building wheels for collected packages: bjoern
  Building wheel for bjoern (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/pzhang/.pyenv/versions/3.7.0/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kd/x6sh2lmd0p934wbcrmpqbm749qmv60/T/pip-install-j98ldxcq/bjoern/setup.py'"'"'; __file__='"'"'/private/var/folders/kd/x6sh2lmd0p934wbcrmpqbm749qmv60/T/pip-install-j98ldxcq/bjoern/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/kd/x6sh2lmd0p934wbcrmpqbm749qmv60/T/pip-wheel-msvaovvh --python-tag cp37
       cwd: /private/var/folders/kd/x6sh2lmd0p934wbcrmpqbm749qmv60/T/pip-install-j98ldxcq/bjoern/
  Complete output (20 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.14-x86_64-3.7
  copying bjoern.py -> build/lib.macosx-10.14-x86_64-3.7
  running build_ext
  building '_bjoern' extension
  creating build/temp.macosx-10.14-x86_64-3.7
  creating build/temp.macosx-10.14-x86_64-3.7/http-parser
  creating build/temp.macosx-10.14-x86_64-3.7/bjoern
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -DSIGNAL_CHECK_INTERVAL=0.1 -DWANT_SIGNAL_HANDLING=yes -DWANT_SIGINT_HANDLING=yes -Ihttp-parser -Istatsd-c-client -I/usr/include/libev -I/opt/local/include -I/Users/pzhang/.pyenv/versions/3.7.0/include/python3.7m -c http-parser/http_parser.c -o build/temp.macosx-10.14-x86_64-3.7/http-parser/http_parser.o -std=c99 -fno-strict-aliasing -fcommon -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -g
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -DSIGNAL_CHECK_INTERVAL=0.1 -DWANT_SIGNAL_HANDLING=yes -DWANT_SIGINT_HANDLING=yes -Ihttp-parser -Istatsd-c-client -I/usr/include/libev -I/opt/local/include -I/Users/pzhang/.pyenv/versions/3.7.0/include/python3.7m -c bjoern/_bjoernmodule.c -o build/temp.macosx-10.14-x86_64-3.7/bjoern/_bjoernmodule.o -std=c99 -fno-strict-aliasing -fcommon -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -g
  In file included from bjoern/_bjoernmodule.c:3:
  In file included from bjoern/wsgi.h:2:
  bjoern/request.h:4:10: fatal error: 'ev.h' file not found
  #include <ev.h>
           ^~~~~~
  1 error generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for bjoern

I am using homebrew, and already installed libev (brew install libev).
I also tried pip install --global-option=build_ext --global-option="-I/usr/local/include/" --global-option="-L/usr/local/lib" bjoern but same error. Anyone has any hint? Thanks!

@onekiloparsec
Copy link

onekiloparsec commented Sep 2, 2020

You must provide paths pointing to the faulting ev.h. Here is a working installation command:

pip install --global-option=build_ext --global-option="-I/usr/local/Cellar/libev/4.33/include" --global-option="-L/usr/local/Cellar/libev/4.33/lib" bjoern

However, bjoern should have a wheel published to ease installation, at some point. See (old) #121 ...

@onekiloparsec
Copy link

Actually, there is a well advanced PR #178 on this subject, that's great. Should be fixed soon.

@pengup
Copy link
Author

pengup commented Sep 3, 2020

@onekiloparsec Thank you very much! The solution works, only thing is that my local homebrew is in /usr/local/homebrew, after pointing to the right directory, installation just worked fine. Here is the command if anyone needs it too

pip install --global-option=build_ext --global-option="-I/usr/local/homebrew/Cellar/libev/4.33/include" --global-option="-L/usr/local/homebrew/Cellar/libev/4.33/lib" bjoern

@pengup pengup closed this as completed Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants