{"action":"created","issue":{"url":"https://api.github.com/repos/unbit/uwsgi/issues/1211","repository_url":"https://api.github.com/repos/unbit/uwsgi","labels_url":"https://api.github.com/repos/unbit/uwsgi/issues/1211/labels{/name}","comments_url":"https://api.github.com/repos/unbit/uwsgi/issues/1211/comments","events_url":"https://api.github.com/repos/unbit/uwsgi/issues/1211/events","html_url":"https://github.com/unbit/uwsgi/issues/1211","id":141587791,"number":1211,"title":"Issue when building on musl based distro with default profile","user":{"login":"patrick91","id":667029,"avatar_url":"https://avatars.githubusercontent.com/u/667029?v=3","gravatar_id":"","url":"https://api.github.com/users/patrick91","html_url":"https://github.com/patrick91","followers_url":"https://api.github.com/users/patrick91/followers","following_url":"https://api.github.com/users/patrick91/following{/other_user}","gists_url":"https://api.github.com/users/patrick91/gists{/gist_id}","starred_url":"https://api.github.com/users/patrick91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrick91/subscriptions","organizations_url":"https://api.github.com/users/patrick91/orgs","repos_url":"https://api.github.com/users/patrick91/repos","events_url":"https://api.github.com/users/patrick91/events{/privacy}","received_events_url":"https://api.github.com/users/patrick91/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-03-17T13:46:14Z","updated_at":"2016-03-20T12:10:28Z","closed_at":null,"body":"As noted in #1210 there are some issue when trying to install uwsgi on a distro which is using `musl`.\r\nI've done a small test with docker using Alpine. Here is the docker file:\r\n\r\n```\r\nFROM alpine:3.3\r\n\r\nRUN apk add --no-cache python python-dev gcc musl-dev linux-headers\r\nRUN apk add --no-cache --virtual=build-dependencies wget ca-certificates && \\\r\n    wget \"https://bootstrap.pypa.io/get-pip.py\" -O /dev/stdout | python\r\n\r\n\r\nRUN apk add --no-cache git\r\nRUN pip install -e git+git://github.com/unbit/uwsgi.git#egg=uwsgi\r\n```\r\n\r\nAnd this is the full log of the error\r\n\r\n```\r\n/tmp/uwsgi-alpine docker build -t uwsgi .\r\nSending build context to Docker daemon 2.048 kB\r\nStep 1 : FROM alpine:3.3\r\n ---> 70c557e50ed6\r\nStep 2 : RUN apk add --no-cache python python-dev gcc musl-dev linux-headers\r\n ---> Using cache\r\n ---> a5ee82f679dc\r\nStep 3 : RUN apk add --no-cache --virtual=build-dependencies wget ca-certificates &&     wget \"https://bootstrap.pypa.io/get-pip.py\" -O /dev/stdout | python\r\n ---> Using cache\r\n ---> 5b0ca26cd71d\r\nStep 4 : RUN apk add --no-cache git\r\n ---> Using cache\r\n ---> ca3e4d94fec4\r\nStep 5 : RUN pip install -e git+git://github.com/unbit/uwsgi.git#egg=uwsgi\r\n ---> Running in 12861e040918\r\nObtaining uwsgi from git+git://github.com/unbit/uwsgi.git#egg=uwsgi\r\n  Cloning git://github.com/unbit/uwsgi.git to /src/uwsgi\r\nInstalling collected packages: uwsgi\r\n  Running setup.py develop for uwsgi\r\n    Complete output from command /usr/bin/python -c \"import setuptools, tokenize;__file__='/src/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" develop --no-deps:\r\n    /usr/lib/python2.7/site-packages/setuptools/dist.py:294: UserWarning: The version specified ('2.1-dev-3dc786f') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.\r\n      \"details.\" % self.metadata.version\r\n    running develop\r\n    running egg_info\r\n    writing uWSGI.egg-info/PKG-INFO\r\n    writing top-level names to uWSGI.egg-info/top_level.txt\r\n    writing dependency_links to uWSGI.egg-info/dependency_links.txt\r\n    warning: manifest_maker: standard file '-c' not found\r\n\r\n    reading manifest file 'uWSGI.egg-info/SOURCES.txt'\r\n    writing manifest file 'uWSGI.egg-info/SOURCES.txt'\r\n    running build_ext\r\n    using profile: buildconf/default.ini\r\n    detected include path: ['/usr/include', '/usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/include']\r\n    Patching \"bin_name\" to properly install_scripts dir\r\n    detected CPU cores: 1\r\n    configured CFLAGS: -O2 -I. -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_VERSION=\"\\\"2.1-dev-3dc786f\\\"\" -DUWSGI_VERSION_BASE=\"2\" -DUWSGI_VERSION_MAJOR=\"1\" -DUWSGI_VERSION_MINOR=\"0\" -DUWSGI_VERSION_REVISION=\"0\" -DUWSGI_VERSION_CUSTOM=\"\\\"dev-3dc786f\\\"\" -DUWSGI_YAML -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);\"\r\n    *** uWSGI compiling server core ***\r\n    [gcc] core/utils.o\r\n    [gcc] core/protocol.o\r\n    [gcc] core/socket.o\r\n    [gcc] core/logging.o\r\n    [gcc] core/master.o\r\n    [gcc] core/master_utils.o\r\n    [gcc] core/emperor.o\r\n    [gcc] core/notify.o\r\n    [gcc] core/mule.o\r\n    [gcc] core/subscription.o\r\n    [gcc] core/stats.o\r\n    [gcc] core/sendfile.o\r\n    [gcc] core/async.o\r\n    [gcc] core/master_checks.o\r\n    [gcc] core/fifo.o\r\n    [gcc] core/offload.o\r\n    [gcc] core/io.o\r\n    [gcc] core/static.o\r\n    [gcc] core/websockets.o\r\n    [gcc] core/spooler.o\r\n    [gcc] core/snmp.o\r\n    [gcc] core/exceptions.o\r\n    [gcc] core/config.o\r\n    [gcc] core/setup_utils.o\r\n    [gcc] core/clock.o\r\n    [gcc] core/init.o\r\n    [gcc] core/buffer.o\r\n    [gcc] core/reader.o\r\n    [gcc] core/writer.o\r\n    [gcc] core/alarm.o\r\n    [gcc] core/cron.o\r\n    [gcc] core/hooks.o\r\n    [gcc] core/plugins.o\r\n    [gcc] core/lock.o\r\n    [gcc] core/cache.o\r\n    [gcc] core/daemons.o\r\n    [gcc] core/errors.o\r\n    [gcc] core/hash.o\r\n    [gcc] core/master_events.o\r\n    [gcc] core/chunked.o\r\n    [gcc] core/queue.o\r\n    [gcc] core/event.o\r\n    [gcc] core/signal.o\r\n    [gcc] core/strings.o\r\n    [gcc] core/progress.o\r\n    [gcc] core/timebomb.o\r\n    [gcc] core/ini.o\r\n    [gcc] core/fsmon.o\r\n    [gcc] core/mount.o\r\n    [gcc] core/metrics.o\r\n    [gcc] core/plugins_builder.o\r\n    [gcc] core/sharedarea.o\r\n    [gcc] core/fork_server.o\r\n    [gcc] core/webdav.o\r\n    [gcc] core/zeus.o\r\n    [gcc] core/rpc.o\r\n    [gcc] core/gateway.o\r\n    [gcc] core/loop.o\r\n    [gcc] core/cookie.o\r\n    [gcc] core/querystring.o\r\n    [gcc] core/rb_timers.o\r\n    [gcc] core/transformations.o\r\n    [gcc] core/uwsgi.o\r\n    [gcc] proto/base.o\r\n    [gcc] proto/uwsgi.o\r\n    [gcc] proto/http.o\r\n    [gcc] proto/fastcgi.o\r\n    [gcc] proto/scgi.o\r\n    [gcc] proto/puwsgi.o\r\n    [gcc] lib/linux_ns.o\r\n    [gcc] core/yaml.o\r\n    [gcc] core/dot_h.o\r\n    [gcc] core/config_py.o\r\n    *** uWSGI compiling embedded plugins ***\r\n    [gcc] plugins/python/python_plugin.o\r\n    [gcc] plugins/python/pyutils.o\r\n    [gcc] plugins/python/pyloader.o\r\n    [gcc] plugins/python/wsgi_handlers.o\r\n    [gcc] plugins/python/wsgi_headers.o\r\n    [gcc] plugins/python/wsgi_subhandler.o\r\n    [gcc] plugins/python/web3_subhandler.o\r\n    [gcc] plugins/python/pump_subhandler.o\r\n    [gcc] plugins/python/gil.o\r\n    [gcc] plugins/python/uwsgi_pymodule.o\r\n    [gcc] plugins/python/profiler.o\r\n    [gcc] plugins/python/symimporter.o\r\n    [gcc] plugins/python/tracebacker.o\r\n    [gcc] plugins/python/raw.o\r\n    [gcc] plugins/gevent/gevent.o\r\n    [gcc] plugins/gevent/hooks.o\r\n    [gcc] plugins/ping/ping_plugin.o\r\n    [gcc] plugins/cache/cache.o\r\n    [gcc] plugins/nagios/nagios.o\r\n    [gcc] plugins/rrdtool/rrdtool.o\r\n    [gcc] plugins/carbon/carbon.o\r\n    [gcc] plugins/rpc/rpc_plugin.o\r\n    [gcc] plugins/corerouter/cr_common.o\r\n    [gcc] plugins/corerouter/cr_map.o\r\n    [gcc] plugins/corerouter/corerouter.o\r\n    [gcc] plugins/fastrouter/fastrouter.o\r\n    [gcc] plugins/http/http.o\r\n    [gcc] plugins/http/keepalive.o\r\n    [gcc] plugins/http/https.o\r\n    [gcc] plugins/http/spdy3.o\r\n    [gcc] plugins/ugreen/ugreen.o\r\n    [gcc] plugins/signal/signal_plugin.o\r\n    [gcc] plugins/syslog/syslog_plugin.o\r\n    [gcc] plugins/rsyslog/rsyslog_plugin.o\r\n    [gcc] plugins/logsocket/logsocket_plugin.o\r\n    [gcc] plugins/router_uwsgi/router_uwsgi.o\r\n    [gcc] plugins/router_redirect/router_redirect.o\r\n    [gcc] plugins/router_basicauth/router_basicauth.o\r\n    [gcc] plugins/zergpool/zergpool.o\r\n    [gcc] plugins/redislog/redislog_plugin.o\r\n    [gcc] plugins/mongodblog/mongodblog_plugin.o\r\n    [gcc] plugins/router_rewrite/router_rewrite.o\r\n    [gcc] plugins/router_http/router_http.o\r\n    [gcc] plugins/logfile/logfile.o\r\n    [gcc] plugins/router_cache/router_cache.o\r\n    [gcc] plugins/rawrouter/rawrouter.o\r\n    [gcc] plugins/router_static/router_static.o\r\n    [gcc] plugins/sslrouter/sslrouter.o\r\n    [gcc] plugins/spooler/spooler_plugin.o\r\n    [gcc] plugins/cheaper_busyness/cheaper_busyness.o\r\n    [gcc] plugins/symcall/symcall_plugin.o\r\n    [gcc] plugins/transformation_tofile/tofile.o\r\n    [gcc] plugins/transformation_gzip/gzip.o\r\n    [gcc] plugins/transformation_chunked/chunked.o\r\n    [gcc] plugins/transformation_offload/offload.o\r\n    [gcc] plugins/router_memcached/router_memcached.o\r\n    [gcc] plugins/router_redis/router_redis.o\r\n    [gcc] plugins/router_hash/router_hash.o\r\n    [gcc] plugins/router_expires/expires.o\r\n    [gcc] plugins/router_metrics/plugin.o\r\n    [gcc] plugins/transformation_template/tt.o\r\n    [gcc] plugins/stats_pusher_socket/plugin.o\r\n    *** uWSGI linking ***\r\n    gcc -o /usr/bin/uwsgi -L/usr/lib -Wl,-rpath,/usr/lib 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 lib/linux_ns.o core/yaml.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 -ldl -lm -lpython2.7 -lcryptplugins/ugreen/ugreen.o: In function `u_green_init':\r\n    ugreen.c:(.text+0xca): undefined reference to `getcontext'\r\n    plugins/ugreen/ugreen.o: In function `u_green_schedule_to_req':\r\n    ugreen.c:(.text+0x2db): undefined reference to `swapcontext'\r\n    ugreen.c:(.text+0x329): undefined reference to `makecontext'\r\n    plugins/ugreen/ugreen.o: In function `u_green_schedule_to_main':\r\n    ugreen.c:(.text+0x39a): undefined reference to `swapcontext'\r\n    collect2: error: ld returned 1 exit status\r\n\r\n    *** error linking uWSGI ***\r\n\r\n    ----------------------------------------\r\nCommand \"/usr/bin/python -c \"import setuptools, tokenize;__file__='/src/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" develop --no-deps\" failed with error code 1 in /src/uwsgi/\r\nThe command '/bin/sh -c pip install -e git+git://github.com/unbit/uwsgi.git#egg=uwsgi' returned a non-zero code: 1\r\n```\r\n\r\nIf I change the profile to be `core` it works nicely:\r\n\r\n```\r\nRUN UWSGI_PROFILE=core pip install -e git+git://github.com/unbit/uwsgi.git#egg=uwsgi\r\n```"},"comment":{"url":"https://api.github.com/repos/unbit/uwsgi/issues/comments/198913812","html_url":"https://github.com/unbit/uwsgi/issues/1211#issuecomment-198913812","issue_url":"https://api.github.com/repos/unbit/uwsgi/issues/1211","id":198913812,"user":{"login":"patrick91","id":667029,"avatar_url":"https://avatars.githubusercontent.com/u/667029?v=3","gravatar_id":"","url":"https://api.github.com/users/patrick91","html_url":"https://github.com/patrick91","followers_url":"https://api.github.com/users/patrick91/followers","following_url":"https://api.github.com/users/patrick91/following{/other_user}","gists_url":"https://api.github.com/users/patrick91/gists{/gist_id}","starred_url":"https://api.github.com/users/patrick91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrick91/subscriptions","organizations_url":"https://api.github.com/users/patrick91/orgs","repos_url":"https://api.github.com/users/patrick91/repos","events_url":"https://api.github.com/users/patrick91/events{/privacy}","received_events_url":"https://api.github.com/users/patrick91/received_events","type":"User","site_admin":false},"created_at":"2016-03-20T12:10:28Z","updated_at":"2016-03-20T12:10:28Z","body":"Same error with the master branch :)"}}