Mock Version: 3.5 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-jsonlib2.spec'], chrootPath='/var/lib/mock/openeuler-22.03_LTS_SP1-x86_64-1686383499.398699/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1000gid=135user='mockbuild'nspawn_args=[]unshare_net=FalseprintOutput=True) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-jsonlib2.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False /etc/profile.d/system-info.sh: line 55: ps: command not found Building target platforms: x86_64 Building for target x86_64 Wrote: /builddir/build/SRPMS/python-jsonlib2-1.5.2-1.src.rpm Child return code was: 0 Mock Version: 3.5 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-jsonlib2.spec'], chrootPath='/var/lib/mock/openeuler-22.03_LTS_SP1-x86_64-1686383499.398699/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1000gid=135user='mockbuild'nspawn_args=[]unshare_net=FalseprintOutput=True) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-jsonlib2.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False /etc/profile.d/system-info.sh: line 55: ps: command not found Building target platforms: x86_64 Building for target x86_64 Wrote: /builddir/build/SRPMS/python-jsonlib2-1.5.2-1.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-jsonlib2.spec'], chrootPath='/var/lib/mock/openeuler-22.03_LTS_SP1-x86_64-1686383499.398699/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1000gid=135user='mockbuild'nspawn_args=[]unshare_net=FalseprintOutput=True) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-jsonlib2.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False /etc/profile.d/system-info.sh: line 55: ps: command not found Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.ayaLxy + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf jsonlib2-1.5.2 + /usr/bin/gzip -dc /builddir/build/SOURCES/jsonlib2-1.5.2.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd jsonlib2-1.5.2 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.KHm5n4 + umask 022 + cd /builddir/build/BUILD + cd jsonlib2-1.5.2 + CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection ' + LDFLAGS='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/generic-hardened-ld' + /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s' running build running build_ext building 'jsonlib2' extension creating build creating build/temp.linux-x86_64-3.9 gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -D_GNU_SOURCE -fPIC -fwrapv -D_GNU_SOURCE -fPIC -fwrapv -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -D_GNU_SOURCE -fPIC -fwrapv -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -D_GNU_SOURCE -fPIC -fwrapv -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I/usr/include/python3.9 -c jsonlib2.c -o build/temp.linux-x86_64-3.9/jsonlib2.o jsonlib2.c: In function ‘jsonlib_str_format’: jsonlib2.c:233:19: warning: implicit declaration of function ‘PyString_FromString’; did you mean ‘PyLong_FromString’? [-Wimplicit-function-declaration] 233 | if (!(template = PyString_FromString (c_tmpl))) return NULL; | ^~~~~~~~~~~~~~~~~~~ | PyLong_FromString jsonlib2.c:233:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 233 | if (!(template = PyString_FromString (c_tmpl))) return NULL; | ^ jsonlib2.c:234:11: warning: implicit declaration of function ‘PyString_Format’; did you mean ‘PyErr_Format’? [-Wimplicit-function-declaration] 234 | retval = PyString_Format (template, args); | ^~~~~~~~~~~~~~~ | PyErr_Format jsonlib2.c:234:9: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 234 | retval = PyString_Format (template, args); | ^ jsonlib2.c: In function ‘normalize_indent_string’: jsonlib2.c:249:9: warning: implicit declaration of function ‘PyInt_Check’; did you mean ‘PySet_Check’? [-Wimplicit-function-declaration] 249 | if (PyInt_Check(indent_string)) { | ^~~~~~~~~~~ | PySet_Check jsonlib2.c:250:27: warning: implicit declaration of function ‘PyInt_AsLong’; did you mean ‘PyLong_AsLong’? [-Wimplicit-function-declaration] 250 | long indent_val = PyInt_AsLong(indent_string); | ^~~~~~~~~~~~ | PyLong_AsLong jsonlib2.c: In function ‘parser_find_next_value’: jsonlib2.c:329:13: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 329 | if (c[1] == 'a' && c[2] == 'N') | ^~ jsonlib2.c:332:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 332 | default: | ^~~~~~~ jsonlib2.c: In function ‘set_error’: jsonlib2.c:396:12: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 396 | new_desc = PyString_Format (description, description_args); | ^ jsonlib2.c:405:15: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 405 | err_str_tmpl = PyString_FromString (tmpl); | ^ jsonlib2.c:412:12: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 412 | err_str = PyString_Format (err_str_tmpl, err_format_args); | ^ jsonlib2.c: In function ‘set_error_simple’: jsonlib2.c:430:11: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 430 | desc_obj = PyString_FromString (description); | ^ jsonlib2.c: In function ‘set_error_unexpected’: jsonlib2.c:448:12: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 448 | err_str = PyString_FromString ("Unexpected U+%08X while looking for %s."); | ^ jsonlib2.c:450:12: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 450 | err_str = PyString_FromString ("Unexpected U+%04X while looking for %s."); | ^ jsonlib2.c:452:12: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 452 | err_str = PyString_FromString ("Unexpected U+%04X (%c) while looking for %s."); | ^ jsonlib2.c:457:12: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 457 | err_str = PyString_FromString ("Unexpected U+%08X."); | ^ jsonlib2.c:459:21: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 459 | err_str = PyString_FromString("Unexpected U+%04X."); | ^ jsonlib2.c:461:12: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 461 | err_str = PyString_FromString ("Unexpected U+%04X (%c)."); | ^ jsonlib2.c: In function ‘keyword_compare’: jsonlib2.c:502:17: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations] 502 | PyUnicode_FromUnicode(decoder->index, len); | ^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here 551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( | ^~~~~~~~~~~~~~~~~~~~~ jsonlib2.c: In function ‘read_4hex’: jsonlib2.c:533:2: warning: ‘PyLong_FromUnicode’ is deprecated [-Wdeprecated-declarations] 533 | py_long = PyLong_FromUnicode (start, 4, 16); | ^~~~~~~ In file included from /usr/include/python3.9/Python.h:94, from jsonlib2.c:10: /usr/include/python3.9/longobject.h:106:24: note: declared here 106 | PyAPI_FUNC(PyObject *) PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int); | ^~~~~~~~~~~~~~~~~~ jsonlib2.c: In function ‘read_unicode_escape’: jsonlib2.c:609:11: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 609 | err_str = PyString_FromString ("U+%04X is a reserved code point."); | ^ jsonlib2.c: In function ‘read_string_full’: jsonlib2.c:642:20: warning: variable ‘existing_size’ set but not used [-Wunused-but-set-variable] 642 | size_t new_size, existing_size; | ^~~~~~~~~~~~~ jsonlib2.c:696:10: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 696 | err = PyString_FromString ("Unknown escape code: \\%s."); | ^ jsonlib2.c:724:2: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations] 724 | unicode = PyUnicode_FromUnicode (buffer, buffer_idx); | ^~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here 551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( | ^~~~~~~~~~~~~~~~~~~~~ jsonlib2.c: In function ‘read_string’: jsonlib2.c:749:3: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations] 749 | return PyUnicode_FromUnicode (NULL, 0); | ^~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here 551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( | ^~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:796:2: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations] 796 | unicode = PyUnicode_FromUnicode (start, ii); | ^~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here 551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( | ^~~~~~~~~~~~~~~~~~~~~ jsonlib2.c: In function ‘read_number’: jsonlib2.c:872:4: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations] 872 | if (!(unicode = PyUnicode_FromUnicode (decoder->index, | ^~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here 551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( | ^~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:881:26: error: too many arguments to function ‘PyFloat_FromString’ 881 | object = PyFloat_FromString (unicode, NULL); | ^~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.9/Python.h:97, from jsonlib2.c:10: /usr/include/python3.9/floatobject.h:42:24: note: declared here 42 | PyAPI_FUNC(PyObject *) PyFloat_FromString(PyObject*); | ^~~~~~~~~~~~~~~~~~ jsonlib2.c:890:17: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations] 890 | if (!(unicode = PyUnicode_FromUnicode (decoder->index, | ^~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here 551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( | ^~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:902:17: warning: ‘PyLong_FromUnicode’ is deprecated [-Wdeprecated-declarations] 902 | object = PyLong_FromUnicode (decoder->index, | ^~~~~~ In file included from /usr/include/python3.9/Python.h:94, from jsonlib2.c:10: /usr/include/python3.9/longobject.h:106:24: note: declared here 106 | PyAPI_FUNC(PyObject *) PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int); | ^~~~~~~~~~~~~~~~~~ jsonlib2.c: In function ‘unicode_autodetect’: jsonlib2.c:1218:10: warning: implicit declaration of function ‘PyString_AS_STRING’; did you mean ‘PyBytes_AS_STRING’? [-Wimplicit-function-declaration] 1218 | bytes = PyString_AS_STRING (bytestring); | ^~~~~~~~~~~~~~~~~~ | PyBytes_AS_STRING jsonlib2.c:1218:8: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 1218 | bytes = PyString_AS_STRING (bytestring); | ^ jsonlib2.c:1219:15: warning: implicit declaration of function ‘PyString_GET_SIZE’; did you mean ‘PyList_GET_SIZE’? [-Wimplicit-function-declaration] 1219 | byte_count = PyString_GET_SIZE (bytestring); | ^~~~~~~~~~~~~~~~~ | PyList_GET_SIZE jsonlib2.c: In function ‘_read_entry’: jsonlib2.c:1316:2: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 1316 | decoder.start = PyUnicode_AsUnicode (unicode); | ^~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ jsonlib2.c:1317:2: warning: ‘PyUnicode_GetSize’ is deprecated [-Wdeprecated-declarations] 1317 | decoder.end = decoder.start + PyUnicode_GetSize (unicode); | ^~~~~~~ In file included from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/unicodeobject.h:177:43: note: declared here 177 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_ssize_t) PyUnicode_GetSize( | ^~~~~~~~~~~~~~~~~ jsonlib2.c: In function ‘buffer_encoder_append_unicode’: jsonlib2.c:1375:2: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 1375 | raw = PyUnicode_AS_UNICODE (text); | ^~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ jsonlib2.c:1376:2: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 1376 | len = PyUnicode_GET_SIZE (text); | ^~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:1376:2: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 1376 | len = PyUnicode_GET_SIZE (text); | ^~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ jsonlib2.c:1376:2: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 1376 | len = PyUnicode_GET_SIZE (text); | ^~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ jsonlib2.c: In function ‘stream_encoder_append_ascii’: jsonlib2.c:1405:13: warning: implicit declaration of function ‘PyString_Encode’ [-Wimplicit-function-declaration] 1405 | encoded = PyString_Encode (text, len, encoder->encoding, "strict"); | ^~~~~~~~~~~~~~~ jsonlib2.c:1405:11: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 1405 | encoded = PyString_Encode (text, len, encoder->encoding, "strict"); | ^ jsonlib2.c: In function ‘encoder_append_string’: jsonlib2.c:1436:6: warning: implicit declaration of function ‘PyString_CheckExact’; did you mean ‘PyLong_CheckExact’? [-Wimplicit-function-declaration] 1436 | if (PyString_CheckExact (text)) | ^~~~~~~~~~~~~~~~~~~ | PyLong_CheckExact jsonlib2.c:1438:15: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 1438 | char *raw = PyString_AS_STRING (text); | ^~~~~~~~~~~~~~~~~~ jsonlib2.c: In function ‘unicode_from_format’: jsonlib2.c:1508:11: warning: implicit declaration of function ‘PyString_FromFormatV’; did you mean ‘PyBytes_FromFormatV’? [-Wimplicit-function-declaration] 1508 | string = PyString_FromFormatV (format, args); | ^~~~~~~~~~~~~~~~~~~~ | PyBytes_FromFormatV jsonlib2.c:1508:9: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 1508 | string = PyString_FromFormatV (format, args); | ^ jsonlib2.c: In function ‘write_string’: jsonlib2.c:1568:6: warning: implicit declaration of function ‘PyString_AsStringAndSize’; did you mean ‘PyBytes_AsStringAndSize’? [-Wimplicit-function-declaration] 1568 | if (PyString_AsStringAndSize (string, &buffer, &str_len) == -1) | ^~~~~~~~~~~~~~~~~~~~~~~~ | PyBytes_AsStringAndSize jsonlib2.c:1586:10: warning: implicit declaration of function ‘PyString_FromFormat’; did you mean ‘PyBytes_FromFormat’? [-Wimplicit-function-declaration] 1586 | return PyString_FromFormat ("\"%s\"", buffer); | ^~~~~~~~~~~~~~~~~~~ | PyBytes_FromFormat jsonlib2.c:1586:10: warning: returning ‘int’ from a function with return type ‘PyObject *’ {aka ‘struct _object *’} makes pointer from integer without a cast [-Wint-conversion] 1586 | return PyString_FromFormat ("\"%s\"", buffer); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:1594:12: warning: implicit declaration of function ‘PyString_AsDecodedObject’; did you mean ‘PyUnicode_AsDecodedObject’? [-Wimplicit-function-declaration] 1594 | unicode = PyString_AsDecodedObject (string, "ascii", "strict"); | ^~~~~~~~~~~~~~~~~~~~~~~~ | PyUnicode_AsDecodedObject jsonlib2.c:1594:10: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 1594 | unicode = PyString_AsDecodedObject (string, "ascii", "strict"); | ^ jsonlib2.c: In function ‘unicode_to_unicode’: jsonlib2.c:1621:2: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 1621 | old_buffer = PyUnicode_AS_UNICODE (unicode); | ^~~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ jsonlib2.c:1622:2: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 1622 | old_buffer_size = PyUnicode_GET_SIZE (unicode); | ^~~~~~~~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:1622:2: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 1622 | old_buffer_size = PyUnicode_GET_SIZE (unicode); | ^~~~~~~~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ jsonlib2.c:1622:2: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 1622 | old_buffer_size = PyUnicode_GET_SIZE (unicode); | ^~~~~~~~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:1660:2: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations] 1660 | retval = PyUnicode_FromUnicode (NULL, new_buffer_size); | ^~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here 551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( | ^~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:1664:2: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 1664 | p = PyUnicode_AS_UNICODE (retval); | ^ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ jsonlib2.c: In function ‘unicode_to_ascii’: jsonlib2.c:1761:2: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 1761 | old_buffer = PyUnicode_AS_UNICODE (unicode); | ^~~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ jsonlib2.c:1762:2: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 1762 | old_buffer_size = PyUnicode_GET_SIZE (unicode); | ^~~~~~~~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:1762:2: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 1762 | old_buffer_size = PyUnicode_GET_SIZE (unicode); | ^~~~~~~~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ jsonlib2.c:1762:2: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 1762 | old_buffer_size = PyUnicode_GET_SIZE (unicode); | ^~~~~~~~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:1810:11: warning: implicit declaration of function ‘PyString_FromStringAndSize’; did you mean ‘PyBytes_FromStringAndSize’? [-Wimplicit-function-declaration] 1810 | retval = PyString_FromStringAndSize (NULL, new_buffer_size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | PyBytes_FromStringAndSize jsonlib2.c:1810:9: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 1810 | retval = PyString_FromStringAndSize (NULL, new_buffer_size); | ^ jsonlib2.c:1814:4: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 1814 | p = PyString_AS_STRING (retval); | ^ jsonlib2.c: In function ‘write_unicode’: jsonlib2.c:1841:2: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 1841 | buffer = PyUnicode_AS_UNICODE (unicode); | ^~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ jsonlib2.c:1842:2: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 1842 | str_len = PyUnicode_GET_SIZE (unicode); | ^~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:1842:2: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 1842 | str_len = PyUnicode_GET_SIZE (unicode); | ^~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ jsonlib2.c:1842:2: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 1842 | str_len = PyUnicode_GET_SIZE (unicode); | ^~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:1861:3: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations] 1861 | if (!(retval = PyUnicode_FromUnicode (NULL, str_len + 2))) | ^~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here 551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( | ^~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:1865:3: warning: ‘Py_UNICODE_COPY’ is deprecated [-Wdeprecated-declarations] 1865 | Py_UNICODE_COPY (u_retval->str + 1, buffer, str_len); | ^~~~~~~~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:54:1: note: declared here 54 | Py_UNICODE_COPY(Py_UNICODE *target, const Py_UNICODE *source, Py_ssize_t length) { | ^~~~~~~~~~~~~~~ jsonlib2.c:1865:28: error: ‘PyUnicodeObject’ has no member named ‘str’ 1865 | Py_UNICODE_COPY (u_retval->str + 1, buffer, str_len); | ^~ jsonlib2.c:1866:11: error: ‘PyUnicodeObject’ has no member named ‘str’ 1866 | u_retval->str[0] = '"'; | ^~ jsonlib2.c:1867:11: error: ‘PyUnicodeObject’ has no member named ‘str’ 1867 | u_retval->str[str_len + 1] = '"'; | ^~ jsonlib2.c: In function ‘mapping_process_key’: jsonlib2.c:1997:6: warning: implicit declaration of function ‘PyString_Check’; did you mean ‘PyMapping_Check’? [-Wimplicit-function-declaration] 1997 | if (PyString_Check (key) || PyUnicode_Check (key)) | ^~~~~~~~~~~~~~ | PyMapping_Check jsonlib2.c:2022:15: warning: implicit declaration of function ‘PyObject_Unicode’; did you mean ‘PyObject_Size’? [-Wimplicit-function-declaration] 2022 | new_key = PyObject_Unicode (key); | ^~~~~~~~~~~~~~~~ | PyObject_Size jsonlib2.c:2022:13: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 2022 | new_key = PyObject_Unicode (key); | ^ jsonlib2.c: In function ‘write_basic’: jsonlib2.c:2307:6: warning: implicit declaration of function ‘PyInt_CheckExact’; did you mean ‘PyDict_CheckExact’? [-Wimplicit-function-declaration] 2307 | if (PyInt_CheckExact (value) || PyLong_CheckExact (value)) | ^~~~~~~~~~~~~~~~ | PyDict_CheckExact jsonlib2.c: In function ‘_write_entry’: jsonlib2.c:2596:4: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations] 2596 | retval = PyUnicode_FromUnicode (encoder.buffer, | ^~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here 551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( | ^~~~~~~~~~~~~~~~~~~~~ jsonlib2.c:2602:4: warning: ‘PyUnicode_Encode’ is deprecated [-Wdeprecated-declarations] 2602 | retval = PyUnicode_Encode (encoder.buffer, | ^~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:93, from jsonlib2.c:10: /usr/include/python3.9/cpython/unicodeobject.h:773:42: note: declared here 773 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_Encode( | ^~~~~~~~~~~~~~~~ jsonlib2.c: In function ‘initjsonlib2’: jsonlib2.c:2771:17: warning: implicit declaration of function ‘Py_InitModule3’ [-Wimplicit-function-declaration] 2771 | if (!(module = Py_InitModule3 ("jsonlib2", module_methods, | ^~~~~~~~~~~~~~ jsonlib2.c:2771:15: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 2771 | if (!(module = Py_InitModule3 ("jsonlib2", module_methods, | ^ jsonlib2.c:2773:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] 2773 | return; | ^~~~~~ jsonlib2.c:2766:1: note: declared here 2766 | initjsonlib2 (void) | ^~~~~~~~~~~~ jsonlib2.c:2777:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] 2777 | return; | ^~~~~~ jsonlib2.c:2766:1: note: declared here 2766 | initjsonlib2 (void) | ^~~~~~~~~~~~ jsonlib2.c:2783:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] 2783 | return; | ^~~~~~ jsonlib2.c:2766:1: note: declared here 2766 | initjsonlib2 (void) | ^~~~~~~~~~~~ jsonlib2.c:2789:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] 2789 | return; | ^~~~~~ jsonlib2.c:2766:1: note: declared here 2766 | initjsonlib2 (void) | ^~~~~~~~~~~~ jsonlib2.c:2798:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] 2798 | return; | ^~~~~~ jsonlib2.c:2766:1: note: declared here 2766 | initjsonlib2 (void) | ^~~~~~~~~~~~ error: command '/usr/bin/gcc' failed with exit code 1 error: Bad exit status from /var/tmp/rpm-tmp.KHm5n4 (%build) Bad exit status from /var/tmp/rpm-tmp.KHm5n4 (%build) RPM build errors: Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-jsonlib2.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.9/site-packages/mockbuild/util.py", line 598, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-jsonlib2.spec