View Issue Details

IDProjectCategoryView StatusLast Update
0018329CentOS-8nsspublic2021-10-13 04:22
Reporteraostapenko Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version8.4.2105 
Summary0018329: pip3 install python-nss fails
Description# pip3 install python-nss
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting python-nss
  Using cached https://files.pythonhosted.org/packages/6b/29/629098e34951c358b1f04f13a70b3590eb0cf2df817d945bd05c4169d71b/python-nss-1.0.1.tar.bz2
Installing collected packages: python-nss
  Running setup.py install for python-nss ... error
    Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rcpa3wok/python-nss/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-gt5g__fl-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/nss
    copying src/__init__.py -> build/lib.linux-x86_64-3.6/nss
    running build_ext
    building 'nss.error' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/python3.6m -c src/py_nspr_error.c -o build/temp.linux-x86_64-3.6/src/py_nspr_error.o
    gcc -pthread -shared -Wl,-z,relro -Wl,-z,now -g -Wl,-z,relro -Wl,-z,now -g build/temp.linux-x86_64-3.6/src/py_nspr_error.o -L/usr/lib64 -lnspr4 -lpython3.6m -o build/lib.linux-x86_64-3.6/nss/error.cpython-36m-x86_64-linux-gnu.so
    building 'nss.io' extension
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/python3.6m -c src/py_nspr_io.c -o build/temp.linux-x86_64-3.6/src/py_nspr_io.o
    src/py_nspr_io.c: In function ‘Socket_poll’:
    src/py_nspr_io.c:3159:19: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘Py_ssize_t’ {aka ‘long int’} [-Wsign-compare]
         for (i = 0; i < num_descs; i++) {
                       ^
    src/py_nspr_io.c:3201:19: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘Py_ssize_t’ {aka ‘long int’} [-Wsign-compare]
         for (i = 0; i < num_descs; i++) {
                       ^
    gcc -pthread -shared -Wl,-z,relro -Wl,-z,now -g -Wl,-z,relro -Wl,-z,now -g build/temp.linux-x86_64-3.6/src/py_nspr_io.o -L/usr/lib64 -lnspr4 -lpython3.6m -o build/lib.linux-x86_64-3.6/nss/io.cpython-36m-x86_64-linux-gnu.so
    building 'nss.nss' extension
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/python3.6m -c src/py_nss.c -o build/temp.linux-x86_64-3.6/src/py_nss.o
    In file included from src/py_nss.h:22,
                     from src/py_nss.c:341:
    /usr/include/nss3/key.h:9:9: note: #pragma message: key.h is deprecated. Please include keyhi.h instead.
     #pragma message("key.h is deprecated. Please include keyhi.h instead.")
             ^~~~~~~
    In file included from src/py_nss.c:341:
    src/py_nss.h:126:3: error: conflicting types for ‘RSAPublicKey’
     } RSAPublicKey;
       ^~~~~~~~~~~~
    In file included from /usr/include/nss3/pk11hpke.h:8,
                     from /usr/include/nss3/pk11pub.h:12,
                     from src/py_nss.h:23,
                     from src/py_nss.c:341:
    /usr/include/nss3/blapit.h:283:32: note: previous declaration of ‘RSAPublicKey’ was here
     typedef struct RSAPublicKeyStr RSAPublicKey;
                                    ^~~~~~~~~~~~
    In file included from src/py_nss.c:341:
    src/py_nss.h:136:3: error: conflicting types for ‘DSAPublicKey’
     } DSAPublicKey;
       ^~~~~~~~~~~~
    In file included from /usr/include/nss3/pk11hpke.h:8,
                     from /usr/include/nss3/pk11pub.h:12,
                     from src/py_nss.h:23,
                     from src/py_nss.c:341:
    /usr/include/nss3/blapit.h:325:32: note: previous declaration of ‘DSAPublicKey’ was here
     typedef struct DSAPublicKeyStr DSAPublicKey;
                                    ^~~~~~~~~~~~
    In file included from src/py_nss.c:339:
    src/py_nss.c: In function ‘SECItem_to_base64’:
    src/py_nspr_common.h:256:23: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
     #define MIN(a,b) ((a) < (b) ? (a) : (b))
                           ^
    src/py_nss.c:1832:24: note: in expansion of macro ‘MIN’
                 line_len = MIN(chars_per_line, src_end - src);
                            ^~~
    src/py_nspr_common.h:256:37: warning: operand of ?: changes signedness from ‘long int’ to ‘size_t’ {aka ‘long unsigned int’} due to unsignedness of other operand [-Wsign-compare]
     #define MIN(a,b) ((a) < (b) ? (a) : (b))
                                         ^~~
    src/py_nss.c:1832:24: note: in expansion of macro ‘MIN’
                 line_len = MIN(chars_per_line, src_end - src);
                            ^~~
    src/py_nss.c: In function ‘CERTAVA_value_to_pystr’:
    src/py_nss.c:4818:41: warning: comparison of integer expressions of different signedness: ‘SECOidTag’ {aka ‘enum <anonymous>’} and ‘int’ [-Wsign-compare]
         if ((oid_tag = CERT_GetAVATag(ava)) != -1) {
                                             ^~
    src/py_nss.c: In function ‘CERTRDN_to_pystr’:
    src/py_nss.c:4882:45: warning: comparison of integer expressions of different signedness: ‘SECOidTag’ {aka ‘enum <anonymous>’} and ‘int’ [-Wsign-compare]
             if ((oid_tag = CERT_GetAVATag(ava)) != -1) {
                                                 ^~
    src/py_nss.c: In function ‘Certificate_get_extension’:
    src/py_nss.c:10192:53: warning: comparison of integer expressions of different signedness: ‘SECOidTag’ {aka ‘enum <anonymous>’} and ‘int’ [-Wsign-compare]
         if ((oid_tag = get_oid_tag_from_object(py_oid)) == -1) {
                                                         ^~
    src/py_nss.c: In function ‘pk11_create_pbev2_algorithm_id’:
    src/py_nss.c:23446:65: warning: comparison of integer expressions of different signedness: ‘SECOidTag’ {aka ‘enum <anonymous>’} and ‘int’ [-Wsign-compare]
             if ((pbe_alg_tag = get_oid_tag_from_object(py_pbe_alg)) == -1) {
                                                                     ^~
    src/py_nss.c:23453:71: warning: comparison of integer expressions of different signedness: ‘SECOidTag’ {aka ‘enum <anonymous>’} and ‘int’ [-Wsign-compare]
             if ((cipher_alg_tag = get_oid_tag_from_object(py_cipher_alg)) == -1) {
                                                                           ^~
    src/py_nss.c:23460:65: warning: comparison of integer expressions of different signedness: ‘SECOidTag’ {aka ‘enum <anonymous>’} and ‘int’ [-Wsign-compare]
             if ((prf_alg_tag = get_oid_tag_from_object(py_prf_alg)) == -1) {
                                                                     ^~
    src/py_nss.c: In function ‘pkcs12_enable_all_ciphers’:
    src/py_nss.c:24381:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
         for (i = 0; i < sizeof(all_ciphers)/sizeof(all_ciphers[0]); i++) {
                       ^
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rcpa3wok/python-nss/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-gt5g__fl-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-rcpa3wok/python-nss/
Steps To Reproduce# docker run -ti centos:8 bash
# yum update -y; yum install nss-devel python3-devel gcc -y
# pip3 install python-nss
TagsNo tags attached.

Activities

aostapenko

aostapenko

2021-10-12 20:58

reporter   ~0038661

We're required to install python-nss instead of using rpm to support openstack centos based docker images. This issue did not occur on centos:7 as well as on any other distributions.
aostapenko

aostapenko

2021-10-13 04:22

reporter   ~0038662

It started to happen with nss-devel-3.67.0-6.el8_4 and does not reproduce with nss-devel-3.53.1-17.el8_3 available in AppStream repository.

Issue History

Date Modified Username Field Change
2021-10-12 20:50 aostapenko New Issue
2021-10-12 20:58 aostapenko Note Added: 0038661
2021-10-13 04:22 aostapenko Note Added: 0038662