Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1933360 - python-nss fails to build
Summary: python-nss fails to build
Keywords:
Status: CLOSED DUPLICATE of bug 1892248
Alias: None
Product: Fedora
Classification: Fedora
Component: python-nss
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Alex Scheel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-26 19:35 UTC by chris
Modified: 2021-03-01 19:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-01 14:24:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description chris 2021-02-26 19:35:57 UTC
Description of problem:
=====
python-nss-1.0.1 fails to build.


Version-Release number of selected component (if applicable):
=====
python-nss-1.0.1


How reproducible:
=====
I have attempted to build this via multiple means (arch linux AUR process and "pip install python-nss").  Both fail at the same point in the build process due to using the same source.


Steps to Reproduce:
=====
1.  pip install python-nss
2.
3.

Actual results:
=====
# pip install python-nss
Collecting python-nss
  Using cached python-nss-1.0.1.tar.bz2 (222 kB)
Using legacy 'setup.py install' for python-nss, since package 'wheel' is not installed.
Installing collected packages: python-nss
    Running setup.py install for python-nss ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8zjyzfl8/python-nss_649a91aad1d94180b7ff575cffc345ed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8zjyzfl8/python-nss_649a91aad1d94180b7ff575cffc345ed/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-1fsn3ood/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.9/python-nss
         cwd: /tmp/pip-install-8zjyzfl8/python-nss_649a91aad1d94180b7ff575cffc345ed/
    Complete output (93 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    creating build/lib.linux-x86_64-3.9/nss
    copying src/__init__.py -> build/lib.linux-x86_64-3.9/nss
    running build_ext
    building 'nss.error' extension
    creating build/temp.linux-x86_64-3.9
    creating build/temp.linux-x86_64-3.9/src
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -I/usr/include/nss -I/usr/include/nspr -I/usr/include/python3.9 -c src/py_nspr_error.c -o build/temp.linux-x86_64-3.9/src/py_nspr_error.o
    gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-x86_64-3.9/src/py_nspr_error.o -L/usr/lib -lnspr4 -o build/lib.linux-x86_64-3.9/nss/error.cpython-39-x86_64-linux-gnu.so
    building 'nss.io' extension
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -I/usr/include/nss -I/usr/include/nspr -I/usr/include/python3.9 -c src/py_nspr_io.c -o build/temp.linux-x86_64-3.9/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]
     3159 |     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]
     3201 |     for (i = 0; i < num_descs; i++) {
          |                   ^
    gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-x86_64-3.9/src/py_nspr_io.o -L/usr/lib -lnspr4 -o build/lib.linux-x86_64-3.9/nss/io.cpython-39-x86_64-linux-gnu.so
    building 'nss.nss' extension
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -Isrc -I/usr/include/nss -I/usr/include/nspr -I/usr/include/python3.9 -c src/py_nss.c -o build/temp.linux-x86_64-3.9/src/py_nss.o
    In file included from src/py_nss.h:22,
                     from src/py_nss.c:341:
    /usr/include/nss/key.h:9:9: note: ‘#pragma message: key.h is deprecated. Please include keyhi.h instead.’
        9 | #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’
      126 | } RSAPublicKey;
          |   ^~~~~~~~~~~~
    In file included from /usr/include/nss/pk11hpke.h:8,
                     from /usr/include/nss/pk11pub.h:12,
                     from src/py_nss.h:23,
                     from src/py_nss.c:341:
    /usr/include/nss/blapit.h:281:32: note: previous declaration of ‘RSAPublicKey’ was here
      281 | typedef struct RSAPublicKeyStr RSAPublicKey;
          |                                ^~~~~~~~~~~~
    In file included from src/py_nss.c:341:
    src/py_nss.h:136:3: error: conflicting types for ‘DSAPublicKey’
      136 | } DSAPublicKey;
          |   ^~~~~~~~~~~~
    In file included from /usr/include/nss/pk11hpke.h:8,
                     from /usr/include/nss/pk11pub.h:12,
                     from src/py_nss.h:23,
                     from src/py_nss.c:341:
    /usr/include/nss/blapit.h:323:32: note: previous declaration of ‘DSAPublicKey’ was here
      323 | 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]
      256 | #define MIN(a,b) ((a) < (b) ? (a) : (b))
          |                       ^
    src/py_nss.c:1832:24: note: in expansion of macro ‘MIN’
     1832 |             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]
      256 | #define MIN(a,b) ((a) < (b) ? (a) : (b))
          |                                     ^~~
    src/py_nss.c:1832:24: note: in expansion of macro ‘MIN’
     1832 |             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’ and ‘int’ [-Wsign-compare]
     4818 |     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’ and ‘int’ [-Wsign-compare]
     4882 |         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’ and ‘int’ [-Wsign-compare]
    10192 |     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’ and ‘int’ [-Wsign-compare]
    23446 |         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’ and ‘int’ [-Wsign-compare]
    23453 |         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’ and ‘int’ [-Wsign-compare]
    23460 |         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]
    24381 |     for (i = 0; i < sizeof(all_ciphers)/sizeof(all_ciphers[0]); i++) {
          |                   ^
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8zjyzfl8/python-nss_649a91aad1d94180b7ff575cffc345ed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8zjyzfl8/python-nss_649a91aad1d94180b7ff575cffc345ed/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-1fsn3ood/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.9/python-nss Check the logs for full command output.


Expected results:


Additional info:

Comment 1 Alex Scheel 2021-03-01 14:24:00 UTC
Clarification: this is a Fedora bug. This is not the correct place to report this. Please report this upstream in Mozilla's bug tracker, since as far as I can tell, this doesn't use Fedora bits at all.

I was given ownership of python-nss after John Dennis retired; I'm leaving Red Hat soon too. I do not have access to the PyPI account for this project.


However, I have patched this in Fedora:

https://src.fedoraproject.org/rpms/python-nss/blob/rawhide/f/0001-Rename-DSA-RSA-PublicKey-to-Py-DSA-RSA-PublicKey.patch

And pushed commits to my personal fork:
https://github.com/cipherboy/python-nss/commit/079d4f65a743fb9e952ab109c1a24997c15398a7
https://github.com/cipherboy/python-nss/commit/51343db2e865b05054f0204dc6116a5633c671c7


If you're interested, I suggest you upstream these two patches (and, perhaps merge them into one).

Or apply them to your local tree prior to building.

*** This bug has been marked as a duplicate of bug 1892248 ***

Comment 2 chris 2021-03-01 19:47:39 UTC
Hi Alex.  

Mozilla's project page lists here (bugzilla.redhat.com) as the location they accept bug reports.  https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Python_binding_for_NSS

===[ snippet from project page
How to Report a Bug

python-nss bugs are currently being tracked in the Red Hat bugzilla system for Fedora. You can enter a bug report here.
(the url links to https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora;component=python-nss)
===

Do you perhaps know who would be the better contact for the project?  I'm happy to file the bug report in another place but whomever runs the mozilla project page needs to also update where this code is being tracked so things get filed in the more appropriate location.  Mozilla's page still lists John Dennis as the principal developer as well.

Thanks so much,
-Chris


Note You need to log in before you can comment on or make changes to this bug.