Skip to content

Cannot make library on EL10 #2

Description

@asclepiadae

Environment: Alma Linux (EL) 10.2
Applicable packages:

autoconf-2.71-13.el10.noarch                                cpp-14.3.1-4.4.el10.alma.2.x86_64_v2                    
gcc-14.3.1-4.4.el10.alma.2.x86_64_v2                        glibc-devel-2.39-128.el10_2.alma.1.x86_64_v2            
kernel-headers-6.12.0-211.47.1.el10_2.x86_64_v2             libmpc-1.3.1-7.el10.x86_64_v2                           
libxcrypt-devel-4.4.36-10.el10.x86_64_v2                    libzfs7-devel-2.4.3-1.el10.x86_64                       
m4-1.4.19-11.el10.x86_64_v2                                 make-1:4.4.1-9.el10.x86_64_v2                           
perl-File-Compare-1.100.800-512.2.el10_0.noarch             perl-File-Copy-2.41-512.2.el10_0.noarch                 
perl-File-Find-1.44-512.2.el10_0.noarch                     python3-devel-3.12.13-2.el10_2.1.x86_64_v2              
python3-pip-23.3.2-11.el10_2.noarch                         git-2.52.0-1.el10.x86_64_v2
git-core-2.52.0-1.el10.x86_64_v2                            git-core-doc-2.52.0-1.el10.noarch        
perl-Error-1:0.17029-18.el10.noarch                         perl-Git-2.52.0-1.el10.noarch
perl-TermReadKey-2.38-24.el10.x86_64_v2                     perl-lib-0.65-512.2.el10_0.x86_64_v2

Following the readme in https://github.com/45Drives/cockpit-zfs, I am attempting to install this library so I can install the cockpit module but I'm running into some trouble. make fails with both cython-3.2.9 (latest) and 0.29.35 (as specified in the readme) so I cannot install.

I did find that this repo's main branch is essentially unused, but specifying the branch has helped somewhat.
The full command I am attempting to run is:
git clone --single-branch --branch zfs-2.4 https://github.com/45Drives/python3-libzfs.git && cd python3-libzfs && ./configure --prefix=/usr && make && sudo make install

Here are the shell printouts:

cython-3.2.9

user@localhost:~/.venv/libzfs$ pip install cython
Defaulting to user installation because normal site-packages is not writeable
Collecting cython
  Using cached cython-3.2.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (4.6 kB)
Using cached cython-3.2.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.4 MB)
Installing collected packages: cython
Successfully installed cython-3.2.9
user@localhost:~/.venv/libzfs$ cd python3-libzfs && ./configure --prefix=/usr && make
configure: loading site script /usr/share/config.site
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed

-----------------------------------
   RUNNING TESTS ON zfs.h HEADER
-----------------------------------
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for sys/types.h... (cached) yes
checking for sys/fs/zfs.h... yes
checking for ZFS_MAX_DATASET_NAME_LEN defined in sys/fs/zfs.h... yes
configure: Checking existence of special classes in zfs header by verifying ZPOOL_CONFIG_ALLOCATION_BIAS existence
checking for ZPOOL_CONFIG_ALLOCATION_BIAS defined in sys/fs/zfs.h... yes
configure: Checking signature of zfs_prop_valid_for_type in zfs header
configure: 3 PARAMS
configure: Checking existence of VDEV_AUX_ASHIFT_TOO_BIG enum in zfs header
configure: OK
configure: Checking existence of zpool_errata_t
configure: OK
configure: Checking typedef pool_scrub_cmt_t in zfs header
configure: OK
configure: Verifying existence of zpool_rewind_policy_t
configure: NOT FOUND
configure: Verifying existence of zpool_load_policy_t
configure: OK

----------------------------------------
   RUNNING TESTS ON libzutil.h HEADER
----------------------------------------
checking for libzutil.h... yes
configure: OK
configure: Checking existence of zpool_read_label in libzutil.h header
configure: OK
configure: Checking existence of zpool_search_import in libzutil.h header
configure: OK

--------------------------------------
   RUNNING TESTS ON libzfs.h HEADER
--------------------------------------
checking for libzfs.h... yes
configure: Checking zpool_vdev_attach parameters
configure: 6 params
configure: Checking zpool_add parameters
configure: 3 params
configure: Checking for existence of zfs_foreach_mountpoint
configure: OK
configure: Checking function signature zvol_volsize_to_reservation
configure: 3 PARAMS
configure: Checking existence of zpool_search_import in libzfs.h header
configure: NOT FOUND
configure: Checking existence of zpool_events_next in libzfs.h header
configure: OK
configure: Checking existence of zpool_read_label with 2 params in libzfs.h header
configure: NOT FOUND
configure: Checking existence of zpool_read_label with 3 params in libzfs.h header
configure: Checking existence of ZFS Native encryption support  in libzfs.h header
configure: SUPPORTED
configure: Checking existence of vs_*_ashift in fs/zfs.h header
configure: OK
configure: Checking function signature of zpool_get_status
configure: 3 PARAMS
configure: Checking function signature of zpool_scan
configure: 3 params
configure: Checking function signature of zfs_share
configure: 2 params
configure: Checking function signature of zfs_iter_filesystems
configure: 3 params
configure: Checking function signature of zfs_iter_snapspec
configure: 4 params
configure: Checking function signature of zfs_iter_dependents
configure: 4 params
configure: Checking function signature of zfs_iter_bookmarks
configure: 3 params
configure: Checking function signature of zfs_iter_snapshots_sorted
configure: 5 params
configure: Checking function signature of zfs_iter_children
configure: 3 params
configure: Checking function signature of zfs_send_one
configure: 3 params
configure: Checking EZFS_SCRUB_PAUSED presence
configure: OK
configure: Checking ZPOOL_STATUS_ERRATA presence
configure: OK
configure: Checking ZPOOL_STATUS_REBUILDING presence
configure: OK
configure: Checking ZPOOL_STATUS_REBUILD_SCRUB presence
configure: OK
configure: Checking ZPOOL_STATUS_COMPATIBILITY_ERR presence
configure: OK
configure: Checking ZPOOL_STATUS_INCOMPATIBLE_FEAT presence
configure: OK
configure: Checking LZC_SEND_FLAG_EMBED_DATA presence
configure: OK
configure: Checking params for zfs_receive
configure: 6 params
configure: Checking existence of zfs_send_resume and zfs_send_resume_token_to_nvlist
configure: OK
checking for ZFS_MAXNAMELEN defined in libzfs.h... no
configure: Checking existence of renameflags_t in libzfs.h
configure: OK
configure: Checking renameflags_t member names in libzfs.h
configure: RECURSIVE member found
configure: Checking function signature of zfs_rename in libzfs.h
configure: 3 PARAMS
checking for ZPOOL_MAXNAMELEN defined in libzfs.h... no
configure: Checking for resumable member in recvflags_t struct
configure: OK
configure: Checking typedef sendflags_t in libzfs header
configure: OK
configure: Checking attribute name for verbose in sendflags_t struct
configure: Attribute named as verbosity in sendflags_t struct
configure: Checking for dedup member in sendflags_t struct
configure: NOT FOUND
configure: Checking for compress member in sendflags_t struct
configure: OK
configure: Checking for raw member in sendflags_t struct
configure: OK
configure: Checking for backup member in sendflags_t struct
configure: OK
configure: Checking for holds member in sendflags_t struct
configure: OK
configure: Checking for saved member in sendflags_t struct
configure: OK
configure: Checking for progressastitle member in sendflags_t struct
configure: OK

-------------------------------------------
   RUNNING TESTS ON libzfs_core.h HEADER
-------------------------------------------
checking for libzfs_core.h... yes
configure: Verifying lzc_bookmark existence
configure: OK
configure: Verifying existence and params of lzc_send_space
configure: 4 params
configure: Verifying lzc_sync existence
configure: OK
configure: Verifying lzc_wait existence
configure: OK

-----------------------------------------------
   RUNNING TESTS ON zfeature_common.h HEADER
-----------------------------------------------
configure: Verifying existence of zfeature_common.h
checking for zfeature_common.h... yes
configure: OK
configure: Checking supported SPA features

-----------------------------------------
   RUNNING TESTS ON zfs_ioctl.h HEADER
-----------------------------------------
configure: Verifying existence of zfs_ioctl.h
checking for sys/zfs_ioctl.h... no
configure: NOT FOUND

--------------------------------------
   RUNNING TESTS ON nvpair.h HEADER
--------------------------------------
checking for sys/nvpair.h... yes
configure: Nvpair.h header under sys

--------------------------------------------------------
   RUNNING TESTS ON sys/zfs_context_userland.h HEADER
--------------------------------------------------------
checking for sys/zfs_context_userland.h... no

----------------------
   GENERATING FILES
----------------------
configure: creating ./config.status
config.status: creating pxd/config.pxi
config.status: creating pxd/sendflags.pxi
config.status: creating pxd/spa_features.pxi
config.status: creating pxd/userquota_props.pxi
config.status: creating pxd/zpool_status.pxi
config.status: creating config.py
config.status: creating Makefile
rm -f libzfs.c
python3 setup.py build
/usr/lib/python3.12/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running build
running build_ext
Compiling libzfs.pyx because it changed.
[1/1] Cythonizing libzfs.pyx
warning: ./pxd/libzfs.pxd:7:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
[...]
warning: libzfs.pyx:4638:4: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310

Error compiling Cython file:
------------------------------------------------------------
...
                self.set(key, value, nvpair.DATA_TYPE_NVLIST_ARRAY)

            if type(value[0]) is int:
                self.set(key, value, nvpair.DATA_TYPE_INT32_ARRAY)

            if type(value[0]) is long:
                                 ^
------------------------------------------------------------
nvpair.pxi:380:33: undeclared name not builtin: long
warning: libzfs.pyx:1336:27: Assigning to 'pool_config_ops_t *' from 'const pool_config_ops_t *' discards const qualifier
Traceback (most recent call last):
  File "/home/user/.venv/libzfs/python3-libzfs/setup.py", line 51, in <module>
    setup(
  File "/usr/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 131, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
    self.build_extensions()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/user/.local/lib/python3.12/site-packages/Cython/Distutils/build_ext.py", line 131, in build_extension
    new_ext = cythonize(
              ^^^^^^^^^^
  File "/home/user/.local/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1153, in cythonize
    cythonize_one(*args)
  File "/home/user/.local/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1297, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: libzfs.pyx
make: *** [Makefile:20: libzfs.c] Error 1

There were a lot of IF warnings that I cut out.

Switch Cython Version

user@localhost:~/.venv/libzfs/python3-libzfs$ pip uninstall cython && pip install cython==0.29.35
Found existing installation: Cython 3.2.9
Uninstalling Cython-3.2.9:
  Would remove:
    /home/user/.local/bin/cygdb
    /home/user/.local/bin/cython
    /home/user/.local/bin/cythonize
    /home/user/.local/lib/python3.12/site-packages/Cython/*
    /home/user/.local/lib/python3.12/site-packages/cython-3.2.9.dist-info/*
    /home/user/.local/lib/python3.12/site-packages/cython.py
    /home/user/.local/lib/python3.12/site-packages/pyximport/*
Proceed (Y/n)? y
  Successfully uninstalled Cython-3.2.9
Defaulting to user installation because normal site-packages is not writeable
Collecting cython==0.29.35
  Using cached Cython-0.29.35-py2.py3-none-any.whl.metadata (3.1 kB)
Using cached Cython-0.29.35-py2.py3-none-any.whl (988 kB)
Installing collected packages: cython
Successfully installed cython-0.29.35

Cython 0.29.35

user@localhost:~/.venv/libzfs/python3-libzfs$ ./configure --prefix=/usr && make
configure: loading site script /usr/share/config.site
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed

-----------------------------------
   RUNNING TESTS ON zfs.h HEADER
-----------------------------------
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for sys/types.h... (cached) yes
checking for sys/fs/zfs.h... yes
checking for ZFS_MAX_DATASET_NAME_LEN defined in sys/fs/zfs.h... yes
configure: Checking existence of special classes in zfs header by verifying ZPOOL_CONFIG_ALLOCATION_BIAS existence
checking for ZPOOL_CONFIG_ALLOCATION_BIAS defined in sys/fs/zfs.h... yes
configure: Checking signature of zfs_prop_valid_for_type in zfs header
configure: 3 PARAMS
configure: Checking existence of VDEV_AUX_ASHIFT_TOO_BIG enum in zfs header
configure: OK
configure: Checking existence of zpool_errata_t
configure: OK
configure: Checking typedef pool_scrub_cmt_t in zfs header
configure: OK
configure: Verifying existence of zpool_rewind_policy_t
configure: NOT FOUND
configure: Verifying existence of zpool_load_policy_t
configure: OK

----------------------------------------
   RUNNING TESTS ON libzutil.h HEADER
----------------------------------------
checking for libzutil.h... yes
configure: OK
configure: Checking existence of zpool_read_label in libzutil.h header
configure: OK
configure: Checking existence of zpool_search_import in libzutil.h header
configure: OK

--------------------------------------
   RUNNING TESTS ON libzfs.h HEADER
--------------------------------------
checking for libzfs.h... yes
configure: Checking zpool_vdev_attach parameters
configure: 6 params
configure: Checking zpool_add parameters
configure: 3 params
configure: Checking for existence of zfs_foreach_mountpoint
configure: OK
configure: Checking function signature zvol_volsize_to_reservation
configure: 3 PARAMS
configure: Checking existence of zpool_search_import in libzfs.h header
configure: NOT FOUND
configure: Checking existence of zpool_events_next in libzfs.h header
configure: OK
configure: Checking existence of zpool_read_label with 2 params in libzfs.h header
configure: NOT FOUND
configure: Checking existence of zpool_read_label with 3 params in libzfs.h header
configure: Checking existence of ZFS Native encryption support  in libzfs.h header
configure: SUPPORTED
configure: Checking existence of vs_*_ashift in fs/zfs.h header
configure: OK
configure: Checking function signature of zpool_get_status
configure: 3 PARAMS
configure: Checking function signature of zpool_scan
configure: 3 params
configure: Checking function signature of zfs_share
configure: 2 params
configure: Checking function signature of zfs_iter_filesystems
configure: 3 params
configure: Checking function signature of zfs_iter_snapspec
configure: 4 params
configure: Checking function signature of zfs_iter_dependents
configure: 4 params
configure: Checking function signature of zfs_iter_bookmarks
configure: 3 params
configure: Checking function signature of zfs_iter_snapshots_sorted
configure: 5 params
configure: Checking function signature of zfs_iter_children
configure: 3 params
configure: Checking function signature of zfs_send_one
configure: 3 params
configure: Checking EZFS_SCRUB_PAUSED presence
configure: OK
configure: Checking ZPOOL_STATUS_ERRATA presence
configure: OK
configure: Checking ZPOOL_STATUS_REBUILDING presence
configure: OK
configure: Checking ZPOOL_STATUS_REBUILD_SCRUB presence
configure: OK
configure: Checking ZPOOL_STATUS_COMPATIBILITY_ERR presence
configure: OK
configure: Checking ZPOOL_STATUS_INCOMPATIBLE_FEAT presence
configure: OK
configure: Checking LZC_SEND_FLAG_EMBED_DATA presence
configure: OK
configure: Checking params for zfs_receive
configure: 6 params
configure: Checking existence of zfs_send_resume and zfs_send_resume_token_to_nvlist
configure: OK
checking for ZFS_MAXNAMELEN defined in libzfs.h... no
configure: Checking existence of renameflags_t in libzfs.h
configure: OK
configure: Checking renameflags_t member names in libzfs.h
configure: RECURSIVE member found
configure: Checking function signature of zfs_rename in libzfs.h
configure: 3 PARAMS
checking for ZPOOL_MAXNAMELEN defined in libzfs.h... no
configure: Checking for resumable member in recvflags_t struct
configure: OK
configure: Checking typedef sendflags_t in libzfs header
configure: OK
configure: Checking attribute name for verbose in sendflags_t struct
configure: Attribute named as verbosity in sendflags_t struct
configure: Checking for dedup member in sendflags_t struct
configure: NOT FOUND
configure: Checking for compress member in sendflags_t struct
configure: OK
configure: Checking for raw member in sendflags_t struct
configure: OK
configure: Checking for backup member in sendflags_t struct
configure: OK
configure: Checking for holds member in sendflags_t struct
configure: OK
configure: Checking for saved member in sendflags_t struct
configure: OK
configure: Checking for progressastitle member in sendflags_t struct
configure: OK

-------------------------------------------
   RUNNING TESTS ON libzfs_core.h HEADER
-------------------------------------------
checking for libzfs_core.h... yes
configure: Verifying lzc_bookmark existence
configure: OK
configure: Verifying existence and params of lzc_send_space
configure: 4 params
configure: Verifying lzc_sync existence
configure: OK
configure: Verifying lzc_wait existence
configure: OK

-----------------------------------------------
   RUNNING TESTS ON zfeature_common.h HEADER
-----------------------------------------------
configure: Verifying existence of zfeature_common.h
checking for zfeature_common.h... yes
configure: OK
configure: Checking supported SPA features

-----------------------------------------
   RUNNING TESTS ON zfs_ioctl.h HEADER
-----------------------------------------
configure: Verifying existence of zfs_ioctl.h
checking for sys/zfs_ioctl.h... no
configure: NOT FOUND

--------------------------------------
   RUNNING TESTS ON nvpair.h HEADER
--------------------------------------
checking for sys/nvpair.h... yes
configure: Nvpair.h header under sys

--------------------------------------------------------
   RUNNING TESTS ON sys/zfs_context_userland.h HEADER
--------------------------------------------------------
checking for sys/zfs_context_userland.h... no

----------------------
   GENERATING FILES
----------------------
configure: creating ./config.status
config.status: creating pxd/config.pxi
config.status: creating pxd/sendflags.pxi
config.status: creating pxd/spa_features.pxi
config.status: creating pxd/userquota_props.pxi
config.status: creating pxd/zpool_status.pxi
config.status: creating config.py
config.status: creating Makefile
rm -f libzfs.c
python3 setup.py build
/usr/lib/python3.12/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running build
running build_ext
cythoning libzfs.pyx to libzfs.c
building 'libzfs' extension
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -O3 -fPIC -I/usr/include/python3.12 -c libzfs.c -o build/temp.linux-x86_64-cpython-312/libzfs.o -DCYTHON_FALLTHROUGH= -I/usr/include/libzfs -I/usr/include/libspl -D_MACHINE_ENDIAN_H_ -DHAVE_ISSETUGID -D_GNU_SOURCE -Werror=implicit-function-declaration -Wno-error=incompatible-pointer-types
libzfs.c: In function ‘__pyx_f_6libzfs_6NVList___get_value’:
libzfs.c:6389:47: warning: passing argument 2 of ‘nvpair_value_string’ from incompatible pointer type [-Wincompatible-pointer-types]
 6389 |     (void)(nvpair_value_string(__pyx_v_pair, (&__pyx_v_cstr)));
      |                                              ~^~~~~~~~~~~~~~
      |                                               |
      |                                               char **
In file included from /usr/include/libzfs/libnvpair.h:30,
                 from /usr/include/libzfs/libzfs.h:41,
                 from libzfs.c:748:
/usr/include/libzfs/sys/nvpair.h:294:57: note: expected ‘const char **’ but argument is of type ‘char **’
  294 | _SYS_NVPAIR_H int nvpair_value_string(const nvpair_t *, const char **);
      |                                                         ^~~~~~~~~~~~~
libzfs.c:7362:53: warning: passing argument 2 of ‘nvpair_value_string_array’ from incompatible pointer type [-Wincompatible-pointer-types]
 7362 |     (void)(nvpair_value_string_array(__pyx_v_pair, ((char ***)(&__pyx_v_carray)), (&__pyx_v_carraylen)));
      |                                                    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                     |
      |                                                     char ***
/usr/include/libzfs/sys/nvpair.h:307:57: note: expected ‘const char ***’ but argument is of type ‘char ***’
  307 | _SYS_NVPAIR_H int nvpair_value_string_array(nvpair_t *, const char ***,
      |                                                         ^~~~~~~~~~~~~~
libzfs.c: In function ‘__pyx_pf_6libzfs_6NVList_15set’:
libzfs.c:9224:73: warning: passing argument 3 of ‘nvlist_add_string_array’ from incompatible pointer type [-Wincompatible-pointer-types]
 9224 |       (void)(nvlist_add_string_array(__pyx_v_self->handle, __pyx_t_34, ((char **)__pyx_v_carray), __pyx_t_29));
      |                                                                        ~^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                         |
      |                                                                         char **
/usr/include/libzfs/sys/nvpair.h:205:5: note: expected ‘const char * const*’ but argument is of type ‘char **’
  205 |     const char * const *, uint_t);
      |     ^~~~~~~~~~~~~~~~~~~~
libzfs.c:10610:73: warning: passing argument 3 of ‘nvlist_add_nvlist_array’ from incompatible pointer type [-Wincompatible-pointer-types]
10610 |       (void)(nvlist_add_nvlist_array(__pyx_v_self->handle, __pyx_t_45, ((nvlist_t **)__pyx_v_carray), __pyx_t_29));
      |                                                                        ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                         |
      |                                                                         nvlist_t ** {aka struct nvlist **}
/usr/include/libzfs/sys/nvpair.h:207:5: note: expected ‘const nvlist_t * const*’ {aka ‘const struct nvlist * const*’} but argument is of type ‘nvlist_t **’ {aka ‘struct nvlist **’}
  207 |     const nvlist_t * const *, uint_t);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
libzfs.c: In function ‘__pyx_gb_6libzfs_7ZFSPool_14generator9’:
libzfs.c:59102:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
59102 |   if (unlikely(!Py_OptimizeFlag)) {
      |   ^~
In file included from /usr/include/python3.12/Python.h:48,
                 from libzfs.c:6:
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
   13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
      |                                     ^~~~~~~~~~~~~~~
libzfs.c: In function ‘__pyx_pf_6libzfs_7ZFSPool_11status_code___get__’:
libzfs.c:60817:89: warning: passing argument 2 of ‘zpool_get_status’ from incompatible pointer type [-Wincompatible-pointer-types]
60817 |     __pyx_t_4 = __Pyx_PyInt_From_zpool_status_t(zpool_get_status(__pyx_v_self->handle, (&__pyx_v_msg_id), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2932, __pyx_L1_error)
      |                                                                                        ~^~~~~~~~~~~~~~~~
      |                                                                                         |
      |                                                                                         char **
/usr/include/libzfs/libzfs.h:471:61: note: expected ‘const char **’ but argument is of type ‘char **’
  471 | _LIBZFS_H zpool_status_t zpool_get_status(zpool_handle_t *, const char **,
      |                                                             ^~~~~~~~~~~~~
libzfs.c: In function ‘__pyx_pf_6libzfs_11ZFSResource_5userspace’:
libzfs.c:74790:86: warning: passing argument 3 of ‘zfs_userspace’ from incompatible pointer type [-Wincompatible-pointer-types]
74790 |           __pyx_v_ret = zfs_userspace(__pyx_v_self->__pyx_base.handle, __pyx_v_prop, __pyx_f_6libzfs_11ZFSResource__userspace_cb, ((void *)__pyx_v_result));
      |                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                      |
      |                                                                                      int (*)(void *, const char *, uint32_t,  uint64_t) {aka int (*)(void *, const char *, unsigned int,  long unsigned int)}
/usr/include/libzfs/libzfs.h:877:5: note: expected ‘zfs_userspace_cb_t’ {aka ‘int (*)(void *, const char *, unsigned int,  long unsigned int,  long unsigned int)’} but argument is of type ‘int (*)(void *, const char *, uint32_t,  uint64_t)’ {aka ‘int (*)(void *, const char *, unsigned int,  long unsigned int)’}
  877 |     zfs_userspace_cb_t, void *);
      |     ^~~~~~~~~~~~~~~~~~
libzfs.c: In function ‘__pyx_pf_6libzfs_10ZFSDataset_12destroy_snapshot’:
libzfs.c:86251:85: warning: passing argument 2 of ‘zfs_destroy_snaps’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
86251 |         __pyx_v_ret = zfs_destroy_snaps(__pyx_v_self->__pyx_base.__pyx_base.handle, __pyx_v_c_name, __pyx_v_defer_deletion);
      |                                                                                     ^~~~~~~~~~~~~~
/usr/include/libzfs/libzfs.h:771:49: note: expected ‘char *’ but argument is of type ‘const char *’
  771 | _LIBZFS_H int zfs_destroy_snaps(zfs_handle_t *, char *, boolean_t);
      |                                                 ^~~~~~
gcc -shared build/temp.linux-x86_64-cpython-312/libzfs.o -L/usr/lib64 -lnvpair -lzfs -lzfs_core -luutil -o build/lib.linux-x86_64-cpython-312/libzfs.cpython-312-x86_64-linux-gnu.so -L/usr/lib

Ultimately I'm unsure if this is a bug in the library, a problem with dependencies, or something else. I'm not familiar enough with Python unforunately to troubleshoot this further.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions