python-libmagic icon indicating copy to clipboard operation
python-libmagic copied to clipboard

Fails to install on archlinux

Open j4loop opened this issue 1 year ago • 0 comments

Fails to install on archlinux. Is this the same issue as before?

(ptunnld) [archlinux@archlinux-1 ptunnld]$ python --version Python 3.12.4 (ptunnld) [archlinux@archlinux-1 ptunnld]$

(ptunnld) [archlinux@archlinux-1 ptunnld]$ uname -r 6.9.5-arch1-1

Building wheels for collected packages: python-libmagic, cffi Building wheel for python-libmagic (pyproject.toml) ... done Created wheel for python-libmagic: filename=python_libmagic-0.4.0-py3-none-any.whl size=4113 sha256=4d1b01da633e95c9572aff641eaef5584401e9d3575c8e6708533d8fba997e62 Stored in directory: /home/archlinux/.cache/pip/wheels/fb/97/af/e63471763178fecbba59de7350c7c8c4967d07c4144caac20b Building wheel for cffi (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for cffi (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [157 lines of output] running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-312/cffi copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/model.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/commontypes.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/cparser.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/ffiplatform.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/vengine_gen.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/api.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/lock.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/init.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/verifier.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/recompiler.py -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/_cffi_include.h -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/parse_c_type.h -> build/lib.linux-x86_64-cpython-312/cffi copying cffi/_embedding.h -> build/lib.linux-x86_64-cpython-312/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-x86_64-cpython-312/c gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -DUSE__THREAD -I/home/archlinux/Downloads/ptunnld/include -I/usr/include/python3.12 -c c/_cffi_backend.c -o build/temp.linux-x86_64-cpython-312/c/_cffi_backend.o In file included from c/_cffi_backend.c:274: c/minibuffer.h: In function ‘mb_ass_slice’: c/minibuffer.h:66:5: warning: ‘PyObject_AsReadBuffer’ is deprecated [-Wdeprecated-declarations] 66 | if (PyObject_AsReadBuffer(other, &buffer, &buffer_len) < 0) | ^~ In file included from /usr/include/python3.12/Python.h:100, from c/_cffi_backend.c:2: /usr/include/python3.12/abstract.h:369:17: note: declared here 369 | PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj, | ^~~~~~~~~~~~~~~~~~~~~ In file included from c/_cffi_backend.c:277: c/file_emulator.h: In function ‘PyFile_AsFile’: c/file_emulator.h:54:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 54 | mode = PyText_AsUTF8(ob_mode); | ^ In file included from c/_cffi_backend.c:281: c/wchar_helper.h: In function ‘_my_PyUnicode_AsSingleWideChar’: c/wchar_helper.h:83:21: error: implicit declaration of function ‘PyUnicode_AS_UNICODE’; did you mean ‘PyUnicode_AsUCS4’? [-Wimplicit-function-declaration] 83 | Py_UNICODE *u = PyUnicode_AS_UNICODE(unicode); | ^~~~~~~~~~~~~~~~~~~~ | PyUnicode_AsUCS4 c/wchar_helper.h:83:21: error: initialization of ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] c/wchar_helper.h:84:9: error: implicit declaration of function ‘PyUnicode_GET_SIZE’; did you mean ‘PyDict_GET_SIZE’? [-Wimplicit-function-declaration] 84 | if (PyUnicode_GET_SIZE(unicode) == 1) { | ^~~~~~~~~~~~~~~~~~ | PyDict_GET_SIZE c/wchar_helper.h: In function ‘_my_PyUnicode_AsWideChar’: c/wchar_helper.h:118:21: error: initialization of ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 118 | Py_UNICODE *u = PyUnicode_AS_UNICODE(unicode); | ^~~~~~~~~~~~~~~~~~~~ c/_cffi_backend.c: In function ‘ctypedescr_dealloc’: c/_cffi_backend.c:352:23: error: lvalue required as left operand of assignment 352 | Py_REFCNT(ct) = 43; | ^ c/_cffi_backend.c:355:23: error: lvalue required as left operand of assignment 355 | Py_REFCNT(ct) = 0; | ^ c/_cffi_backend.c: In function ‘b_load_library’: c/_cffi_backend.c:3649:27: warning: ‘Py_FileSystemDefaultEncoding’ is deprecated [-Wdeprecated-declarations] 3649 | Py_FileSystemDefaultEncoding, &filename_or_null, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.12/Python.h:72: /usr/include/python3.12/fileobject.h:22:46: note: declared here 22 | Py_DEPRECATED(3.12) PyAPI_DATA(const char ) Py_FileSystemDefaultEncoding; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ c/_cffi_backend.c: In function ‘b_complete_struct_or_union’: c/_cffi_backend.c:73:25: error: implicit declaration of function ‘PyUnicode_GetSize’; did you mean ‘PyUnicode_Resize’? [-Wimplicit-function-declaration] 73 | # define PyText_GetSize PyUnicode_GetSize | ^~~~~~~~~~~~~~~~~ c/_cffi_backend.c:4251:28: note: in expansion of macro ‘PyText_GetSize’ 4251 | do_align = PyText_GetSize(fname) > 0; | ^~~~~~~~~~~~~~ c/_cffi_backend.c: In function ‘prepare_callback_info_tuple’: c/_cffi_backend.c:5214:5: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations] 5214 | PyEval_InitThreads(); | ^~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.12/Python.h:95: /usr/include/python3.12/ceval.h:132:37: note: declared here 132 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void); | ^~~~~~~~~~~~~~~~~~ c/_cffi_backend.c: In function ‘b_callback’: c/_cffi_backend.c:5255:5: warning: ‘ffi_prep_closure’ is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations] 5255 | if (ffi_prep_closure(closure, &cif_descr->cif, | ^~ In file included from c/_cffi_backend.c:15: /usr/include/ffi.h:356:1: note: declared here 356 | ffi_prep_closure (ffi_closure, | ^~~~~~~~~~~~~~~~ In file included from /usr/include/python3.12/unicodeobject.h:1013, from /usr/include/python3.12/Python.h:51: c/ffi_obj.c: In function ‘_ffi_type’: /usr/include/python3.12/cpython/unicodeobject.h:629:29: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 629 | #define _PyUnicode_AsString PyUnicode_AsUTF8 | ^~~~~~~~~~~~~~~~ c/_cffi_backend.c:72:25: note: in expansion of macro ‘_PyUnicode_AsString’ 72 | # define PyText_AS_UTF8 _PyUnicode_AsString | ^~~~~~~~~~~~~~~~~~~ c/ffi_obj.c:191:32: note: in expansion of macro ‘PyText_AS_UTF8’ 191 | char *input_text = PyText_AS_UTF8(arg); | ^~~~~~~~~~~~~~ c/lib_obj.c: In function ‘lib_build_cpython_func’: /usr/include/python3.12/cpython/unicodeobject.h:629:29: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 629 | #define _PyUnicode_AsString PyUnicode_AsUTF8 | ^~~~~~~~~~~~~~~~ c/_cffi_backend.c:72:25: note: in expansion of macro ‘_PyUnicode_AsString’ 72 | # define PyText_AS_UTF8 _PyUnicode_AsString | ^~~~~~~~~~~~~~~~~~~ c/lib_obj.c:129:21: note: in expansion of macro ‘PyText_AS_UTF8’ 129 | char libname = PyText_AS_UTF8(lib->l_libname); | ^~~~~~~~~~~~~~ c/lib_obj.c: In function ‘lib_build_and_cache_attr’: /usr/include/python3.12/cpython/unicodeobject.h:629:29: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 629 | #define _PyUnicode_AsString PyUnicode_AsUTF8 | ^~~~~~~~~~~~~~~~ c/_cffi_backend.c:71:24: note: in expansion of macro ‘_PyUnicode_AsString’ 71 | # define PyText_AsUTF8 _PyUnicode_AsString / PyUnicode_AsUTF8 in Py3.3 */ | ^~~~~~~~~~~~~~~~~~~ c/lib_obj.c:208:15: note: in expansion of macro ‘PyText_AsUTF8’ 208 | char *s = PyText_AsUTF8(name); | ^~~~~~~~~~~~~ In file included from c/cffi1_module.c:16, from c/_cffi_backend.c:6636: c/lib_obj.c: In function ‘lib_getattr’: c/lib_obj.c:506:7: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 506 | p = PyText_AsUTF8(name); | ^ In file included from c/cffi1_module.c:17: c/cdlopen.c: In function ‘ffi_dlopen’: c/cdlopen.c:54:27: warning: ‘Py_FileSystemDefaultEncoding’ is deprecated [-Wdeprecated-declarations] 54 | Py_FileSystemDefaultEncoding, &filename_or_null, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/python3.12/fileobject.h:22:46: note: declared here 22 | Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from c/cffi1_module.c:19: c/call_python.c: In function ‘_get_interpstate_dict’: c/call_python.c:20:30: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’} 20 | builtins = tstate->interp->builtins; | ^~ c/call_python.c: In function ‘_ffi_def_extern_decorator’: c/call_python.c:73:11: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 73 | s = PyText_AsUTF8(name); | ^ c/call_python.c: In function ‘_update_cache_to_call_python’: c/call_python.c:160:39: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’} 160 | new1 = PyThreadState_GET()->interp->modules; | ^~ c/call_python.c: In function ‘cffi_call_python’: c/call_python.c:235:63: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’} 235 | if (externpy->reserved1 != PyThreadState_GET()->interp->modules) { | ^~ error: command '/usr/bin/gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Successfully built python-libmagic Failed to build cffi ERROR: Could not build wheels for cffi, which is required to install pyproject.toml-based projects

[notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: pip install --upgrade pip (ptunnld) [archlinux@archlinux-1 ptunnld]$

j4loop avatar Sep 17 '24 14:09 j4loop