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

Failure to build wheel on Python 3.10.4 + AARCH64 #2434

Closed
cmanallen opened this issue May 6, 2022 · 6 comments
Closed

Failure to build wheel on Python 3.10.4 + AARCH64 #2434

cmanallen opened this issue May 6, 2022 · 6 comments

Comments

@cmanallen
Copy link

cmanallen commented May 6, 2022

This is being built inside a docker container. Fails with legacy-install-failure. Installs fine on x86 platforms. Also worked on older versions of python.

Failed build details:

Python version: 3.10.4
Arch: linux/arm64
Host OS: Ubuntu 20.04
Docker Image: python:3.10.4-bullseye (official image)

Most Recent Successful Build:

Python version: 3.9.12
Arch: linux/arm64
Host OS: Ubuntu 20.04
Docker Image: python:3.9.12-bullseye (official image)

#7 1.983 Collecting uwsgi
#7 2.012   Downloading uwsgi-2.0.20.tar.gz (804 kB)
#7 2.031      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 804.9/804.9 KB 50.1 MB/s eta 0:00:00
#7 2.179   Preparing metadata (setup.py): started
#7 2.524   Preparing metadata (setup.py): finished with status 'done'
#7 2.526 Building wheels for collected packages: uwsgi
#7 2.527   Building wheel for uwsgi (setup.py): started
#7 13.46   Building wheel for uwsgi (setup.py): finished with status 'error'
#7 13.46   error: subprocess-exited-with-error
#7 13.46   
#7 13.46   × python setup.py bdist_wheel did not run successfully.
#7 13.46   │ exit code: 1
#7 13.46   ╰─> [91 lines of output]
#7 13.46       /usr/local/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'descriptions'
#7 13.46         warnings.warn(msg)
#7 13.46       running bdist_wheel
#7 13.46       running build
#7 13.46       running build_py
#7 13.46       creating build
#7 13.46       creating build/lib
#7 13.46       copying uwsgidecorators.py -> build/lib
#7 13.46       installing to build/bdist.linux-aarch64/wheel
#7 13.46       running install
#7 13.46       using profile: buildconf/default.ini
#7 13.46       detected include path: ['/usr/lib/gcc/aarch64-linux-gnu/10/include', '/usr/local/include', '/usr/include/aarch64-linux-gnu', '/usr/include']
#7 13.46       Patching "bin_name" to properly install_scripts dir
#7 13.46       detected CPU cores: 2
#7 13.46       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.20\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="20" -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);"
#7 13.46       *** uWSGI compiling server core ***
#7 13.46       [thread 0][gcc -pthread] core/utils.o
#7 13.46       [thread 1][gcc -pthread] core/protocol.o
#7 13.46       [thread 1][gcc -pthread] core/socket.o
#7 13.46       [thread 1][gcc -pthread] core/logging.o
#7 13.46       [thread 0][gcc -pthread] core/master.o
#7 13.46       [thread 1][gcc -pthread] core/master_utils.o
#7 13.46       [thread 0][gcc -pthread] core/emperor.o
#7 13.46       [thread 1][gcc -pthread] core/notify.o
#7 13.46       [thread 1][gcc -pthread] core/mule.o
#7 13.46       [thread 0][gcc -pthread] core/subscription.o
#7 13.46       [thread 1][gcc -pthread] core/stats.o
#7 13.46       [thread 0][gcc -pthread] core/sendfile.o
#7 13.46       [thread 0][gcc -pthread] core/async.o
#7 13.46       [thread 1][gcc -pthread] core/master_checks.o
#7 13.46       [thread 0][gcc -pthread] core/fifo.o
#7 13.46       [thread 1][gcc -pthread] core/offload.o
#7 13.46       [thread 0][gcc -pthread] core/io.o
#7 13.46       [thread 1][gcc -pthread] core/static.o
#7 13.46       [thread 1][gcc -pthread] core/websockets.o
#7 13.46       [thread 0][gcc -pthread] core/spooler.o
#7 13.46       [thread 1][gcc -pthread] core/snmp.o
#7 13.46       [thread 0][gcc -pthread] core/exceptions.o
#7 13.46       [thread 1][gcc -pthread] core/config.o
#7 13.46       [thread 0][gcc -pthread] core/setup_utils.o
#7 13.46       [thread 0][gcc -pthread] core/clock.o
#7 13.46       [thread 1][gcc -pthread] core/init.o
#7 13.46       [thread 0][gcc -pthread] core/buffer.o
#7 13.46       [thread 1][gcc -pthread] core/reader.o
#7 13.46       [thread 0][gcc -pthread] core/writer.o
#7 13.46       [thread 1][gcc -pthread] core/alarm.o
#7 13.46       [thread 0][gcc -pthread] core/cron.o
#7 13.46       [thread 1][gcc -pthread] core/hooks.o
#7 13.46       [thread 0][gcc -pthread] core/plugins.o
#7 13.46       [thread 0][gcc -pthread] core/lock.o
#7 13.46       [thread 1][gcc -pthread] core/cache.o
#7 13.46       [thread 0][gcc -pthread] core/daemons.o
#7 13.46       [thread 0][gcc -pthread] core/errors.o
#7 13.46       [thread 1][gcc -pthread] core/hash.o
#7 13.46       [thread 0][gcc -pthread] core/master_events.o
#7 13.46       [thread 1][gcc -pthread] core/chunked.o
#7 13.46       [thread 0][gcc -pthread] core/queue.o
#7 13.46       [thread 1][gcc -pthread] core/event.o
#7 13.46       [thread 0][gcc -pthread] core/signal.o
#7 13.46       [thread 1][gcc -pthread] core/strings.o
#7 13.46       [thread 0][gcc -pthread] core/progress.o
#7 13.46       [thread 0][gcc -pthread] core/timebomb.o
#7 13.46       [thread 1][gcc -pthread] core/ini.o
#7 13.46       [thread 0][gcc -pthread] core/fsmon.o
#7 13.46       [thread 1][gcc -pthread] core/mount.o
#7 13.46       [thread 0][gcc -pthread] core/metrics.o
#7 13.46       [thread 1][gcc -pthread] core/plugins_builder.o
#7 13.46       [thread 1][gcc -pthread] core/sharedarea.o
#7 13.46       [thread 1][gcc -pthread] core/rpc.o
#7 13.46       [thread 0][gcc -pthread] core/gateway.o
#7 13.46       [thread 1][gcc -pthread] core/loop.o
#7 13.46       [thread 0][gcc -pthread] core/cookie.o
#7 13.46       [thread 0][gcc -pthread] core/querystring.o
#7 13.46       [thread 1][gcc -pthread] core/rb_timers.o
#7 13.46       [thread 0][gcc -pthread] core/transformations.o
#7 13.46       [thread 1][gcc -pthread] core/uwsgi.o
#7 13.46       [thread 0][gcc -pthread] proto/base.o
#7 13.46       [thread 0][gcc -pthread] proto/uwsgi.o
#7 13.46       [thread 0][gcc -pthread] proto/http.o
#7 13.46       [thread 0][gcc -pthread] proto/fastcgi.o
#7 13.46       [thread 0][gcc -pthread] proto/scgi.o
#7 13.46       [thread 0][gcc -pthread] proto/puwsgi.o
#7 13.46       [thread 1][gcc -pthread] lib/linux_ns.o
#7 13.46       [thread 0][gcc -pthread] core/zlib.o
#7 13.46       [thread 1][gcc -pthread] core/regexp.o
#7 13.46       [thread 0][gcc -pthread] core/routing.o
#7 13.46       [thread 1][gcc -pthread] core/yaml.o
#7 13.46       [thread 1][gcc -pthread] core/ssl.o
#7 13.46       [thread 1][gcc -pthread] core/legion.o
#7 13.46       [thread 0][gcc -pthread] core/xmlconf.o
#7 13.46       [thread 0][gcc -pthread] core/dot_h.o
#7 13.46       [end of output]
#7 13.46   
#7 13.46   note: This error originates from a subprocess, and is likely not a problem with pip.
#7 13.46   ERROR: Failed building wheel for uwsgi
#7 13.46   Running setup.py clean for uwsgi
#7 13.64 Failed to build uwsgi
#7 13.67 Installing collected packages: uwsgi
#7 13.67   Running setup.py install for uwsgi: started
#7 13.93   Running setup.py install for uwsgi: finished with status 'error'
#7 13.93   error: subprocess-exited-with-error
#7 13.93   
#7 13.93   × Running setup.py install for uwsgi did not run successfully.
#7 13.93   │ exit code: 1
#7 13.93   ╰─> [85 lines of output]
#7 13.93       /usr/local/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'descriptions'
#7 13.93         warnings.warn(msg)
#7 13.93       running install
#7 13.93       using profile: buildconf/default.ini
#7 13.93       detected include path: ['/usr/lib/gcc/aarch64-linux-gnu/10/include', '/usr/local/include', '/usr/include/aarch64-linux-gnu', '/usr/include']
#7 13.93       Patching "bin_name" to properly install_scripts dir
#7 13.93       detected CPU cores: 2
#7 13.93       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.20\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="20" -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);"
#7 13.93       *** uWSGI compiling server core ***
#7 13.93       core/utils.o is up to date
#7 13.93       core/protocol.o is up to date
#7 13.93       core/socket.o is up to date
#7 13.93       core/logging.o is up to date
#7 13.93       core/master.o is up to date
#7 13.93       core/master_utils.o is up to date
#7 13.93       core/emperor.o is up to date
#7 13.93       core/notify.o is up to date
#7 13.93       core/mule.o is up to date
#7 13.93       core/subscription.o is up to date
#7 13.93       core/stats.o is up to date
#7 13.93       core/sendfile.o is up to date
#7 13.93       core/async.o is up to date
#7 13.93       core/master_checks.o is up to date
#7 13.93       core/fifo.o is up to date
#7 13.93       core/offload.o is up to date
#7 13.93       core/io.o is up to date
#7 13.93       core/static.o is up to date
#7 13.93       core/websockets.o is up to date
#7 13.93       core/spooler.o is up to date
#7 13.93       core/snmp.o is up to date
#7 13.93       core/exceptions.o is up to date
#7 13.93       core/config.o is up to date
#7 13.93       core/setup_utils.o is up to date
#7 13.93       core/clock.o is up to date
#7 13.93       core/init.o is up to date
#7 13.93       core/buffer.o is up to date
#7 13.93       core/reader.o is up to date
#7 13.93       core/writer.o is up to date
#7 13.93       core/alarm.o is up to date
#7 13.93       core/cron.o is up to date
#7 13.93       core/hooks.o is up to date
#7 13.93       core/plugins.o is up to date
#7 13.93       core/lock.o is up to date
#7 13.93       core/cache.o is up to date
#7 13.93       core/daemons.o is up to date
#7 13.93       core/errors.o is up to date
#7 13.93       core/hash.o is up to date
#7 13.93       core/master_events.o is up to date
#7 13.93       core/chunked.o is up to date
#7 13.93       core/queue.o is up to date
#7 13.93       core/event.o is up to date
#7 13.93       core/signal.o is up to date
#7 13.93       core/strings.o is up to date
#7 13.93       core/progress.o is up to date
#7 13.93       core/timebomb.o is up to date
#7 13.93       core/ini.o is up to date
#7 13.93       core/fsmon.o is up to date
#7 13.93       core/mount.o is up to date
#7 13.93       core/metrics.o is up to date
#7 13.93       core/plugins_builder.o is up to date
#7 13.93       core/sharedarea.o is up to date
#7 13.93       core/rpc.o is up to date
#7 13.93       core/gateway.o is up to date
#7 13.93       core/loop.o is up to date
#7 13.93       core/cookie.o is up to date
#7 13.93       core/querystring.o is up to date
#7 13.93       core/rb_timers.o is up to date
#7 13.93       core/transformations.o is up to date
#7 13.93       core/uwsgi.o is up to date
#7 13.93       proto/base.o is up to date
#7 13.93       proto/uwsgi.o is up to date
#7 13.93       proto/http.o is up to date
#7 13.93       proto/fastcgi.o is up to date
#7 13.93       proto/scgi.o is up to date
#7 13.93       proto/puwsgi.o is up to date
#7 13.93       lib/linux_ns.o is up to date
#7 13.93       core/zlib.o is up to date
#7 13.93       core/regexp.o is up to date
#7 13.93       core/routing.o is up to date
#7 13.93       core/yaml.o is up to date
#7 13.93       core/ssl.o is up to date
#7 13.93       core/legion.o is up to date
#7 13.93       core/xmlconf.o is up to date
#7 13.93       [thread 1][gcc -pthread] core/dot_h.o
#7 13.93       [thread 0][gcc -pthread] core/config_py.o
#7 13.93       [end of output]
#7 13.93   
#7 13.93   note: This error originates from a subprocess, and is likely not a problem with pip.
#7 13.94 error: legacy-install-failure
#7 13.94 
#7 13.94 × Encountered error while trying to install package.
#7 13.94 ╰─> uwsgi
#7 13.94 
#7 13.94 note: This is an issue with the package mentioned above, not pip.
#7 13.94 hint: See above for output from the failure.
@cmanallen
Copy link
Author

The official docker image for python 3.10.4 is configured with the --with-lto flag enabled. More information here: https://docs.python.org/3/using/configure.html#performance-options

Could this affect uwsgi?

@cmanallen
Copy link
Author

cmanallen commented May 6, 2022

Found the issue which led to the flag being added: docker-library/python#501. Still unsure if this is relevant to uWSGI. I will try to do my own A/B testing with the flag enabled and disabled.

@hrw
Copy link

hrw commented Jul 25, 2022

It also fails on Ubuntu 22.04 (which uses Python 3.10):

INFO:kolla.common.utils.barbican-base:      core/lock.c: In function ‘uwsgi_lock_fast_init’:
INFO:kolla.common.utils.barbican-base:      core/lock.c:114:17: warning: ‘pthread_mutexattr_setrobust_np’ is deprecated: pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust [-Wdeprecated-declarations]
INFO:kolla.common.utils.barbican-base:        114 |                 if (pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST)) {
INFO:kolla.common.utils.barbican-base:            |                 ^~
INFO:kolla.common.utils.barbican-base:      In file included from /usr/include/features.h:486,
INFO:kolla.common.utils.barbican-base:                       from /usr/include/aarch64-linux-gnu/bits/libc-header-start.h:33,
INFO:kolla.common.utils.barbican-base:                       from /usr/include/stdio.h:27,
INFO:kolla.common.utils.barbican-base:                       from ./uwsgi.h:165,
INFO:kolla.common.utils.barbican-base:                       from core/lock.c:1:
INFO:kolla.common.utils.barbican-base:      /usr/include/pthread.h:951:12: note: declared here
INFO:kolla.common.utils.barbican-base:        951 | extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
INFO:kolla.common.utils.barbican-base:            |            ^~~~~~~~~~~~~~
INFO:kolla.common.utils.barbican-base:      core/lock.c: In function ‘uwsgi_lock_fast’:
INFO:kolla.common.utils.barbican-base:      core/lock.c:176:17: warning: ‘pthread_mutex_consistent_np’ is deprecated: pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent [-Wdeprecated-declarations]
INFO:kolla.common.utils.barbican-base:        176 |                 pthread_mutex_consistent((pthread_mutex_t *) uli->lock_ptr);
INFO:kolla.common.utils.barbican-base:            |                 ^~~~~~~~~~~~~~~~~~~~~~~~
INFO:kolla.common.utils.barbican-base:      In file included from /usr/include/features.h:486,
INFO:kolla.common.utils.barbican-base:                       from /usr/include/aarch64-linux-gnu/bits/libc-header-start.h:33,
INFO:kolla.common.utils.barbican-base:                       from /usr/include/stdio.h:27,
INFO:kolla.common.utils.barbican-base:                       from ./uwsgi.h:165,
INFO:kolla.common.utils.barbican-base:                       from core/lock.c:1:
INFO:kolla.common.utils.barbican-base:      /usr/include/pthread.h:859:12: note: declared here
INFO:kolla.common.utils.barbican-base:        859 | extern int __REDIRECT_NTH (pthread_mutex_consistent_np, (pthread_mutex_t *),
INFO:kolla.common.utils.barbican-base:            |            ^~~~~~~~~~~~~~

Full log: https://8328992c1a6ec5c32212-c90ace1b1592b04a13c7070fc984a3af.ssl.cf5.rackcdn.com/839585/33/check-arm64/kolla-build-ubuntu-aarch64/3c34705/kolla/build/000_FAILED_barbican-base.log

@MikeVL
Copy link

MikeVL commented Aug 8, 2022

Sometimes same issue on Debian bullseye and python v3.10

@Luferov
Copy link

Luferov commented Sep 16, 2022

Same

@xrmx
Copy link
Collaborator

xrmx commented Oct 24, 2022

Flaky builds should be fixed in 2.0.21.

@xrmx xrmx closed this as completed Oct 24, 2022
lukasjuhrich added a commit to agdsn/pycroft that referenced this issue Nov 22, 2022
2.0.21 is a release guaranteed to incorporate the required changes.
Furthermore, it fixes some flaky build problems[1].

[1] unbit/uwsgi#2434 (comment)
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

5 participants