Closed phrfpeixoto closed 8 years ago
While trying to install requirements for this project, on macOS 10.12, the system fails to build uWSGI.
pip output:
Running setup.py bdist_wheel for uWSGI ... error Complete output from command /usr/local/pythonenv/speakerfight/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/9g/yq_20wvd5j52fp0p7hcww8z00000gn/T/pip-build-mR0dxy/uWSGI/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/9g/yq_20wvd5j52fp0p7hcww8z00000gn/T/tmpI6lRMHpip-wheel- --python-tag cp27: running bdist_wheel running build running build_py creating build creating build/lib copying uwsgidecorators.py -> build/lib installing to build/bdist.macosx-10.12-intel/wheel running install using profile: buildconf/default.ini detected include path: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks'] Patching "bin_name" to properly install_scripts dir detected CPU cores: 8 configured CFLAGS: -O2 -I. -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -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.39/include -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_UUID -DUWSGI_VERSION="\"2.0.5\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="5" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);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(gevent);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][cc] core/utils.o [thread 0][cc] core/protocol.o [thread 3][cc] core/socket.o [thread 4][cc] core/logging.o [thread 5][cc] core/master.o [thread 7][cc] core/master_utils.o [thread 6][cc] core/emperor.o [thread 2][cc] core/notify.o [thread 1][cc] core/mule.o [thread 0][cc] core/subscription.o core/socket.c:708:28: error: use of undeclared identifier 'SOL_TCP' if (setsockopt(serverfd, SOL_TCP, TCP_FASTOPEN, (const void *) &uwsgi.tcp_fast_open, sizeof(int)) < 0) { ^ 1 error generated. ---------------------------------------- Failed building wheel for uWSGI Running setup.py clean for uWSGI Running setup.py bdist_wheel for smarturls ... done Stored in directory: /Users/peixoto/Library/Caches/pip/wheels/76/03/c7/e724412c0e97fd0e1528a9b4957b71f6ff0db7799dab7f4b9a Running setup.py bdist_wheel for pycparser ... done Stored in directory: /Users/peixoto/Library/Caches/pip/wheels/9b/f4/2e/d03e949a551719a1ffcb659f2c63d8444f4df12e994ce52112 Successfully built MarkupSafe PyYAML Pygments Werkzeug coverage django-activelink django-allauth django-anymail django-bootstrap3 django-coverage django-datetime-widget django-vanilla-views django-queryset-csv master-sake mccabe networkx oauthlib python-openid requests-oauthlib sqlparse smarturls pycparser Failed to build uWSGI Installing collected packages: Django, MarkupSafe, PyYAML, Pygments, Werkzeug, coverage, django-activelink, python-openid, oauthlib, requests, requests-oauthlib, django-allauth, six, django-anymail, django-bootstrap3, django-coverage, pytz, django-datetime-widget, sqlparse, django-debug-toolbar, django-extensions, django-vanilla-views, django-queryset-csv, djangorestframework, networkx, master-sake, mccabe, python-coveralls, raven, uWSGI, smarturls, idna, ipaddress, enum34, pyasn1, pycparser, cffi, cryptography, paramiko, Fabric Running setup.py install for uWSGI ... error Complete output from command /usr/local/pythonenv/speakerfight/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/9g/yq_20wvd5j52fp0p7hcww8z00000gn/T/pip-build-mR0dxy/uWSGI/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/9g/yq_20wvd5j52fp0p7hcww8z00000gn/T/pip-CBY3Mw-record/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/pythonenv/speakerfight/include/site/python2.7/uWSGI: running install using profile: buildconf/default.ini detected include path: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks'] Patching "bin_name" to properly install_scripts dir detected CPU cores: 8 configured CFLAGS: -O2 -I. -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -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.39/include -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_UUID -DUWSGI_VERSION="\"2.0.5\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="5" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);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(gevent);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 *** core/utils.o is up to date core/protocol.o is up to date [thread 1][cc] core/socket.o core/logging.o is up to date [thread 2][cc] core/master.o [thread 3][cc] core/master_utils.o [thread 4][cc] core/emperor.o [thread 6][cc] core/notify.o [thread 5][cc] core/mule.o [thread 7][cc] core/subscription.o [thread 0][cc] core/stats.o core/socket.c:708:28: error: use of undeclared identifier 'SOL_TCP' if (setsockopt(serverfd, SOL_TCP, TCP_FASTOPEN, (const void *) &uwsgi.tcp_fast_open, sizeof(int)) < 0) { ^ 1 error generated. ---------------------------------------- Command "/usr/local/pythonenv/speakerfight/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/9g/yq_20wvd5j52fp0p7hcww8z00000gn/T/pip-build-mR0dxy/uWSGI/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/9g/yq_20wvd5j52fp0p7hcww8z00000gn/T/pip-CBY3Mw-record/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/pythonenv/speakerfight/include/site/python2.7/uWSGI" failed with error code 1 in /private/var/folders/9g/yq_20wvd5j52fp0p7hcww8z00000gn/T/pip-build-mR0dxy/uWSGI/
You can just comment the line in the requirements.txt and run the django with the built in server: python manage.py runserver
requirements.txt
python manage.py runserver
It seems the problem is solved on uWSGI 2.0.11.2
While trying to install requirements for this project, on macOS 10.12, the system fails to build uWSGI.
pip output: