legacy-bk-paas icon indicating copy to clipboard operation
legacy-bk-paas copied to clipboard

升级下uWSGI版本吧,pip安装老是报错

Open chestarss opened this issue 4 years ago • 2 comments

目前bk-paas里以及saas里都依赖 uWSGI==2.0.13.1 按照报错如下: 我自己换成uWSGI==2.0.18后正常

   [thread 7][gcc -pthread] core/cache.o
    [thread 8][gcc -pthread] core/daemons.o
    [thread 10][gcc -pthread] core/errors.o
    [thread 12][gcc -pthread] core/hash.o
    [thread 9][gcc -pthread] core/master_events.o
    [thread 11][gcc -pthread] core/chunked.o
    [thread 13][gcc -pthread] core/queue.o
    [thread 14][gcc -pthread] core/event.o
    [thread 15][gcc -pthread] core/signal.o
    [thread 0][gcc -pthread] core/strings.o
    core/mule.c: In function ‘uwsgi_setup_mules_and_farms’:
    core/mule.c:453:4: error: ‘strncpy’ specified bound 255 equals destination size [-Werror=stringop-truncation]
        strncpy(uwsgi.farms[i].name, farm_value, 0xff);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    core/emperor.c: In function ‘uwsgi_emperor_vassal_start’:
    core/emperor.c:991:15: error: cast between incompatible function types from ‘void (*)(struct uwsgi_instance *)’ to ‘int (*)(void *)’ [-Werror=cast-function-type]
       pid = clone((int (*)(void *)) uwsgi_emperor_spawn_vassal, stack + PTHREAD_STACK_MIN, SIGCHLD | uwsgi.emperor_clone, (void *) n_ui);
                   ^
    core/hash.c: In function ‘murmur2_hash’:
    core/hash.c:44:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
               h ^= key[2] << 16;
               ~~^~~~~~~~~~~~~~~
    core/hash.c:45:7: note: here
           case 2:
           ^~~~
    core/hash.c:46:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
               h ^= key[1] << 8;
               ~~^~~~~~~~~~~~~~
    core/hash.c:47:7: note: here
           case 1:
           ^~~~
    core/signal.c: In function ‘uwsgi_register_signal’:
    core/signal.c:126:2: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
      strncpy(use->receiver, receiver, strlen(receiver) + 1);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    core/signal.c:126:35: note: length computed here
      strncpy(use->receiver, receiver, strlen(receiver) + 1);
                                       ^~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    cc1: all warnings being treated as errors
    core/emperor.c: In function ‘uwsgi_emperor_blacklist_add’:
    core/emperor.c:156:2: error: ‘strncpy’ specified bound 255 equals destination size [-Werror=stringop-truncation]
      strncpy(uebi->id, id, 0xff);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    core/utils.c: In function ‘uwsgi_substitute’:
    core/utils.c:1727:3: error: ‘strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
       strncat(dst, with, with_len);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    core/utils.c:1707:20: note: length computed here
      size_t with_len = strlen(with);
                        ^~~~~~~~~~~~
    core/utils.c:1732:2: error: ‘strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
      strncat(dst, ptr, strlen(ptr));
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    cc1: all warnings being treated as errors
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-JqzdLI/uWSGI/setup.py'"'"'; __file__='"'"'/tmp/pip-install-JqzdLI/uWSGI/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cA9dH9/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/uWSGI Check the logs for full command output.

chestarss avatar Jun 16 '20 10:06 chestarss

Command "/data/bkce/.envs/open_paas-paas/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-wmjfMw/uWSGI/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-6idyq2-record/install-record.txt --single-version-externally-managed --compile --install-headers /data/bkce/.envs/open_paas-paas/include/site/python2.7/uWSGI" failed with error code 1 in /tmp/pip-build-wmjfMw/uWSGI/ 我换成uWSGI==2.0.18后还是有报错,请问知道为什么么?openssl-1.0.2k和openssl-devel-1.0.2k

chaos-26 avatar Jul 09 '20 08:07 chaos-26

换成 uWSGI==2.0.19.1

honger502 avatar Aug 05 '21 09:08 honger502