-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to build extension in python 3.5 #455
Comments
Original comment by kracekumar (Bitbucket: kracekumar, GitHub: kracekumar): Updating the wheel version fixes the assertion whereas building uwsgi still fails. |
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): Using only
Looking at the AttributeError, it seems that
And that value is set here:
Tracing into that code, I find
And indeed, that command does not exist on my system:
And that
So, although
Seems you're not the only one who's encountered this issue. The reply at the bottom indicates that this issue stems from a long-deprecated expectation of "gcc-4.2". I suspect that this value stems from the public releases of Python being built on older OS X clients for compatibility. I'll bet setting |
Original comment by kracekumar (Bitbucket: kracekumar, GitHub: kracekumar): Thanks Jason. Building extension via ➜ snippets . setuptools-455/bin/activate
(setuptools-455) ➜ snippets pip install wheel
Collecting wheel
Using cached wheel-0.26.0-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.26.0
(setuptools-455) ➜ snippets pip install greenlet
Collecting greenlet
Installing collected packages: greenlet
Successfully installed greenlet-0.4.9
(setuptools-455) ➜ snippets CC=clang CFLAGS="-I/Users/krace/code/snippets/setuptools-455/include/python3.5m" UWSGI_PROFILE="asyncio" pip install uwsgi
Collecting uwsgi
Using cached uwsgi-2.0.11.2.tar.gz
Building wheels for collected packages: uwsgi
Running setup.py bdist_wheel for uwsgi
Complete output from command /Users/krace/code/snippets/setuptools-455/bin/python3.5 -c "import setuptools;__file__='/private/var/folders/xk/8lhz2_j91_3758cc65stj5z40000gn/T/pip-build-7f8p_pc2/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/xk/8lhz2_j91_3758cc65stj5z40000gn/T/tmp5567xqd7pip-wheel-:
running bdist_wheel
running build
running build_py
creating build
creating build/lib
copying uwsgidecorators.py -> build/lib
installing to build/bdist.macosx-10.10-x86_64/wheel
running install
plugins/greenlet/greenlet.c:2:10: fatal error: 'greenlet/greenlet.h' file not found
#include <greenlet/greenlet.h>
^
1 error generated.
----------------------------------------
Failed building wheel for uwsgi
Failed to build uwsgi
Installing collected packages: uwsgi
Running setup.py install for uwsgi
Complete output from command /Users/krace/code/snippets/setuptools-455/bin/python3.5 -c "import setuptools, tokenize;__file__='/private/var/folders/xk/8lhz2_j91_3758cc65stj5z40000gn/T/pip-build-7f8p_pc2/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xk/8lhz2_j91_3758cc65stj5z40000gn/T/pip-hhp__lot-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/krace/code/snippets/setuptools-455/include/site/python3.5/uwsgi:
running install
plugins/greenlet/greenlet.c:2:10: fatal error: 'greenlet/greenlet.h' file not found
#include <greenlet/greenlet.h>
^
1 error generated.
----------------------------------------
Command "/Users/krace/code/snippets/setuptools-455/bin/python3.5 -c "import setuptools, tokenize;__file__='/private/var/folders/xk/8lhz2_j91_3758cc65stj5z40000gn/T/pip-build-7f8p_pc2/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xk/8lhz2_j91_3758cc65stj5z40000gn/T/pip-hhp__lot-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/krace/code/snippets/setuptools-455/include/site/python3.5/uwsgi" failed with error code 1 in /private/var/folders/xk/8lhz2_j91_3758cc65stj5z40000gn/T/pip-build-7f8p_pc2/uwsgi
(setuptools-455) ➜ snippets CC=clang CFLAGS="-I/Users/krace/code/snippets/setuptools-455/include/python3.5m" UWSGI_PROFILE="asyncio" python -m easy_intsall uwsgi
/Users/krace/code/snippets/setuptools-455/bin/python: No module named easy_intsall
(setuptools-455) ➜ snippets CC=clang CFLAGS="-I/Users/krace/code/snippets/setuptools-455/include/python3.5m" UWSGI_PROFILE="asyncio" python -m easy_install uwsgi
Searching for uwsgi
Reading https://pypi.python.org/simple/uwsgi/
Best match: uwsgi 2.0.11.2
Downloading https://pypi.python.org/packages/source/u/uWSGI/uwsgi-2.0.11.2.tar.gz#md5=1f02dcbee7f6f61de4b1fd68350cf16f
Processing uwsgi-2.0.11.2.tar.gz
Writing /var/folders/xk/8lhz2_j91_3758cc65stj5z40000gn/T/easy_install-m0g0tk96/uwsgi-2.0.11.2/setup.cfg
Running uwsgi-2.0.11.2/setup.py -q bdist_egg --dist-dir /var/folders/xk/8lhz2_j91_3758cc65stj5z40000gn/T/easy_install-m0g0tk96/uwsgi-2.0.11.2/egg-dist-tmp-b96eohdu
using profile: buildconf/asyncio.ini
detected include path: ['/usr/local/include', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0/include', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include', '/usr/include', '/System/Library/Frameworks', '/Library/Frameworks']
Patching "bin_name" to properly install_scripts dir
detected CPU cores: 4
configured CFLAGS: -O2 -I. -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/krace/code/snippets/setuptools-455/include/python3.5m -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-format -Wno-format-security -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -mmacosx-version-min=10.5 -DUWSGI_LOCK_USE_OSX_SPINLOCK -DUWSGI_EVENT_USE_KQUEUE -DUWSGI_EVENT_TIMER_USE_KQUEUE -DUWSGI_EVENT_FILEMONITOR_USE_KQUEUE -I/usr/local/Cellar/pcre/8.37/include -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_UUID -DUWSGI_VERSION="\"2.0.11.2\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="11" -DUWSGI_VERSION_REVISION="2" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(asyncio);UDEP(greenlet);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(asyncio);ULEP(greenlet);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"
*** uWSGI compiling server core ***
[thread 1][clang] core/utils.o
[thread 3][clang] core/protocol.o
[thread 0][clang] core/socket.o
[thread 2][clang] core/logging.o
[thread 1][clang] core/master.o
[thread 3][clang] core/master_utils.o
[thread 0][clang] core/emperor.o
[thread 2][clang] core/notify.o
[thread 1][clang] core/mule.o
[thread 3][clang] core/subscription.o
[thread 0][clang] core/stats.o
[thread 2][clang] core/sendfile.o
[thread 1][clang] core/async.o
[thread 3][clang] core/master_checks.o
[thread 0][clang] core/fifo.o
[thread 2][clang] core/offload.o
[thread 1][clang] core/io.o
[thread 3][clang] core/static.o
[thread 0][clang] core/websockets.o
[thread 2][clang] core/spooler.o
[thread 1][clang] core/snmp.o
[thread 3][clang] core/exceptions.o
[thread 0][clang] core/config.o
[thread 2][clang] core/setup_utils.o
[thread 1][clang] core/clock.o
[thread 3][clang] core/init.o
[thread 0][clang] core/buffer.o
[thread 2][clang] core/reader.o
[thread 1][clang] core/writer.o
[thread 3][clang] core/alarm.o
[thread 0][clang] core/cron.o
[thread 2][clang] core/hooks.o
[thread 1][clang] core/plugins.o
[thread 3][clang] core/lock.o
[thread 0][clang] core/cache.o
[thread 2][clang] core/daemons.o
[thread 1][clang] core/errors.o
[thread 3][clang] core/hash.o
[thread 0][clang] core/master_events.o
[thread 2][clang] core/chunked.o
[thread 1][clang] core/queue.o
[thread 3][clang] core/event.o
[thread 0][clang] core/signal.o
[thread 2][clang] core/strings.o
[thread 1][clang] core/progress.o
[thread 3][clang] core/timebomb.o
[thread 0][clang] core/ini.o
[thread 2][clang] core/fsmon.o
[thread 1][clang] core/mount.o
[thread 3][clang] core/metrics.o
[thread 0][clang] core/plugins_builder.o
[thread 2][clang] core/sharedarea.o
[thread 1][clang] core/rpc.o
[thread 3][clang] core/gateway.o
[thread 0][clang] core/loop.o
[thread 2][clang] core/cookie.o
[thread 1][clang] core/querystring.o
[thread 3][clang] core/rb_timers.o
[thread 0][clang] core/transformations.o
[thread 2][clang] core/uwsgi.o
[thread 1][clang] proto/base.o
[thread 3][clang] proto/uwsgi.o
[thread 0][clang] proto/http.o
[thread 2][clang] proto/fastcgi.o
[thread 1][clang] proto/scgi.o
[thread 3][clang] proto/puwsgi.o
[thread 0][clang] core/zlib.o
[thread 2][clang] core/regexp.o
[thread 1][clang] core/routing.o
[thread 3][clang] core/yaml.o
[thread 0][clang] core/ssl.o
[thread 2][clang] core/legion.o
[thread 1][clang] core/xmlconf.o
[thread 3][clang] core/dot_h.o
[thread 0][clang] core/config_py.o
*** uWSGI compiling embedded plugins ***
[thread 2][clang] plugins/python/python_plugin.o
[thread 1][clang] plugins/python/pyutils.o
[thread 3][clang] plugins/python/pyloader.o
[thread 0][clang] plugins/python/wsgi_handlers.o
[thread 2][clang] plugins/python/wsgi_headers.o
[thread 1][clang] plugins/python/wsgi_subhandler.o
[thread 3][clang] plugins/python/web3_subhandler.o
[thread 0][clang] plugins/python/pump_subhandler.o
[thread 2][clang] plugins/python/gil.o
[thread 1][clang] plugins/python/uwsgi_pymodule.o
[thread 3][clang] plugins/python/profiler.o
[thread 0][clang] plugins/python/symimporter.o
[thread 2][clang] plugins/python/tracebacker.o
[thread 1][clang] plugins/python/raw.o
[thread 3][clang] plugins/asyncio/asyncio.o
[thread 0][clang] plugins/greenlet/greenlet.o
[thread 2][clang] plugins/ping/ping_plugin.o
[thread 1][clang] plugins/cache/cache.o
[thread 3][clang] plugins/nagios/nagios.o
plugins/greenlet/greenlet.c:2:10: fatal error: 'greenlet/greenlet.h' file not found
#include <greenlet/greenlet.h>
^
1 error generated. |
Original comment by kracekumar (Bitbucket: kracekumar, GitHub: kracekumar): Should I report the bug to distutils https://bitbucket.org/carljm/python-distutils ? |
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): @kracekumar I'm slightly surprised that it's not working for you with easy_install. Are you sure you typed it correctly? You mistyped it in your message above. It should be I don't believe the issue lies with distutils; it may lie with Python itself. But before you file a ticket with Python, I recommend you either file a ticket with uwsgi, which I see may not be possible, because the issue seems to be unique to their implementation (and around for some time). If you can't file a ticket with uwsgi, then I recommend you download the source and debug building it yourself or reach out on their support forums for help there. Best of luck |
Original comment by kracekumar (Bitbucket: kracekumar, GitHub: kracekumar): Already reported the bug in uwsgi unbit/uwsgi#1100. Also I typed correctly (
Thanks. |
Originally reported by: kracekumar (Bitbucket: kracekumar, GitHub: kracekumar)
I am using OSX 10.10.5 (14F27) and Python 3.5. Python 3.5 was installed via brew.
When greenlet is installed inside virtualenv using py3.5 header files are
missing inside /path/to/venv/include/python3.5m. As a result uwsgi is unable to build with asyncio support
Steps to reproduce
Also setuptools is at latest version 18.2.
Installing uwsgi site wide succeeds. greenlet directory is present inside
python3.5m
.Links:
The text was updated successfully, but these errors were encountered: