unbit / uwsgi

uWSGI application server container
http://projects.unbit.it/uwsgi
Other
3.46k stars 692 forks source link

Unable to install on Ubuntu 22.04 with Python 3.10 #2562

Closed alanhamlett closed 1 year ago

alanhamlett commented 1 year ago
$ pip install uwsgi==2.0.22
Collecting uwsgi==2.0.22
  Using cached uwsgi-2.0.22.tar.gz (809 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: uwsgi
  Building wheel for uwsgi (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [192 lines of output]
      /usr/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'descriptions'
        warnings.warn(msg)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib
      copying uwsgidecorators.py -> build/lib
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      installing to build/bdist.linux-x86_64/wheel
      running install
      using profile: buildconf/default.ini
      detected include path: ['/usr/lib/gcc/x86_64-linux-gnu/11/include', '/usr/local/include', '/usr/include/x86_64-linux-gnu', '/usr/include']
      Patching "bin_name" to properly install_scripts dir
      detected CPU cores: 16
      configured CFLAGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY  -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_UUID -DUWSGI_VERSION="\"2.0.22\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="22" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -I/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 2][x86_64-linux-gnu-gcc] core/utils.o
      [thread 0][x86_64-linux-gnu-gcc] core/protocol.o
      [thread 1][x86_64-linux-gnu-gcc] core/socket.o
      [thread 4][x86_64-linux-gnu-gcc] core/logging.o
      [thread 5][x86_64-linux-gnu-gcc] core/master.o
      [thread 3][x86_64-linux-gnu-gcc] core/master_utils.o
      [thread 10][x86_64-linux-gnu-gcc] core/emperor.o
      [thread 6][x86_64-linux-gnu-gcc] core/notify.o
      [thread 7][x86_64-linux-gnu-gcc] core/mule.o
      [thread 9][x86_64-linux-gnu-gcc] core/subscription.o
      [thread 13][x86_64-linux-gnu-gcc] core/stats.o
      [thread 11][x86_64-linux-gnu-gcc] core/sendfile.o
      [thread 8][x86_64-linux-gnu-gcc] core/async.o
      [thread 15][x86_64-linux-gnu-gcc] core/master_checks.o
      [thread 14][x86_64-linux-gnu-gcc] core/fifo.o
      [thread 12][x86_64-linux-gnu-gcc] core/offload.o
      [thread 11][x86_64-linux-gnu-gcc] core/io.o
      [thread 6][x86_64-linux-gnu-gcc] core/static.o
      [thread 14][x86_64-linux-gnu-gcc] core/websockets.o
      [thread 8][x86_64-linux-gnu-gcc] core/spooler.o
      [thread 15][x86_64-linux-gnu-gcc] core/snmp.o
      [thread 12][x86_64-linux-gnu-gcc] core/exceptions.o
      [thread 7][x86_64-linux-gnu-gcc] core/config.o
      [thread 13][x86_64-linux-gnu-gcc] core/setup_utils.o
      [thread 0][x86_64-linux-gnu-gcc] core/clock.o
      [thread 9][x86_64-linux-gnu-gcc] core/init.o
      [thread 5][x86_64-linux-gnu-gcc] core/buffer.o
      [thread 6][x86_64-linux-gnu-gcc] core/reader.o
      [thread 14][x86_64-linux-gnu-gcc] core/writer.o
      [thread 15][x86_64-linux-gnu-gcc] core/alarm.o
      [thread 13][x86_64-linux-gnu-gcc] core/cron.o
      [thread 12][x86_64-linux-gnu-gcc] core/hooks.o
      [thread 8][x86_64-linux-gnu-gcc] core/plugins.o
      [thread 0][x86_64-linux-gnu-gcc] core/lock.o
      [thread 3][x86_64-linux-gnu-gcc] core/cache.o
      [thread 1][x86_64-linux-gnu-gcc] core/daemons.o
      [thread 4][x86_64-linux-gnu-gcc] core/errors.o
      [thread 11][x86_64-linux-gnu-gcc] core/hash.o
      [thread 9][x86_64-linux-gnu-gcc] core/master_events.o
      [thread 7][x86_64-linux-gnu-gcc] core/chunked.o
      core/lock.c: In function ‘uwsgi_lock_fast_init’:
      core/lock.c:114:17: warning: ‘pthread_mutexattr_setrobust_np’ is deprecated: pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust [-Wdeprecated-declarations]
        114 |                 if (pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST)) {
            |                 ^~
      In file included from /usr/include/features.h:486,
                       from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                       from /usr/include/stdio.h:27,
                       from ./uwsgi.h:165,
                       from core/lock.c:1:
      /usr/include/pthread.h:951:12: note: declared here
        951 | extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
            |            ^~~~~~~~~~~~~~
      core/lock.c: In function ‘uwsgi_lock_fast’:
      core/lock.c:176:17: warning: ‘pthread_mutex_consistent_np’ is deprecated: pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent [-Wdeprecated-declarations]
        176 |                 pthread_mutex_consistent((pthread_mutex_t *) uli->lock_ptr);
            |                 ^~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /usr/include/features.h:486,
                       from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                       from /usr/include/stdio.h:27,
                       from ./uwsgi.h:165,
                       from core/lock.c:1:
      /usr/include/pthread.h:859:12: note: declared here
        859 | extern int __REDIRECT_NTH (pthread_mutex_consistent_np, (pthread_mutex_t *),
            |            ^~~~~~~~~~~~~~
      [thread 10][x86_64-linux-gnu-gcc] core/queue.o
      [thread 5][x86_64-linux-gnu-gcc] core/event.o
      [thread 13][x86_64-linux-gnu-gcc] core/signal.o
      [thread 15][x86_64-linux-gnu-gcc] core/strings.o
      [thread 8][x86_64-linux-gnu-gcc] core/progress.o
      [thread 4][x86_64-linux-gnu-gcc] core/timebomb.o
      [thread 6][x86_64-linux-gnu-gcc] core/ini.o
      [thread 0][x86_64-linux-gnu-gcc] core/fsmon.o
      [thread 11][x86_64-linux-gnu-gcc] core/mount.o
      [thread 14][x86_64-linux-gnu-gcc] core/metrics.o
      [thread 12][x86_64-linux-gnu-gcc] core/plugins_builder.o
      [thread 9][x86_64-linux-gnu-gcc] core/sharedarea.o
      [thread 7][x86_64-linux-gnu-gcc] core/rpc.o
      [thread 1][x86_64-linux-gnu-gcc] core/gateway.o
      [thread 10][x86_64-linux-gnu-gcc] core/loop.o
      [thread 4][x86_64-linux-gnu-gcc] core/cookie.o
      [thread 5][x86_64-linux-gnu-gcc] core/querystring.o
      [thread 8][x86_64-linux-gnu-gcc] core/rb_timers.o
      [thread 6][x86_64-linux-gnu-gcc] core/transformations.o
      [thread 0][x86_64-linux-gnu-gcc] core/uwsgi.o
      [thread 13][x86_64-linux-gnu-gcc] proto/base.o
      [thread 11][x86_64-linux-gnu-gcc] proto/uwsgi.o
      [thread 12][x86_64-linux-gnu-gcc] proto/http.o
      [thread 15][x86_64-linux-gnu-gcc] proto/fastcgi.o
      [thread 7][x86_64-linux-gnu-gcc] proto/scgi.o
      [thread 1][x86_64-linux-gnu-gcc] proto/puwsgi.o
      [thread 10][x86_64-linux-gnu-gcc] lib/linux_ns.o
      [thread 4][x86_64-linux-gnu-gcc] core/zlib.o
      [thread 2][x86_64-linux-gnu-gcc] core/regexp.o
      [thread 5][x86_64-linux-gnu-gcc] core/routing.o
      [thread 9][x86_64-linux-gnu-gcc] core/yaml.o
      [thread 6][x86_64-linux-gnu-gcc] core/ssl.o
      [thread 8][x86_64-linux-gnu-gcc] core/legion.o
      [thread 3][x86_64-linux-gnu-gcc] core/xmlconf.o
      [thread 11][x86_64-linux-gnu-gcc] core/dot_h.o
      [thread 11][x86_64-linux-gnu-gcc] core/config_py.o
      *** uWSGI compiling embedded plugins ***
      [thread 11][x86_64-linux-gnu-gcc] plugins/python/python_plugin.o
      [thread 1][x86_64-linux-gnu-gcc] plugins/python/pyutils.o
      [thread 7][x86_64-linux-gnu-gcc] plugins/python/pyloader.o
      [thread 15][x86_64-linux-gnu-gcc] plugins/python/wsgi_handlers.o
      [thread 13][x86_64-linux-gnu-gcc] plugins/python/wsgi_headers.o
      [thread 10][x86_64-linux-gnu-gcc] plugins/python/wsgi_subhandler.o
      [thread 14][x86_64-linux-gnu-gcc] plugins/python/web3_subhandler.o
      [thread 2][x86_64-linux-gnu-gcc] plugins/python/pump_subhandler.o
      [thread 4][x86_64-linux-gnu-gcc] plugins/python/gil.o
      [thread 9][x86_64-linux-gnu-gcc] plugins/python/uwsgi_pymodule.o
      [thread 12][x86_64-linux-gnu-gcc] plugins/python/profiler.o
      [thread 3][x86_64-linux-gnu-gcc] plugins/python/symimporter.o
      [thread 6][x86_64-linux-gnu-gcc] plugins/python/tracebacker.o
      [thread 13][x86_64-linux-gnu-gcc] plugins/python/raw.o
      [thread 1][x86_64-linux-gnu-gcc] plugins/gevent/gevent.o
      [thread 4][x86_64-linux-gnu-gcc] plugins/gevent/hooks.o
      [thread 14][x86_64-linux-gnu-gcc] plugins/ping/ping_plugin.o
      [thread 15][x86_64-linux-gnu-gcc] plugins/cache/cache.o
      [thread 10][x86_64-linux-gnu-gcc] plugins/nagios/nagios.o
      [thread 2][x86_64-linux-gnu-gcc] plugins/rrdtool/rrdtool.o
      [thread 7][x86_64-linux-gnu-gcc] plugins/carbon/carbon.o
      [thread 12][x86_64-linux-gnu-gcc] plugins/rpc/rpc_plugin.o
      [thread 8][x86_64-linux-gnu-gcc] plugins/corerouter/cr_common.o
      [thread 3][x86_64-linux-gnu-gcc] plugins/corerouter/cr_map.o
      [thread 6][x86_64-linux-gnu-gcc] plugins/corerouter/corerouter.o
      [thread 13][x86_64-linux-gnu-gcc] plugins/fastrouter/fastrouter.o
      [thread 14][x86_64-linux-gnu-gcc] plugins/http/http.o
      [thread 10][x86_64-linux-gnu-gcc] plugins/http/keepalive.o
      [thread 2][x86_64-linux-gnu-gcc] plugins/http/https.o
      [thread 15][x86_64-linux-gnu-gcc] plugins/http/spdy3.o
      [thread 4][x86_64-linux-gnu-gcc] plugins/ugreen/ugreen.o
      [thread 11][x86_64-linux-gnu-gcc] plugins/signal/signal_plugin.o
      [thread 5][x86_64-linux-gnu-gcc] plugins/syslog/syslog_plugin.o
      [thread 1][x86_64-linux-gnu-gcc] plugins/rsyslog/rsyslog_plugin.o
      [thread 7][x86_64-linux-gnu-gcc] plugins/logsocket/logsocket_plugin.o
      [thread 8][x86_64-linux-gnu-gcc] plugins/router_uwsgi/router_uwsgi.o
      [thread 3][x86_64-linux-gnu-gcc] plugins/router_redirect/router_redirect.o
      [thread 12][x86_64-linux-gnu-gcc] plugins/router_basicauth/router_basicauth.o
      [thread 10][x86_64-linux-gnu-gcc] plugins/zergpool/zergpool.o
      [thread 11][x86_64-linux-gnu-gcc] plugins/redislog/redislog_plugin.o
      [thread 4][x86_64-linux-gnu-gcc] plugins/mongodblog/mongodblog_plugin.o
      [thread 5][x86_64-linux-gnu-gcc] plugins/router_rewrite/router_rewrite.o
      [thread 1][x86_64-linux-gnu-gcc] plugins/router_http/router_http.o
      [thread 13][x86_64-linux-gnu-gcc] plugins/logfile/logfile.o
      [thread 7][x86_64-linux-gnu-gcc] plugins/router_cache/router_cache.o
      [thread 2][x86_64-linux-gnu-gcc] plugins/rawrouter/rawrouter.o
      [thread 8][x86_64-linux-gnu-gcc] plugins/router_static/router_static.o
      [thread 3][x86_64-linux-gnu-gcc] plugins/sslrouter/sslrouter.o
      [thread 6][x86_64-linux-gnu-gcc] plugins/spooler/spooler_plugin.o
      [thread 15][x86_64-linux-gnu-gcc] plugins/cheaper_busyness/cheaper_busyness.o
      [thread 10][x86_64-linux-gnu-gcc] plugins/symcall/symcall_plugin.o
      [thread 12][x86_64-linux-gnu-gcc] plugins/transformation_tofile/tofile.o
      [thread 4][x86_64-linux-gnu-gcc] plugins/transformation_gzip/gzip.o
      [thread 11][x86_64-linux-gnu-gcc] plugins/transformation_chunked/chunked.o
      [thread 5][x86_64-linux-gnu-gcc] plugins/transformation_offload/offload.o
      [thread 14][x86_64-linux-gnu-gcc] plugins/router_memcached/router_memcached.o
      [thread 0][x86_64-linux-gnu-gcc] plugins/router_redis/router_redis.o
      [thread 13][x86_64-linux-gnu-gcc] plugins/router_hash/router_hash.o
      [thread 1][x86_64-linux-gnu-gcc] plugins/router_expires/expires.o
      [thread 6][x86_64-linux-gnu-gcc] plugins/router_metrics/plugin.o
      [thread 8][x86_64-linux-gnu-gcc] plugins/transformation_template/tt.o
      [thread 7][x86_64-linux-gnu-gcc] plugins/stats_pusher_socket/plugin.o
      *** uWSGI linking ***
      x86_64-linux-gnu-gcc -o build/bdist.linux-x86_64/wheel/uWSGI-2.0.22.data/scripts/uwsgi -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu core/utils.o core/protocol.o core/socket.o core/logging.o core/master.o core/master_utils.o core/emperor.o core/notify.o core/mule.o core/subscription.o core/stats.o core/sendfile.o core/async.o core/master_checks.o core/fifo.o core/offload.o core/io.o core/static.o core/websockets.o core/spooler.o core/snmp.o core/exceptions.o core/config.o core/setup_utils.o core/clock.o core/init.o core/buffer.o core/reader.o core/writer.o core/alarm.o core/cron.o core/hooks.o core/plugins.o core/lock.o core/cache.o core/daemons.o core/errors.o core/hash.o core/master_events.o core/chunked.o core/queue.o core/event.o core/signal.o core/strings.o core/progress.o core/timebomb.o core/ini.o core/fsmon.o core/mount.o core/metrics.o core/plugins_builder.o core/sharedarea.o core/rpc.o core/gateway.o core/loop.o core/cookie.o core/querystring.o core/rb_timers.o core/transformations.o core/uwsgi.o proto/base.o proto/uwsgi.o proto/http.o proto/fastcgi.o proto/scgi.o proto/puwsgi.o lib/linux_ns.o core/zlib.o core/regexp.o core/routing.o core/yaml.o core/ssl.o core/legion.o core/xmlconf.o core/dot_h.o core/config_py.o plugins/python/python_plugin.o plugins/python/pyutils.o plugins/python/pyloader.o plugins/python/wsgi_handlers.o plugins/python/wsgi_headers.o plugins/python/wsgi_subhandler.o plugins/python/web3_subhandler.o plugins/python/pump_subhandler.o plugins/python/gil.o plugins/python/uwsgi_pymodule.o plugins/python/profiler.o plugins/python/symimporter.o plugins/python/tracebacker.o plugins/python/raw.o plugins/gevent/gevent.o plugins/gevent/hooks.o plugins/ping/ping_plugin.o plugins/cache/cache.o plugins/nagios/nagios.o plugins/rrdtool/rrdtool.o plugins/carbon/carbon.o plugins/rpc/rpc_plugin.o plugins/corerouter/cr_common.o plugins/corerouter/cr_map.o plugins/corerouter/corerouter.o plugins/fastrouter/fastrouter.o plugins/http/http.o plugins/http/keepalive.o plugins/http/https.o plugins/http/spdy3.o plugins/ugreen/ugreen.o plugins/signal/signal_plugin.o plugins/syslog/syslog_plugin.o plugins/rsyslog/rsyslog_plugin.o plugins/logsocket/logsocket_plugin.o plugins/router_uwsgi/router_uwsgi.o plugins/router_redirect/router_redirect.o plugins/router_basicauth/router_basicauth.o plugins/zergpool/zergpool.o plugins/redislog/redislog_plugin.o plugins/mongodblog/mongodblog_plugin.o plugins/router_rewrite/router_rewrite.o plugins/router_http/router_http.o plugins/logfile/logfile.o plugins/router_cache/router_cache.o plugins/rawrouter/rawrouter.o plugins/router_static/router_static.o plugins/sslrouter/sslrouter.o plugins/spooler/spooler_plugin.o plugins/cheaper_busyness/cheaper_busyness.o plugins/symcall/symcall_plugin.o plugins/transformation_tofile/tofile.o plugins/transformation_gzip/gzip.o plugins/transformation_chunked/chunked.o plugins/transformation_offload/offload.o plugins/router_memcached/router_memcached.o plugins/router_redis/router_redis.o plugins/router_hash/router_hash.o plugins/router_expires/expires.o plugins/router_metrics/plugin.o plugins/transformation_template/tt.o plugins/stats_pusher_socket/plugin.o -lpthread -lm -rdynamic -ldl -lz -lpcre -luuid -lssl -lcrypto -lxml2 -lcrypt -ldl -lm -lm -lpython3.10 -lcrypt
      /usr/bin/ld: core/ssl.o: in function `uwsgi_rsa_sign':
      ssl.c:(.text+0x88b): undefined reference to `EVP_PKEY_size'
      /usr/bin/ld: core/legion.o: in function `uwsgi_legion_register':
      legion.c:(.text+0x230e): undefined reference to `EVP_CIPHER_key_length'
      /usr/bin/ld: legion.c:(.text+0x232e): undefined reference to `EVP_CIPHER_iv_length'
      /usr/bin/ld: plugins/http/https.o: in function `hr_https_add_vars':
      https.c:(.text+0x1109): undefined reference to `SSL_get_peer_certificate'
      collect2: error: ld returned 1 exit status
      *** error linking uWSGI ***
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for uwsgi
  Running setup.py clean for uwsgi
Failed to build uwsgi
ERROR: Could not build wheels for uwsgi, which is required to install pyproject.toml-based projects
xrmx commented 1 year ago

It looks like you are linking against an openssl 3? Install of the 1.1.1x series or disable ssl if you don't need it.

alanhamlett commented 1 year ago

Oh, good catch! 1.1.1x is not longer supported and I'm using Nginx to terminate SSL so I'll disable SSL. Thank you!

I should disable ssl like this?

export UWSGI_PROFILE_OVERRIDE=ssl=false;
pip install uwsgi==2.0.22
alanhamlett commented 1 year ago

It worked, thanks!

xrmx commented 1 year ago

@alanhamlett what version of openssl do you have? It builds fine (with warnings) with 3.0.10.