Summary: | dev-libs/libdnet-1.18.0-r1 - [gcc-15] ./dnet.c: error: passing argument 2 of PyObject_AsReadBuffer from incompatible pointer type [-Wincompatible-pointer-types | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo Netmon project <netmon> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chall0+gentoo, conikost, jy6x2b32pie9, stefan.cristian+git, yamadharma, yesi, zhixu.liu |
Priority: | Normal | Keywords: | PATCH, PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/ofalk/libdnet/pull/104 https://github.com/ofalk/libdnet/issues/95 https://github.com/gentoo/gentoo/pull/41209 https://bugs.gentoo.org/show_bug.cgi?id=951719 https://github.com/gentoo/gentoo/pull/41442 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 870412, 941869 | ||
Attachments: |
emerge-info.txt
dev-libs:libdnet-1.18.0-r1:20240601-091306.log emerge-history.txt.xz environment etc.clang.tar.xz etc.portage.tar.xz logs.tar.xz qlist-info.txt.xz emerge --info |
Description
Toralf Förster
![]() Created attachment 894858 [details]
emerge-info.txt
Created attachment 894859 [details]
dev-libs:libdnet-1.18.0-r1:20240601-091306.log
Created attachment 894860 [details]
emerge-history.txt.xz
Created attachment 894861 [details]
environment
Created attachment 894862 [details]
etc.clang.tar.xz
Created attachment 894863 [details]
etc.portage.tar.xz
Created attachment 894864 [details]
logs.tar.xz
Created attachment 894865 [details]
qlist-info.txt.xz
upstream bug https://github.com/ofalk/libdnet/issues/95 *** Bug 951700 has been marked as a duplicate of this bug. *** *** Bug 951700 has been marked as a duplicate of this bug. *** The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9b545ca3f8003b8d51c0844e9862158a88adc41 commit e9b545ca3f8003b8d51c0844e9862158a88adc41 Author: Z. Liu <zhixu.liu@gmail.com> AuthorDate: 2025-03-21 10:43:05 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-21 11:05:34 +0000 dev-libs/libdnet: fix error on incompatible-function-pointer-types no repsonse from upstream for the PR after 30 days Closes: https://bugs.gentoo.org/933360 Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/41209 Signed-off-by: Sam James <sam@gentoo.org> ...-1.18.0-fix-incompatible-function-pointer.patch | 110 +++++++++++++++++++++ dev-libs/libdnet/libdnet-1.18.0-r2.ebuild | 102 +++++++++++++++++++ 2 files changed, 212 insertions(+) I still have the same issue with: - dev-libs/libdnet-1.18.0-r1 - dev-libs/libdnet-1.18.0-r2 Dans le fichier inclus depuis ../include/dnet.h:27: ../include/dnet/fw.h:50:38: note: « fw_handler » {alias « int (*)(const struct fw_rule *, void *) »} attendu mais l'argument est de type « int (*)(struct fw_rule *, void *) » 50 | int fw_loop(fw_t *f, fw_handler callback, void *arg); | ~~~~~~~~~~~^~~~~~~~ error: command '/usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc' failed with exit code 1 * ERROR: dev-libs/libdnet-1.18.0-r1::gentoo failed (compile phase): * Wheel build failed * * Call stack: * ebuild.sh, line 136: Called src_compile * environment, line 4074: Called distutils-r1_src_compile * environment, line 2029: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile' * environment, line 733: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3689: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3244: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3242: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 1174: Called distutils-r1_run_phase 'distutils-r1_python_compile' * environment, line 2011: Called distutils-r1_python_compile * environment, line 1833: Called distutils_pep517_install '/var/tmp/portage/dev-libs/libdnet-1.18.0-r1/work/libdnet-libdnet-1.18.0-python3_12/install' * environment, line 2361: Called die * The specific snippet of code: * local wheel=$("${cmd[@]}" 3>&1 1>&2 || die "Wheel build failed"); * * If you need support, post the output of `emerge --info '=dev-libs/libdnet-1.18.0-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-libs/libdnet-1.18.0-r1::gentoo'`. * The complete build log is located at '/var/log/portage/dev-libs:libdnet-1.18.0-r1:20250325-141014.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-libs/libdnet-1.18.0-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libdnet-1.18.0-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-libs/libdnet-1.18.0-r1/work/libdnet-libdnet-1.18.0/python' * S: '/var/tmp/portage/dev-libs/libdnet-1.18.0-r1/work/libdnet-libdnet-1.18.0' * * The following package has failed to build, install, or execute postinst: * * (dev-libs/libdnet-1.18.0-r1:0/0::gentoo, ebuild scheduled for merge), Log file: * '/var/log/portage/dev-libs:libdnet-1.18.0-r1:20250325-141014.log' * /usr/include/python3.12/abstract.h:371:51: note: « Py_ssize_t * » {alias « long int * »} attendu mais l'argument est de type « int * » 371 | Py_ssize_t *buffer_len); | ~~~~~~~~~~~~^~~~~~~~~~ ./dnet.c: Dans la fonction « __pyx_pf_4dnet_14ip_cksum_add »: ./dnet.c:8743:3: attention: « PyObject_AsReadBuffer » est obsolète [-Wdeprecated-declarations] 8743 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) == 0); | ^~~~~~~~~ /usr/include/python3.12/abstract.h:369:17: note: déclaré ici 369 | PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj, | ^~~~~~~~~~~~~~~~~~~~~ ./dnet.c:8743:52: erreur: passage de l'argument 2 de « PyObject_AsReadBuffer » depuis un type pointeur incompatible [-Wincompatible-pointer-types] 8743 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) == 0); | ~^~~~~~~~~~~ | | | char ** /usr/include/python3.12/abstract.h:370:52: note: « const void ** » attendu mais l'argument est de type « char ** » 370 | const void **buffer, | ~~~~~~~~~~~~~^~~~~~ ./dnet.c:8743:66: erreur: passage de l'argument 3 de « PyObject_AsReadBuffer » depuis un type pointeur incompatible [-Wincompatible-pointer-types] 8743 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) == 0); | ~^~~~~~~~~~~ | | | int * /usr/include/python3.12/abstract.h:371:51: note: « Py_ssize_t * » {alias « long int * »} attendu mais l'argument est de type « int * » 371 | Py_ssize_t *buffer_len); | ~~~~~~~~~~~~^~~~~~~~~~ error: command '/usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc' failed with exit code 1 * ERROR: dev-libs/libdnet-1.18.0-r2::gentoo failed (compile phase): * Wheel build failed * * Call stack: * ebuild.sh, line 136: Called src_compile * environment, line 4090: Called distutils-r1_src_compile * environment, line 2045: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile' * environment, line 734: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3705: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3260: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3258: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 1190: Called distutils-r1_run_phase 'distutils-r1_python_compile' * environment, line 2027: Called distutils-r1_python_compile * environment, line 1849: Called distutils_pep517_install '/var/tmp/portage/dev-libs/libdnet-1.18.0-r2/work/libdnet-libdnet-1.18.0-python3_12/install' * environment, line 2377: Called die * The specific snippet of code: * local wheel=$("${cmd[@]}" 3>&1 1>&2 || die "Wheel build failed"); * * If you need support, post the output of `emerge --info '=dev-libs/libdnet-1.18.0-r2::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-libs/libdnet-1.18.0-r2::gentoo'`. * The complete build log is located at '/var/log/portage/dev-libs:libdnet-1.18.0-r2:20250325-133920.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-libs/libdnet-1.18.0-r2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libdnet-1.18.0-r2/temp/environment'. * Working directory: '/var/tmp/portage/dev-libs/libdnet-1.18.0-r2/work/libdnet-libdnet-1.18.0/python' * S: '/var/tmp/portage/dev-libs/libdnet-1.18.0-r2/work/libdnet-libdnet-1.18.0' Created attachment 922739 [details]
emerge --info
ok, seems I did test with clang only, :( will try to fix gcc issue Please change the status of the bug since it is not "RESOLVED FIXED" *** Bug 951719 has been marked as a duplicate of this bug. *** please have a test with PR41442 I did the test with gcc 14 & clang 19 only =================================================================
Package Settings
=================================================================
sys-devel/gcc-14.2.1_p20241221::gentoo was built with the following:
USE="cet (cxx) (default-stack-clash-protection) (default-znow) fortran hardened (multilib) nls openmp (pie) sanitize (ssp) zstd -ada (-custom-cflags) -d -debug -doc (-fixed-point) -go -graphite (-ieee-long-double) -jit (-libssp) -lto -modula2 -objc -objc++ -objc-gc (-pch) -pgo -rust -systemtap -test (-time64) -valgrind -vanilla -vtv" ABI_X86="(64)"
CFLAGS="-march=alderlake -pipe -O2"
CXXFLAGS="-march=alderlake -pipe -O2"
llvm-core/clang-15.0.7-r3::gentoo was built with the following:
USE="extra (pie) static-analyzer xml -debug (-doc) (-ieee-long-double) -test -verify-sig" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (MSP430) (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) (XCore) (-ARC) (-CSKY) (-DirectX) (-LoongArch) (-M68k) (-SPIRV)" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11"
llvm-core/clang-18.1.8-r6::gentoo was built with the following:
USE="extra (pie) static-analyzer xml -debug -doc (-ieee-long-double) -test -verify-sig" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (LoongArch) (MSP430) (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) (XCore) -ARC -CSKY -DirectX -M68k -SPIRV -Xtensa" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11 -python3_13"
llvm-core/clang-19.1.7::gentoo was built with the following:
USE="extra (pie) static-analyzer xml -debug -doc (-ieee-long-double) -test -verify-sig" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (LoongArch) (MSP430) (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) (XCore) -ARC -CSKY -DirectX -M68k -SPIRV -Xtensa" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11 -python3_13"
In file included from ../include/dnet.h:25:
../include/dnet/intf.h:64:44: note: expected ‘intf_handler’ {aka ‘int (*)(const struct intf_entry *, void *)’} but argument is of type ‘int (*)(struct intf_entry *, void *)’
64 | int intf_loop(intf_t *i, intf_handler callback, void *arg);
| ~~~~~~~~~~~~~^~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_5route_8loop’:
./dnet.c:20353:68: error: passing argument 2 of ‘route_loop’ from incompatible pointer type [-Wincompatible-pointer-types]
20353 | __pyx_t_1 = __Pyx_PyInt_From_int(route_loop(__pyx_v_self->route, __pyx_f_4dnet___route_callback, ((void *)__pyx_v__arg))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(struct route_entry *, void *)
In file included from ../include/dnet.h:26:
../include/dnet/route.h:34:47: note: expected ‘route_handler’ {aka ‘int (*)(const struct route_entry *, void *)’} but argument is of type ‘int (*)(struct route_entry *, void *)’
34 | int route_loop(route_t *r, route_handler callback, void *arg);
| ~~~~~~~~~~~~~~^~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_2fw_6loop’:
./dnet.c:22280:62: error: passing argument 2 of ‘fw_loop’ from incompatible pointer type [-Wincompatible-pointer-types]
22280 | __pyx_t_1 = __Pyx_PyInt_From_int(fw_loop(__pyx_v_self->fw, __pyx_f_4dnet___fw_callback, ((void *)__pyx_v__arg))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(struct fw_rule *, void *)
In file included from ../include/dnet.h:27:
../include/dnet/fw.h:50:38: note: expected ‘fw_handler’ {aka ‘int (*)(const struct fw_rule *, void *)’} but argument is of type ‘int (*)(struct fw_rule *, void *)’
50 | int fw_loop(fw_t *f, fw_handler callback, void *arg);
| ~~~~~~~~~~~^~~~~~~~
error: command '/usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc' failed with exit code 1
* ERROR: dev-libs/libdnet-1.18.0-r1::gentoo failed (compile phase):
* Wheel build failed
*
* Call stack:
* ebuild.sh, line 136: Called src_compile
* environment, line 4074: Called distutils-r1_src_compile
* environment, line 2027: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
* environment, line 738: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3689: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3244: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3242: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 1179: Called distutils-r1_run_phase 'distutils-r1_python_compile'
* environment, line 2009: Called distutils-r1_python_compile
* environment, line 1832: Called distutils_pep517_install '/var/tmp/portage/dev-libs/libdnet-1.18.0-r1/work/libdnet-libdnet-1.18.0-python3_12/install'
* environment, line 2360: Called die
* The specific snippet of code:
* local wheel=$("${cmd[@]}" 3>&1 1>&2 || die "Wheel build failed");
*
* If you need support, post the output of `emerge --info '=dev-libs/libdnet-1.18.0-r1::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-libs/libdnet-1.18.0-r1::gentoo'`.
* The complete build log is located at '/var/log/portage/dev-libs:libdnet-1.18.0-r1:20250404-160303.log'.
* For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-libs/libdnet-1.18.0-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-libs/libdnet-1.18.0-r1/temp/environment'.
* Working directory: '/var/tmp/portage/dev-libs/libdnet-1.18.0-r1/work/libdnet-libdnet-1.18.0/python'
* S: '/var/tmp/portage/dev-libs/libdnet-1.18.0-r1/work/libdnet-libdnet-1.18.0'
>>> Failed to emerge dev-libs/libdnet-1.18.0-r1, Log file:
(In reply to yesi from comment #19) > >>> Failed to emerge dev-libs/libdnet-1.18.0-r1, Log file: plese test with with libdnet-1.18.0-r2, and apply the patch in PR41442 (which is unmerged yet) > PR41442
With the patch, there's no errors.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02082e65bf077083e7aac1214ced4d256c7cd3a2 commit 02082e65bf077083e7aac1214ced4d256c7cd3a2 Author: Z. Liu <zhixu.liu@gmail.com> AuthorDate: 2025-04-03 08:32:02 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-04-10 10:17:13 +0000 dev-libs/libdnet: fix errors on -Wincompatible-pointer-types update last patch which fix -Wincompatible-function-pointer-types for clang only Closes: https://bugs.gentoo.org/933360 Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/41442 Signed-off-by: Sam James <sam@gentoo.org> ...-1.18.0-fix-incompatible-function-pointer.patch | 77 +++++++++++++++++++++- 1 file changed, 75 insertions(+), 2 deletions(-) |