Skip to content

Instantly share code, notes, and snippets.

@stavxyz
Last active May 18, 2018 13:21
Show Gist options
  • Save stavxyz/2f049310dcd889dc72bf to your computer and use it in GitHub Desktop.
Save stavxyz/2f049310dcd889dc72bf to your computer and use it in GitHub Desktop.
uwsgi docker fail -- alpine 3.2

now trying with the uwsgi-python package

https://pkgs.alpinelinux.org/package/main/x86_64/uwsgi-python

This is when trying to run uwsgi:

server_1 | open("./http_plugin.so"): No such file or directory [core/utils.c line 3675]
server_1 | !!! UNABLE to load uWSGI plugin: Error loading shared library ./http_plugin.so: No such file or directory !!!
server_1 | open("./python_plugin.so"): No such file or directory [core/utils.c line 3675]
server_1 | !!! UNABLE to load uWSGI plugin: Error loading shared library ./python_plugin.so: No such file or directory !!!
server_1 | uwsgi: option is ambiguous: http
server_1 | getopt_long() error

Installed musl-dev, linux-headers and now...

current apk update command:

RUN apk --update add python3 bash libevent-dev libffi-dev openssl-dev python3-dev build-base yaml git musl-dev linux-headers

When trying to install uwsgi from requirements.txt:


  Running setup.py install for uwsgi
    core/utils.c: In function 'uwsgi_as_root':
    core/utils.c:344:3: error: implicit declaration of function 'unshare' [-Werror=implicit-function-declaration]
       if (unshare(uwsgi.unshare)) {
       ^
    core/utils.c:564:5: error: implicit declaration of function 'sigfillset' [-Werror=implicit-function-declaration]
         sigfillset(&smask);
         ^
    core/utils.c:565:5: error: implicit declaration of function 'sigprocmask' [-Werror=implicit-function-declaration]
         sigprocmask(SIG_BLOCK, &smask, NULL);
         ^
    core/utils.c:565:17: error: 'SIG_BLOCK' undeclared (first use in this function)
         sigprocmask(SIG_BLOCK, &smask, NULL);
                     ^
    core/utils.c:565:17: note: each undeclared identifier is reported only once for each function it appears in
    core/utils.c:586:3: error: implicit declaration of function 'chroot' [-Werror=implicit-function-declaration]
       if (chroot(uwsgi.chroot)) {
       ^
    core/utils.c:791:5: error: unknown type name 'ushort'
         ushort *array;
         ^
    core/utils.c:833:4: error: implicit declaration of function 'setgroups' [-Werror=implicit-function-declaration]
        if (setgroups(0, NULL)) {
        ^
    core/utils.c:848:4: error: implicit declaration of function 'initgroups' [-Werror=implicit-function-declaration]
        if (initgroups(uidname, uwsgi.gid)) {
        ^
    core/utils.c: In function 'uwsgi_close_request':
    core/utils.c:1145:18: error: 'WAIT_ANY' undeclared (first use in this function)
       while (waitpid(WAIT_ANY, &waitpid_status, WNOHANG) > 0);
                      ^
    core/utils.c: In function 'uwsgi_resolve_ip':
    core/utils.c:1802:2: error: implicit declaration of function 'gethostbyname' [-Werror=implicit-function-declaration]
      he = gethostbyname(domain);
      ^
    core/utils.c:1802:5: error: assignment makes pointer from integer without a cast [-Werror]
      he = gethostbyname(domain);
         ^
    core/utils.c: In function 'uwsgi_unix_signal':
    core/utils.c:1936:19: error: storage size of 'sa' isn't known
      struct sigaction sa;
                       ^
    core/utils.c:1938:24: error: invalid application of 'sizeof' to incomplete type 'struct sigaction'
      memset(&sa, 0, sizeof(struct sigaction));
                            ^
    core/utils.c:1942:2: error: implicit declaration of function 'sigemptyset' [-Werror=implicit-function-declaration]
      sigemptyset(&sa.sa_mask);
      ^
    core/utils.c:1944:2: error: implicit declaration of function 'sigaction' [-Werror=implicit-function-declaration]
      if (sigaction(signum, &sa, NULL) < 0) {
      ^
    core/utils.c:1936:19: error: unused variable 'sa' [-Werror=unused-variable]
      struct sigaction sa;
                       ^
    core/utils.c: In function 'uwsgi_list_has_num':
    core/utils.c:1953:2: error: implicit declaration of function 'strtok_r' [-Werror=implicit-function-declaration]
      uwsgi_foreach_token(list2, ",", p, ctx) {
      ^
    In file included from core/utils.c:1:0:
    ./uwsgi.h:140:46: error: assignment makes pointer from integer without a cast [-Werror]
     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))
                                                  ^
    core/utils.c:1953:2: note: in expansion of macro 'uwsgi_foreach_token'
      uwsgi_foreach_token(list2, ",", p, ctx) {
      ^
    ./uwsgi.h:140:70: error: assignment makes pointer from integer without a cast [-Werror]
     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))
                                                                          ^
    core/utils.c:1953:2: note: in expansion of macro 'uwsgi_foreach_token'
      uwsgi_foreach_token(list2, ",", p, ctx) {
      ^
    core/utils.c: In function 'uwsgi_list_has_str':
    ./uwsgi.h:140:46: error: assignment makes pointer from integer without a cast [-Werror]
     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))
                                                  ^
    core/utils.c:1968:2: note: in expansion of macro 'uwsgi_foreach_token'
      uwsgi_foreach_token(list2, " ", p, ctx) {
      ^
    ./uwsgi.h:140:70: error: assignment makes pointer from integer without a cast [-Werror]
     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))
                                                                          ^
    core/utils.c:1968:2: note: in expansion of macro 'uwsgi_foreach_token'
      uwsgi_foreach_token(list2, " ", p, ctx) {
      ^
    core/utils.c:1969:3: error: implicit declaration of function 'strcasecmp' [-Werror=implicit-function-declaration]
       if (!strcasecmp(p, str)) {
       ^
    core/utils.c: In function 'uwsgi_sig_pause':
    core/utils.c:2361:2: error: implicit declaration of function 'sigsuspend' [-Werror=implicit-function-declaration]
      sigsuspend(&mask);
      ^
    core/utils.c: In function 'uwsgi_run_command_putenv_and_wait':
    core/utils.c:2453:3: error: implicit declaration of function 'putenv' [-Werror=implicit-function-declaration]
       if (putenv(envs[i])) {
       ^
    In file included from core/utils.c:1:0:
    core/utils.c: In function 'uwsgi_build_unshare':
    ./uwsgi.h:140:46: error: assignment makes pointer from integer without a cast [-Werror]
     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))
                                                  ^
    core/utils.c:2855:2: note: in expansion of macro 'uwsgi_foreach_token'
      uwsgi_foreach_token(list, ",", p, ctx) {
      ^
    ./uwsgi.h:140:70: error: assignment makes pointer from integer without a cast [-Werror]
     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))
                                                                          ^
    core/utils.c:2855:2: note: in expansion of macro 'uwsgi_foreach_token'
      uwsgi_foreach_token(list, ",", p, ctx) {
      ^
    core/utils.c: In function 'uwsgi_tmpfd':
    core/utils.c:3533:2: error: implicit declaration of function 'mkstemp' [-Werror=implicit-function-declaration]
      fd = mkstemp(template);
      ^
    core/utils.c: In function 'uwsgi_expand_path':
    core/utils.c:3615:2: error: implicit declaration of function 'realpath' [-Werror=implicit-function-declaration]
      if (!realpath(src, dst)) {
      ^
    core/utils.c: In function 'uwsgi_set_cpu_affinity':
    core/utils.c:3641:3: error: unknown type name 'cpu_set_t'
       cpu_set_t cpuset;
       ^
    core/utils.c:3646:3: error: implicit declaration of function 'CPU_ZERO' [-Werror=implicit-function-declaration]
       CPU_ZERO(&cpuset);
       ^
    core/utils.c:3651:4: error: implicit declaration of function 'CPU_SET' [-Werror=implicit-function-declaration]
        CPU_SET(base_cpu, &cpuset);
        ^
    core/utils.c:3662:3: error: implicit declaration of function 'sched_setaffinity' [-Werror=implicit-function-declaration]
       if (sched_setaffinity(0, sizeof(cpu_set_t), &cpuset)) {
       ^
    core/utils.c:3662:35: error: 'cpu_set_t' undeclared (first use in this function)
       if (sched_setaffinity(0, sizeof(cpu_set_t), &cpuset)) {
                                       ^
    core/utils.c: In function 'uwsgi_thread_run':
    core/utils.c:3782:2: error: implicit declaration of function 'pthread_sigmask' [-Werror=implicit-function-declaration]
      pthread_sigmask(SIG_BLOCK, &smask, NULL);
      ^
    core/utils.c:3782:18: error: 'SIG_BLOCK' undeclared (first use in this function)
      pthread_sigmask(SIG_BLOCK, &smask, NULL);
                      ^
    core/utils.c: In function 'uwsgi_envdir':
    core/utils.c:4349:4: error: implicit declaration of function 'unsetenv' [-Werror=implicit-function-declaration]
        if (unsetenv(de->d_name)) {
        ^
    core/utils.c:4380:3: error: implicit declaration of function 'setenv' [-Werror=implicit-function-declaration]
       if (setenv(de->d_name, content, 1)) {
       ^
    cc1: all warnings being treated as errors
    using profile: buildconf/default.ini
    detected include path: ['/usr/include/fortify', '/usr/include', '/usr/lib/gcc/x86_64-alpine-linux-musl/4.9.2/include']
    Patching "bin_name" to properly install_scripts dir
    detected CPU cores: 1
    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 -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_VERSION="\"2.0.12\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="12" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"
    *** uWSGI compiling server core ***
    [gcc] core/utils.o
    Complete output from command /usr/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-6ccvbgw5/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_o_11f0k-record/install-record.txt --single-version-externally-managed --compile:
    running install

    core/utils.c: In function 'uwsgi_as_root':

    core/utils.c:344:3: error: implicit declaration of function 'unshare' [-Werror=implicit-function-declaration]

       if (unshare(uwsgi.unshare)) {

       ^

    core/utils.c:564:5: error: implicit declaration of function 'sigfillset' [-Werror=implicit-function-declaration]

         sigfillset(&smask);

         ^

    core/utils.c:565:5: error: implicit declaration of function 'sigprocmask' [-Werror=implicit-function-declaration]

         sigprocmask(SIG_BLOCK, &smask, NULL);

         ^

    core/utils.c:565:17: error: 'SIG_BLOCK' undeclared (first use in this function)

         sigprocmask(SIG_BLOCK, &smask, NULL);

                     ^

    core/utils.c:565:17: note: each undeclared identifier is reported only once for each function it appears in

    core/utils.c:586:3: error: implicit declaration of function 'chroot' [-Werror=implicit-function-declaration]

       if (chroot(uwsgi.chroot)) {

       ^

    core/utils.c:791:5: error: unknown type name 'ushort'

         ushort *array;

         ^

    core/utils.c:833:4: error: implicit declaration of function 'setgroups' [-Werror=implicit-function-declaration]

        if (setgroups(0, NULL)) {

        ^

    core/utils.c:848:4: error: implicit declaration of function 'initgroups' [-Werror=implicit-function-declaration]

        if (initgroups(uidname, uwsgi.gid)) {

        ^

    core/utils.c: In function 'uwsgi_close_request':

    core/utils.c:1145:18: error: 'WAIT_ANY' undeclared (first use in this function)

       while (waitpid(WAIT_ANY, &waitpid_status, WNOHANG) > 0);

                      ^

    core/utils.c: In function 'uwsgi_resolve_ip':

    core/utils.c:1802:2: error: implicit declaration of function 'gethostbyname' [-Werror=implicit-function-declaration]

      he = gethostbyname(domain);

      ^

    core/utils.c:1802:5: error: assignment makes pointer from integer without a cast [-Werror]

      he = gethostbyname(domain);

         ^

    core/utils.c: In function 'uwsgi_unix_signal':

    core/utils.c:1936:19: error: storage size of 'sa' isn't known

      struct sigaction sa;

                       ^

    core/utils.c:1938:24: error: invalid application of 'sizeof' to incomplete type 'struct sigaction'

      memset(&sa, 0, sizeof(struct sigaction));

                            ^

    core/utils.c:1942:2: error: implicit declaration of function 'sigemptyset' [-Werror=implicit-function-declaration]

      sigemptyset(&sa.sa_mask);

      ^

    core/utils.c:1944:2: error: implicit declaration of function 'sigaction' [-Werror=implicit-function-declaration]

      if (sigaction(signum, &sa, NULL) < 0) {

      ^

    core/utils.c:1936:19: error: unused variable 'sa' [-Werror=unused-variable]

      struct sigaction sa;

                       ^

    core/utils.c: In function 'uwsgi_list_has_num':

    core/utils.c:1953:2: error: implicit declaration of function 'strtok_r' [-Werror=implicit-function-declaration]

      uwsgi_foreach_token(list2, ",", p, ctx) {

      ^

    In file included from core/utils.c:1:0:

    ./uwsgi.h:140:46: error: assignment makes pointer from integer without a cast [-Werror]

     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))

                                                  ^

    core/utils.c:1953:2: note: in expansion of macro 'uwsgi_foreach_token'

      uwsgi_foreach_token(list2, ",", p, ctx) {

      ^

    ./uwsgi.h:140:70: error: assignment makes pointer from integer without a cast [-Werror]

     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))

                                                                          ^

    core/utils.c:1953:2: note: in expansion of macro 'uwsgi_foreach_token'

      uwsgi_foreach_token(list2, ",", p, ctx) {

      ^

    core/utils.c: In function 'uwsgi_list_has_str':

    ./uwsgi.h:140:46: error: assignment makes pointer from integer without a cast [-Werror]

     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))

                                                  ^

    core/utils.c:1968:2: note: in expansion of macro 'uwsgi_foreach_token'

      uwsgi_foreach_token(list2, " ", p, ctx) {

      ^

    ./uwsgi.h:140:70: error: assignment makes pointer from integer without a cast [-Werror]

     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))

                                                                          ^

    core/utils.c:1968:2: note: in expansion of macro 'uwsgi_foreach_token'

      uwsgi_foreach_token(list2, " ", p, ctx) {

      ^

    core/utils.c:1969:3: error: implicit declaration of function 'strcasecmp' [-Werror=implicit-function-declaration]

       if (!strcasecmp(p, str)) {

       ^

    core/utils.c: In function 'uwsgi_sig_pause':

    core/utils.c:2361:2: error: implicit declaration of function 'sigsuspend' [-Werror=implicit-function-declaration]

      sigsuspend(&mask);

      ^

    core/utils.c: In function 'uwsgi_run_command_putenv_and_wait':

    core/utils.c:2453:3: error: implicit declaration of function 'putenv' [-Werror=implicit-function-declaration]

       if (putenv(envs[i])) {

       ^

    In file included from core/utils.c:1:0:

    core/utils.c: In function 'uwsgi_build_unshare':

    ./uwsgi.h:140:46: error: assignment makes pointer from integer without a cast [-Werror]

     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))

                                                  ^

    core/utils.c:2855:2: note: in expansion of macro 'uwsgi_foreach_token'

      uwsgi_foreach_token(list, ",", p, ctx) {

      ^

    ./uwsgi.h:140:70: error: assignment makes pointer from integer without a cast [-Werror]

     #define uwsgi_foreach_token(x, y, z, w) for(z=strtok_r(x, y, &w);z;z = strtok_r(NULL, y, &w))

                                                                          ^

    core/utils.c:2855:2: note: in expansion of macro 'uwsgi_foreach_token'

      uwsgi_foreach_token(list, ",", p, ctx) {

      ^

    core/utils.c: In function 'uwsgi_tmpfd':

    core/utils.c:3533:2: error: implicit declaration of function 'mkstemp' [-Werror=implicit-function-declaration]

      fd = mkstemp(template);

      ^

    core/utils.c: In function 'uwsgi_expand_path':

    core/utils.c:3615:2: error: implicit declaration of function 'realpath' [-Werror=implicit-function-declaration]

      if (!realpath(src, dst)) {

      ^

    core/utils.c: In function 'uwsgi_set_cpu_affinity':

    core/utils.c:3641:3: error: unknown type name 'cpu_set_t'

       cpu_set_t cpuset;

       ^

    core/utils.c:3646:3: error: implicit declaration of function 'CPU_ZERO' [-Werror=implicit-function-declaration]

       CPU_ZERO(&cpuset);

       ^

    core/utils.c:3651:4: error: implicit declaration of function 'CPU_SET' [-Werror=implicit-function-declaration]

        CPU_SET(base_cpu, &cpuset);

        ^

    core/utils.c:3662:3: error: implicit declaration of function 'sched_setaffinity' [-Werror=implicit-function-declaration]

       if (sched_setaffinity(0, sizeof(cpu_set_t), &cpuset)) {

       ^

    core/utils.c:3662:35: error: 'cpu_set_t' undeclared (first use in this function)

       if (sched_setaffinity(0, sizeof(cpu_set_t), &cpuset)) {

                                       ^

    core/utils.c: In function 'uwsgi_thread_run':

    core/utils.c:3782:2: error: implicit declaration of function 'pthread_sigmask' [-Werror=implicit-function-declaration]

      pthread_sigmask(SIG_BLOCK, &smask, NULL);

      ^

    core/utils.c:3782:18: error: 'SIG_BLOCK' undeclared (first use in this function)

      pthread_sigmask(SIG_BLOCK, &smask, NULL);

                      ^

    core/utils.c: In function 'uwsgi_envdir':

    core/utils.c:4349:4: error: implicit declaration of function 'unsetenv' [-Werror=implicit-function-declaration]

        if (unsetenv(de->d_name)) {

        ^

    core/utils.c:4380:3: error: implicit declaration of function 'setenv' [-Werror=implicit-function-declaration]

       if (setenv(de->d_name, content, 1)) {

       ^

    cc1: all warnings being treated as errors

    using profile: buildconf/default.ini

    detected include path: ['/usr/include/fortify', '/usr/include', '/usr/lib/gcc/x86_64-alpine-linux-musl/4.9.2/include']

    Patching "bin_name" to properly install_scripts dir

    detected CPU cores: 1

    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 -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_VERSION="\"2.0.12\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="12" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"

    *** uWSGI compiling server core ***

    [gcc] core/utils.o

    ----------------------------------------
    Command "/usr/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-6ccvbgw5/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_o_11f0k-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6ccvbgw5/uwsgi

First run

current apk update command:

RUN apk --update add python3 bash libevent-dev libffi-dev openssl-dev python3-dev build-base yaml git

When trying to install uwsgi from requirements.txt:

  Running setup.py install for uwsgi
    In file included from core/utils.c:1:0:
    ./uwsgi.h:246:26: fatal error: linux/limits.h: No such file or directory
     #include <linux/limits.h>
                              ^
    compilation terminated.
    using profile: buildconf/default.ini
    detected include path: ['/usr/include/fortify', '/usr/include', '/usr/lib/gcc/x86_64-alpine-linux-musl/4.9.2/include']
    Patching "bin_name" to properly install_scripts dir
    detected CPU cores: 1
    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 -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_VERSION="\"2.0.12\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="12" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -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_tem
plate);ULEP(stats_pusher_socket);"
    *** uWSGI compiling server core ***
    [gcc] core/utils.o
    Complete output from command /usr/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-_x09fblv/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).r
ead().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-f_0x2p_r-record/install-record.txt --single-version-externally-managed --compile:
    running install

    In file included from core/utils.c:1:0:

    ./uwsgi.h:246:26: fatal error: linux/limits.h: No such file or directory

     #include <linux/limits.h>

                              ^

    compilation terminated.

    using profile: buildconf/default.ini

    detected include path: ['/usr/include/fortify', '/usr/include', '/usr/lib/gcc/x86_64-alpine-linux-musl/4.9.2/include']

    Patching "bin_name" to properly install_scripts dir

    detected CPU cores: 1

    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 -DUWSGI
_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_VERSION="\"2.0.12\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0"
-DUWSGI_VERSION_MINOR="12" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -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(logsoc
ket);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);UD
EP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(t
ransformation_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(sign
al);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_tem
plate);ULEP(stats_pusher_socket);"

    *** uWSGI compiling server core ***

    [gcc] core/utils.o

    ----------------------------------------
    Command "/usr/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-_x09fblv/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n'
, '\n'), __file__, 'exec'))" install --record /tmp/pip-f_0x2p_r-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-_x09fblv/u
wsgi
ERROR: Service 'server' failed to build: The command '/bin/sh -c pip3 install --no-cache-dir -r requirements.txt' returned a non-zero code: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment