unbit / uwsgi

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

Installing uWSGI on Apple arm64 via pyenv fails #2361

Open armenzg opened 3 years ago

armenzg commented 3 years ago

Trying to install uWSGI on Apple arm64 with Python 3.8 fails to install.

❯ pip install uWSGI
Collecting uWSGI
  Using cached uwsgi-2.0.20.tar.gz (804 kB)
Building wheels for collected packages: uWSGI
  Building wheel for uWSGI (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/armenzg/code/sentry/.venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j1/d109sd4n55qbk5ty8gzq5jgm0000gn/T/pip-install-5pe1tbp4/uwsgi_64641fb1ef6241c9aa31a9e1399b7a94/setup.py'"'"'; __file__='"'"'/private/var/folders/j1/d109sd4n55qbk5ty8gzq5jgm0000gn/T/pip-install-5pe1tbp4/uwsgi_64641fb1ef6241c9aa31a9e1399b7a94/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/j1/d109sd4n55qbk5ty8gzq5jgm0000gn/T/pip-wheel-r8_whs5q
       cwd: /private/var/folders/j1/d109sd4n55qbk5ty8gzq5jgm0000gn/T/pip-install-5pe1tbp4/uwsgi_64641fb1ef6241c9aa31a9e1399b7a94/
  Complete output (159 lines):
  /Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/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
  warning: build_py: byte-compiling is disabled, skipping.

  installing to build/bdist.macosx-11.6-arm64/wheel
  running install
  using profile: buildconf/default.ini
  detected include path: ['/usr/local/include', '/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include', '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include', '/Library/Developer/CommandLineTools/usr/include', '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks']
  Patching "bin_name" to properly install_scripts dir
  detected CPU cores: 8
  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 -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/opt/homebrew/Cellar/pcre/8.45/include -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 -I/opt/homebrew/Cellar/yajl/2.1.0/include/ -DUWSGI_JSON -DUWSGI_JSON_YAJL -DUWSGI_XML -DUWSGI_XML_EXPAT -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(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(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 0][clang] core/utils.o
...
plugins/transformation_template/tt.o is up to date
    plugins/stats_pusher_socket/plugin.o is up to date
    *** uWSGI linking ***
    clang -o /Users/armenzg/code/sentry/.venv/bin/uwsgi  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 core/zlib.o core/regexp.o core/routing.o core/yaml.o core/json.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/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 -lz -L/opt/homebrew/Cellar/pcre/8.45/lib -lpcre -L/opt/homebrew/Cellar/yajl/2.1.0/lib -lyajl -lexpat -lintl -ldl -framework CoreFoundation /Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a
    ld: library not found for -lintl
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    *** error linking uWSGI ***
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/armenzg/code/sentry/.venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j1/d109sd4n55qbk5ty8gzq5jgm0000gn/T/pip-install-0ybxsy1e/uwsgi_43bb5b2fe5fb4443810882ba7a562f46/setup.py'"'"'; __file__='"'"'/private/var/folders/j1/d109sd4n55qbk5ty8gzq5jgm0000gn/T/pip-install-0ybxsy1e/uwsgi_43bb5b2fe5fb4443810882ba7a562f46/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/j1/d109sd4n55qbk5ty8gzq5jgm0000gn/T/pip-record-cku5uzjt/install-record.txt --single-version-externally-managed --compile --install-headers /Users/armenzg/code/sentry/.venv/include/site/python3.8/uWSGI Check the logs for full command output.
xrmx commented 3 years ago

ld: library not found for -lintl

armenzg commented 3 years ago

I read that but I was unable to figure how to add it. There were no prerequisites listed in the docs for Apple.

armenzg commented 3 years ago

It seems that all Python versions installed via pyenv end up failing to install (Python versions installed via homebrew work).

If I call ~/.pyenv/versions/3.8.12/bin/python uwsgiconfig.py -b and I print sysconfig.get_config_var("LIBS").split() I will get ['-lintl', '-ldl', '-framework', 'CoreFoundation'].

I see this in /opt/homebrew which is where brew installs on Apple M1 hosts.

❯ ls -l /opt/homebrew/lib/libintl*
lrwxr-xr-x  1 armenzg  admin  42  2 Nov 15:05 /opt/homebrew/lib/libintl.8.dylib -> ../Cellar/gettext/0.21/lib/libintl.8.dylib
lrwxr-xr-x  1 armenzg  admin  36  2 Nov 15:05 /opt/homebrew/lib/libintl.a -> ../Cellar/gettext/0.21/lib/libintl.a
lrwxr-xr-x  1 armenzg  admin  40  2 Nov 15:05 /opt/homebrew/lib/libintl.dylib -> ../Cellar/gettext/0.21/lib/libintl.dylib

Because of that, I tried to adjust the include without success:

UWSGI_INCLUDES=/opt/homebrew/lib ~/.pyenv/versions/3.8.12/bin/python uwsgiconfig.py -b
...
detected include path: ['/opt/homebrew/lib', '/usr/local/include', '/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include', '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include', '/Library/Developer/CommandLineTools/usr/include', '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks']

I then tried to remove -lintl from libs and I got this instead:

clang -o uwsgi  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/fork_server.o core/webdav.o core/zeus.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 core/zlib.o core/regexp.o core/routing.o core/yaml.o core/json.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/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 plugins/router_fcgi/router_fcgi.o -lpthread -lm -lz -L/opt/homebrew/Cellar/pcre/8.45/lib -lpcre -L/opt/homebrew/Cellar/yajl/2.1.0/lib -lyajl -lexpat -ldl -framework CoreFoundation /Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(getargs.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(boolobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(abstract.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(bytearrayobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(bytesobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(methodobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(object.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(dictobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(signalmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(errors.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pythonrun.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(ceval.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(exceptions.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(fileobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(frameobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(funcobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pystate.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(import.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(listobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(longobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(memoryobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(modsupport.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(moduleobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(posixmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(call.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(obmalloc.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(sysmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(tupleobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(typeobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(unicodeobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pylifecycle.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(getcompiler.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(getversion.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(initconfig.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pathconfig.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(compile.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(ast.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(Python-ast.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pyarena.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(genobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(iterobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(capsule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(cellobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(descrobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(codeobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(codecs.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(complexobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(sliceobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(enumobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_warnings.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(floatobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(setobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(acceler.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pyhash.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(frozen.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(classobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(rangeobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(marshal.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(node.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(odictobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pystrtod.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pystrcmp.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(mysnprintf.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(weakrefobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(gcmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(parsetok.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(picklebufobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(preconfig.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(structseq.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(symtable.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(thread.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(traceback.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(fileutils.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(getbuildinfo.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(getcopyright.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(getplatform.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(bltinmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(formatter_unicode.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(context.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(faulthandler.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(dynload_shlib.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(config.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(importdl.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(interpreteridobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pytime.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_tracemalloc.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(namespaceobject.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(getopt.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(bootstrap_hash.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(graminit.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(getpath.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(unicodectype.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(bytes_methods.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pyctype.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pystrhex.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(peephole.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(future.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(grammar1.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_abc.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_codecsmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_collectionsmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_functoolsmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_iomodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_localemodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_operator.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_sre.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_stat.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(symtablemodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_threadmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(_weakref.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(atexitmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(errnomodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(itertoolsmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(pwdmodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(timemodule.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(xxsubtype.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(structmember.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(myreadline.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(mystrtoul.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(parser.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(tokenizer.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(ast_unparse.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(ast_opt.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(hamt.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(asdl.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(dtoa.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(hashtable.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(bufferedio.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(bytesio.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(fileio.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(iobase.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(textio.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(stringio.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(token.o)) was built for newer macOS version (11.6) than being linked (11.0)
ld: warning: object file (/Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a(accu.o)) was built for newer macOS version (11.6) than being linked (11.0)
Undefined symbols for architecture arm64:
  "_libintl_bind_textdomain_codeset", referenced from:
      _PyIntl_bind_textdomain_codeset in libpython3.8.a(_localemodule.o)
  "_libintl_bindtextdomain", referenced from:
      _PyIntl_bindtextdomain in libpython3.8.a(_localemodule.o)
  "_libintl_dcgettext", referenced from:
      _PyIntl_dcgettext in libpython3.8.a(_localemodule.o)
  "_libintl_dgettext", referenced from:
      _PyIntl_dgettext in libpython3.8.a(_localemodule.o)
  "_libintl_gettext", referenced from:
      _PyIntl_gettext in libpython3.8.a(_localemodule.o)
  "_libintl_setlocale", referenced from:
      _PyLocale_setlocale in libpython3.8.a(_localemodule.o)
      _PyLocale_localeconv in libpython3.8.a(_localemodule.o)
  "_libintl_textdomain", referenced from:
      _PyIntl_textdomain in libpython3.8.a(_localemodule.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
*** error linking uWSGI ***
armenzg commented 3 years ago

The Python version via Homebrew works: /opt/homebrew/Cellar/python@3.8/3.8.12_1/bin/python3 uwsgiconfig.py -b

-lintl does not show up in the clang command:

clang -o uwsgi  ... -lpthread -lm -lz -L/opt/homebrew/Cellar/pcre/8.45/lib -lpcre -L/opt/homebrew/Cellar/yajl/2.1.0/lib -lyajl -lexpat -ldl -framework CoreFoundation /opt/homebrew/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/config-3.8-darwin/libpython3.8.a
armenzg commented 3 years ago

I've worked around it by building a wheel via the working Python installation and then uploading the wheel to a GC bucket.

 /opt/homebrew/Cellar/python@3.8/3.8.12_1/bin/python3 -m pip install "uWSGI==2.0.19.1"
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting uWSGI==2.0.19.1
  Using cached uWSGI-2.0.19.1.tar.gz (803 kB)
Building wheels for collected packages: uWSGI
  Building wheel for uWSGI (setup.py) ... done
  Created wheel for uWSGI: filename=uWSGI-2.0.19.1-cp38-cp38-macosx_11_0_arm64.whl size=429996 sha256=ea8babaecb9fbe7be4d2b84c5cc32bc0bb05e1f5d2d833fe50fb8fae68cc01b5
  Stored in directory: /Users/armenzg/Library/Caches/pip/wheels/87/01/0f/2fc9c74a1ae010de7d8b17d90f6b39595cbb8ac5169345fcb8
Successfully built uWSGI
Installing collected packages: uWSGI
  DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Successfully installed uWSGI-2.0.19.1
xrmx commented 3 years ago

Have you tried with UWSGI_INCLUDES=/opt/homebrew instead?

armenzg commented 3 years ago

Have you tried with UWSGI_INCLUDES=/opt/homebrew instead?

I tried the full path /opt/homebrew/lib w/o success:

image

I can't try for now as my M1 is out for repairs.

xrmx commented 3 years ago

Seen that, my point is that you had the right intuition but used an incorrect path.

DanielKorsa commented 3 years ago

Hi there,

just got the same issue while installing uwsgi. Will try your suggestions rn. @armenzg has it worked out for you? Cheers

armenzg commented 3 years ago

I've not had time to try it as my laptop is out of commission. Maybe later this week.

sajoku commented 3 years ago

I'm also running into this I managed to get around this by installing uWSGI from a homebrew python 3.10 version and point to that whl from within my Piffle (I'm using pipenv).

The commands: /opt/homebrew/Cellar/python@3.10/3.10.0_2/bin/pip3 install "uWSGI==2.0.20" which outputs where the whl is cached. cp <cached-dir> /packages/ Now you can edit your Pipfile: uwsgi = {path="/packages/uWSGI-2.0.20-cp310-cp310-macosx_12_0_arm64.whl" } pipenv install

In my case this is fine as this project will install dependencies from its own pypi server so I can just provide this whl there also. But this does not seems to be a "real" workaround.

The UWSGI_INCLUDES option did not work for me.

armenzg commented 3 years ago

I'm back! :)

I run: UWSGI_INCLUDES=/opt/homebrew ~/.pyenv/versions/3.8.12/bin/python uwsgiconfig.py -b and it failed with (as in my opening output):

[thread 3][clang] plugins/router_fcgi/router_fcgi.o
*** uWSGI linking ***
clang -o uwsgi  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/fork_server.o core/webdav.o core/zeus.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 core/zlib.o core/regexp.o core/routing.o core/yaml.o core/json.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/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 plugins/router_fcgi/router_fcgi.o -lpthread -lm -lz -L/opt/homebrew/Cellar/pcre/8.45/lib -lpcre -L/opt/homebrew/Cellar/yajl/2.1.0/lib -lyajl -lexpat -lintl -ldl -framework CoreFoundation /Users/armenzg/.pyenv/versions/3.8.12/lib/python3.8/config-3.8-darwin/libpython3.8.a
ld: library not found for -lintl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
*** error linking uWSGI ***

I tried to validate that building with the Python that brew provides work. It builds, however, the binary is not happy:

$ /opt/homebrew/Cellar/python@3.10/3.10.0_2/bin/python3 uwsgiconfig.py -b
/Users/armenzg/code/uwsgi/uwsgiconfig.py:23: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils import sysconfig
/Users/armenzg/code/uwsgi/uwsgiconfig.py:23: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
  from distutils import sysconfig
using profile: buildconf/default.ini
detected include path: ['/Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include', '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include', '/Library/Developer/CommandLineTools/usr/include', '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks']
detected CPU cores: 8
configured CFLAGS: -O2 -I. -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -mmacosx-version-min=10.9 -DUWSGI_LOCK_USE_OSX_SPINLOCK -DUWSGI_EVENT_USE_KQUEUE -DUWSGI_EVENT_TIMER_USE_KQUEUE -DUWSGI_EVENT_FILEMONITOR_USE_KQUEUE -I/opt/homebrew/Cellar/pcre/8.45/include -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_UUID -DUWSGI_VERSION="\"2.1-dev-e24fef1f\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="1" -DUWSGI_VERSION_MINOR="0" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"dev-e24fef1f\"" -DUWSGI_YAML -I/opt/homebrew/Cellar/yajl/2.1.0/include/ -DUWSGI_JSON -DUWSGI_JSON_YAJL -DUWSGI_XML -DUWSGI_XML_EXPAT -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(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);UDEP(router_fcgi);" -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(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);ULEP(router_fcgi);"
*** uWSGI compiling server core ***
<-- TRIM -->
*** uWSGI compiling embedded plugins ***
<-- TRIM -->
*** uWSGI linking ***
clang -o uwsgi  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/fork_server.o core/webdav.o core/zeus.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 core/zlib.o core/regexp.o core/routing.o core/yaml.o core/json.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/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 plugins/router_fcgi/router_fcgi.o -lpthread -lm -lz -L/opt/homebrew/Cellar/pcre/8.45/lib -lpcre -L/opt/homebrew/Cellar/yajl/2.1.0/lib -lyajl -lexpat -ldl -framework CoreFoundation /opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin/libpython3.10.a
################# uWSGI configuration #################

kernel = Darwin
execinfo = False
ifaddrs = True
locking = osx_spinlock
event = kqueue
timer = kqueue
filemonitor = kqueue
pcre = True
routing = True
capabilities = False
yaml = embedded
json = yajl
ssl = False
xml = expat
debug = False
plugin_dir = .
zlib = True
ucontext = False
malloc = libc

############## end of uWSGI configuration #############
total build time: 0 seconds
*** uWSGI is ready, launch it with ./uwsgi ***

$ ./uwsgi
*** Starting uWSGI 2.1-dev-e24fef1f (64bit) on [Wed Nov 17 08:52:10 2021] ***
compiled with version: Apple LLVM 13.0.0 (clang-1300.0.29.3) on 17 November 2021 13:46:23
os: Darwin-21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101
nodename: Armens-M1.local
machine: arm64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /Users/armenzg/code/uwsgi
detected binary path: /Users/armenzg/code/uwsgi/uwsgi
dropping root privileges as early as possible
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 2666
your memory page size is 16384 bytes
detected max file descriptor number: 2560
lock engine: OSX spinlocks
thunder lock: disabled (you can enable it with --thunder-lock)
dropping root privileges after socket binding
dropping root privileges after plugin initialization
The -s/--socket option is missing and stdin is not a socket.
armenzg commented 3 years ago

Just to make it easier to see, I'm only going to list from the point that the clang command differs.

In this order:

The last two build properly and these are some differences between them.

Brew's python

$ /opt/homebrew/Cellar/python@3.10/3.10.0_2/bin/python3 uwsgiconfig.py -b
<-- TRIM -->
$ ./uwsgi
*** Starting uWSGI 2.1-dev-e24fef1f (64bit) on [Wed Nov 17 09:13:16 2021] ***
compiled with version: Apple LLVM 13.0.0 (clang-1300.0.29.3) on 17 November 2021 13:46:23
os: Darwin-21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101
nodename: Armens-M1.local
machine: arm64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /Users/armenzg/code/uwsgi
detected binary path: /Users/armenzg/code/uwsgi/uwsgi
dropping root privileges as early as possible
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 2666
your memory page size is 16384 bytes
detected max file descriptor number: 2560
lock engine: OSX spinlocks
thunder lock: disabled (you can enable it with --thunder-lock)
dropping root privileges after socket binding
dropping root privileges after plugin initialization
The -s/--socket option is missing and stdin is not a socket.

$ otool -L uwsgi
uwsgi:
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
    /opt/homebrew/opt/pcre/lib/libpcre.1.dylib (compatibility version 4.0.0, current version 4.13.0)
    /opt/homebrew/opt/yajl/lib/libyajl.2.dylib (compatibility version 2.0.0, current version 2.1.0)
    /usr/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 8.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1853.0.0)
    /opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/Python (compatibility version 3.10.0, current version 3.10.0)

/usr/bin/python3

This would probably work if the Python 3 installer was installed (/Library/Frameworks/Python3.framework would exist).

$ ./uwsgi
dyld[62787]: Library not loaded: @rpath/Python3.framework/Versions/3.8/Python3
  Referenced from: /Users/armenzg/code/uwsgi/uwsgi
  Reason: tried: '/Library/Frameworks/Python3.framework/Versions/3.8/Python3' (no such file), '/System/Library/Frameworks/Python3.framework/Versions/3.8/Python3' (no such file)
zsh: abort      ./uwsgi

$ otool -L uwsgi
uwsgi:
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
    /opt/homebrew/opt/pcre/lib/libpcre.1.dylib (compatibility version 4.0.0, current version 4.13.0)
    /opt/homebrew/opt/yajl/lib/libyajl.2.dylib (compatibility version 2.0.0, current version 2.1.0)
    /usr/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 8.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1853.0.0)
    @rpath/Python3.framework/Versions/3.8/Python3 (compatibility version 3.8.0, current version 3.8.0)
armenzg commented 3 years ago

This works for Python installations that fail with -lintl missing:

LDFLAGS=-L/opt/homebrew/Cellar/gettext/0.21/lib pip install "uWSGI==2.0.19.1"

@sajoku @DanielKorsa let me know if this works for you

sajoku commented 2 years ago

This works for Python installations that fail with -lintl missing:

LDFLAGS=-L/opt/homebrew/Cellar/gettext/0.21/lib pip install "uWSGI==2.0.19.1"

@sajoku @DanielKorsa let me know if this works for you

Awesome, this works for me.

Below are the steps I performed. A cached version was being used so I needed to remove it first.

~/projects
λ pip install "uWSGI==2.0.20"
Requirement already satisfied: uWSGI==2.0.20 in /Users/sajoku/.pyenv/versions/3.10.0/lib/python3.10/site-packages (2.0.20)

Remove the cached uWSGI version. rm -rf /Users/sajoku/.pyenv/versions/3.10.0/lib/python3.10/site-packages/uWSGI-2.0.20.dist-info

Try installing without using pips cache and without the LDFLAGS option: pip install --no-cache-dir "uWSGI==2.0.20" The above fails.

Try with the LDFLAGS set: LDFLAGS=-L/opt/homebrew/Cellar/gettext/0.21/lib pip install --no-cache-dir "uWSGI==2.0.20" This works :tada:

pettyalex commented 2 years ago

This works for Python installations that fail with -lintl missing:

LDFLAGS=-L/opt/homebrew/Cellar/gettext/0.21/lib pip install "uWSGI==2.0.19.1"

@sajoku @DanielKorsa let me know if this works for you

This worked for me after wrestling with a couple of different potential solutions.

What can we do to allow uwsgi's setup.py to search this path by default?

Arti3DPlayer commented 2 years ago

same issue

denkasyanov commented 2 years ago

To anyone who still has the same issue, you may need to bump the version in gettext path. What worked for me now: LDFLAGS=-L/opt/homebrew/Cellar/gettext/0.21.1/lib ...

I used pip-sync against uWSGI pinned to 2.0.21 but I believe it will be like that: LDFLAGS=-L/opt/homebrew/Cellar/gettext/0.21.1/lib pip install "uWSGI==2.0.21"

denkasyanov commented 7 months ago

It's 2024 and this is what I now use to install this library on Apple Silicon Mac

LDFLAGS="-L/opt/homebrew/Cellar/gettext/0.22.5/lib -L/opt/homebrew/Cellar/openssl@3/3.2.1/lib" pip install "uWSGI==2.0.24"

Make sure relevant versions are specified