Skip to content

Instantly share code, notes, and snippets.

@uskudnik
Created February 17, 2018 18:10
Show Gist options
  • Save uskudnik/0bf38a1b0d21e7ec7cdaf3fa401aedf4 to your computer and use it in GitHub Desktop.
Save uskudnik/0bf38a1b0d21e7ec7cdaf3fa401aedf4 to your computer and use it in GitHub Desktop.
Gevent fails to compile on OSX
# requirements.txt
gevent==1.2.0
# compile run
pypi2nix -v \
-V 2.7 \
-r requirements.txt
pypi2nix v1.8.1 running ...
Stage1: Downloading wheels and creating wheelhouse ...
|-> nix-shell /nix/store/dk4qrj9y9y42zv804c45chdg34smqiik-pypi2nix-1.8.1/pkgs/pypi2nix/pip.nix --arg requirements_files [ "/var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/72f743559c9c46cc88e7837738540b31/1d39351c818fba79b17d88e5e9cae5c5.txt" ] --argstr project_dir /var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/72f743559c9c46cc88e7837738540b31 --argstr download_cache_dir /var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/cache/download --argstr wheel_cache_dir /var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/cache/wheel --argstr pip_build_dir /var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/cache/pip --arg extra_build_inputs [ ] --argstr extra_env --argstr python_version python27Full --arg setup_requires [ ] -I /nix/var/nix/profiles/per-user/root/channels --show-trace --pure --run exit
Collecting gevent==1.2.0 (from -r /var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/72f743559c9c46cc88e7837738540b31/1d39351c818fba79b17d88e5e9cae5c5.txt (line 1))
Using cached gevent-1.2.0.tar.gz
Collecting greenlet>=0.4.10 (from gevent==1.2.0->-r /var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/72f743559c9c46cc88e7837738540b31/1d39351c818fba79b17d88e5e9cae5c5.txt (line 1))
Building wheels for collected packages: gevent, greenlet
Running setup.py bdist_wheel for gevent: started
Running setup.py bdist_wheel for gevent: finished with status 'error'
Complete output from command /nix/store/qnmaimhbag8r8ig74gcg2ff4y97ffa9m-python-2.7.14/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/cache/pip/gevent/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 /var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/tmpvWM8Tipip-wheel-:
/nix/store/qnmaimhbag8r8ig74gcg2ff4y97ffa9m-python-2.7.14/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'cffi_modules'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.10-x86_64-2.7
creating build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/__init__.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_compat.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_fileobjectcommon.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_fileobjectposix.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_semaphore.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_socket2.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_socket3.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_socketcommon.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_ssl2.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_ssl3.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_sslgte279.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_tblib.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_threading.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_util.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/_util_py2.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/backdoor.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/baseserver.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/builtins.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/core.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/event.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/fileobject.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/greenlet.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/hub.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/local.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/lock.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/monkey.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/os.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/pool.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/pywsgi.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/queue.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/resolver_ares.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/resolver_thread.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/select.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/server.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/signal.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/socket.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/ssl.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/subprocess.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/thread.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/threading.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/threadpool.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/timeout.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/util.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/win32util.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/wsgi.py -> build/lib.macosx-10.10-x86_64-2.7/gevent
creating build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/__init__.py -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/_corecffi_build.py -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/corecffi.py -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
running egg_info
writing requirements to src/gevent.egg-info/requires.txt
writing src/gevent.egg-info/PKG-INFO
writing top-level names to src/gevent.egg-info/top_level.txt
writing dependency_links to src/gevent.egg-info/dependency_links.txt
reading manifest file 'src/gevent.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'known_failures.py'
warning: no files found matching '.pep8'
no previously-included directories found matching '*/__pycache__'
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.o' found anywhere in distribution
warning: no previously-included files matching '*.lo' found anywhere in distribution
warning: no previously-included files matching '*.la' found anywhere in distribution
warning: no previously-included files matching 'config.log' found anywhere in distribution
warning: no previously-included files matching 'config.status' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.coverage' found under directory 'src/greentest'
no previously-included directories found matching 'src/greentest/htmlcov'
warning: no previously-included files matching 'stamp-h?' found under directory 'deps/c-ares'
warning: no previously-included files matching 'ares_build.h.orig' found under directory 'deps/c-ares'
no previously-included directories found matching 'deps/libev/.deps'
warning: no previously-included files matching 'Makefile' found under directory 'deps/libev'
warning: no previously-included files matching 'libtool' found under directory 'deps/libev'
warning: no previously-included files matching 'stamp-h?' found under directory 'deps/libev'
warning: no previously-included files matching 'config.h' found under directory 'deps/libev'
warning: no previously-included files matching '_corecffi.c' found under directory 'src/gevent'
warning: no previously-included files found matching 'Makefile'
warning: no previously-included files found matching 'configure-output'
writing manifest file 'src/gevent.egg-info/SOURCES.txt'
copying src/gevent/_semaphore.pxd -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/ares.pyx -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/cares.pxd -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/cares_ntop.h -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/cares_pton.h -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/dnshelper.c -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/gevent._semaphore.c -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/gevent.ares.c -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/gevent.ares.h -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/python.pxd -> build/lib.macosx-10.10-x86_64-2.7/gevent
copying src/gevent/libev/_corecffi_cdef.c -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/_corecffi_source.c -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/callbacks.c -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/callbacks.h -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/corecext.ppyx -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/corecext.pyx -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/gevent.corecext.c -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/libev.h -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/libev.pxd -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/libev_vfd.h -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
copying src/gevent/libev/stathelper.c -> build/lib.macosx-10.10-x86_64-2.7/gevent/libev
running build_ext
Running '(cd "/private/var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/cache/pip/gevent/deps/libev" && sh ./configure && cp config.h "$OLDPWD" ) > configure-output.txt' in /private/var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/cache/pip/gevent/build/temp.macosx-10.10-x86_64-2.7/libev
building 'gevent.libev.corecext' extension
creating build/temp.macosx-10.10-x86_64-2.7/src
creating build/temp.macosx-10.10-x86_64-2.7/src/gevent
creating build/temp.macosx-10.10-x86_64-2.7/src/gevent/libev
clang -U__llvm__ -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.macosx-10.10-x86_64-2.7/libev -I/private/var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/cache/pip/gevent/deps/libev -I/nix/store/qnmaimhbag8r8ig74gcg2ff4y97ffa9m-python-2.7.14/include/python2.7 -c src/gevent/libev/gevent.corecext.c -o build/temp.macosx-10.10-x86_64-2.7/src/gevent/libev/gevent.corecext.o
In file included from src/gevent/libev/gevent.corecext.c:434:
src/gevent/libev/libev.h:2:10: fatal error: 'ev.c' file not found
#include "ev.c"
^~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Failed building wheel for gevent
Running setup.py clean for gevent
Running setup.py bdist_wheel for greenlet: started
Running setup.py bdist_wheel for greenlet: finished with status 'done'
Stored in directory: /private/var/folders/j7/bscp8lpn52v8yxw90bmfrn000000gn/T/pypi2nix/72f743559c9c46cc88e7837738540b31/wheel
Successfully built greenlet
Failed to build gevent
ERROR: Failed to build one or more wheels
Do you want to report above issue (a browser will open with prefilled details of issue)? [y/N]:
Error: While trying to run the command something went wrong.
make: *** [Makefile:79: gevent] Error 1
@philipcristiano
Copy link

Ran into this problem when trying to install gevent in a nix-shell with pip, but turns out the dependency chain pinned the version to gevent 1.3.7. Updating gevent versions allowed this to install correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment