Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936803 - net-misc/networkmanager-1.48.4[libedit]: ./src/nmcli/agent.c:88:29: error: incompatible function pointer types assigning to 'rl_hook_func_t *' (aka 'int (*)(void)') from 'int (const char *, int)' [-Wincompatible-function-pointer-types]
Summary: net-misc/networkmanager-1.48.4[libedit]: ./src/nmcli/agent.c:88:29: error: in...
Status: RESOLVED DUPLICATE of bug 938249
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-27 23:24 UTC by Mosaic J
Modified: 2024-12-03 11:05 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,928.11 KB, text/x-log)
2024-07-27 23:24 UTC, Mosaic J
Details
emerge-history.txt (emerge-history.txt,123.51 KB, text/plain)
2024-07-27 23:25 UTC, Mosaic J
Details
emerge-info.txt (emerge-info.txt,8.92 KB, text/plain)
2024-07-27 23:25 UTC, Mosaic J
Details
environment (environment,180.99 KB, text/plain)
2024-07-27 23:26 UTC, Mosaic J
Details
package-settings (USE flags, etc) (package-settings.txt,347 bytes, text/plain)
2024-07-27 23:26 UTC, Mosaic J
Details
gcc also complained the same error (build-gcc.log,945.71 KB, text/x-log)
2024-07-27 23:34 UTC, Mosaic J
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mosaic J 2024-07-27 23:24:50 UTC
Created attachment 898420 [details]
build.log

happens when building with llvm/clang:

[675/919] clang -Isrc/nmcli/nmcli.p -Isrc/nmcli -I../NetworkManager-1.48.4/src/nmcli -Isrc/libnm-core-public -I../NetworkManager-1.48.4/src/libnm-core-public -Isrc -I../Net15:24:01 [273/984]
/src -I. -I../NetworkManager-1.48.4 -Isrc/libnm-client-public -I../NetworkManager-1.48.4/src/libnm-client-public -I/usr/include/gio-unix-2.0 -I/usr/lib64/libffi/include -I/usr/include/glib-2
.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -Wdeclaration-after-sta
tement -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-conversion -Wmissing-declarations -Wmissing-include-dirs -Wmissing
-prototypes -Wold-style-definition -Wparentheses-equality -Wpointer-arith -Wshadow -Wshift-negative-value -Wstrict-prototypes -Wtypedef-redefinition -Wundef -Wunknown-attributes -Wvla -Wno-d
uplicate-decl-specifier -Wno-format-truncation -Wno-format-y2k -Wno-gnu-variable-sized-type-not-at-end -Wno-missing-field-initializers -Wno-pragmas -Wno-sign-compare -Wno-tautological-consta
nt-out-of-range-compare -Wno-unknown-pragmas -Wno-unused-parameter -fno-strict-aliasing -march=native -O2 -pipe -pthread -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_42 -DGLIB_VERSION_MAX_ALLO
WED=GLIB_VERSION_2_42 -MD -MQ src/nmcli/nmcli.p/common.c.o -MF src/nmcli/nmcli.p/common.c.o.d -o src/nmcli/nmcli.p/common.c.o -c ../NetworkManager-1.48.4/src/nmcli/common.c                  
FAILED: src/nmcli/nmcli.p/common.c.o                                                                                                                                                          
clang -Isrc/nmcli/nmcli.p -Isrc/nmcli -I../NetworkManager-1.48.4/src/nmcli -Isrc/libnm-core-public -I../NetworkManager-1.48.4/src/libnm-core-public -Isrc -I../NetworkManager-1.48.4/src -I. -
I../NetworkManager-1.48.4 -Isrc/libnm-client-public -I../NetworkManager-1.48.4/src/libnm-client-public -I/usr/include/gio-unix-2.0 -I/usr/lib64/libffi/include -I/usr/include/glib-2.0 -I/usr/
lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -Wdeclaration-after-statement -Wf
loat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-conversion -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototype
s -Wold-style-definition -Wparentheses-equality -Wpointer-arith -Wshadow -Wshift-negative-value -Wstrict-prototypes -Wtypedef-redefinition -Wundef -Wunknown-attributes -Wvla -Wno-duplicate-d
ecl-specifier -Wno-format-truncation -Wno-format-y2k -Wno-gnu-variable-sized-type-not-at-end -Wno-missing-field-initializers -Wno-pragmas -Wno-sign-compare -Wno-tautological-constant-out-of-
range-compare -Wno-unknown-pragmas -Wno-unused-parameter -fno-strict-aliasing -march=native -O2 -pipe -pthread -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_42 -DGLIB_VERSION_MAX_ALLOWED=GLIB_V
ERSION_2_42 -MD -MQ src/nmcli/nmcli.p/common.c.o -MF src/nmcli/nmcli.p/common.c.o.d -o src/nmcli/nmcli.p/common.c.o -c ../NetworkManager-1.48.4/src/nmcli/common.c
../NetworkManager-1.48.4/src/nmcli/common.c:696:41: error: incompatible function pointer types assigning to 'rl_hook_func_t *' (aka 'int (*)(void)') from 'int (const char *, int)' [-Wincompa
tible-function-pointer-types]                  
  696 |                         rl_startup_hook = nmc_rl_set_deftext;                          
      |                                         ^ ~~~~~~~~~~~~~~~~~~                           
1 error generated.                             

...
[678/919] clang -Isrc/nmcli/nmcli.p -Isrc/nmcli -I../NetworkManager-1.48.4/src/nmcli -Isrc/libnm-core-public -I../NetworkManager-1.48.4/src/libnm-core-public -Isrc -I../Net15:24:01 [233/984]
/src -I. -I../NetworkManager-1.48.4 -Isrc/libnm-client-public -I../NetworkManager-1.48.4/src/libnm-client-public -I/usr/include/gio-unix-2.0 -I/usr/lib64/libffi/include -I/usr/include/glib-2
.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -Wdeclaration-after-sta
tement -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-conversion -Wmissing-declarations -Wmissing-include-dirs -Wmissing
-prototypes -Wold-style-definition -Wparentheses-equality -Wpointer-arith -Wshadow -Wshift-negative-value -Wstrict-prototypes -Wtypedef-redefinition -Wundef -Wunknown-attributes -Wvla -Wno-d
uplicate-decl-specifier -Wno-format-truncation -Wno-format-y2k -Wno-gnu-variable-sized-type-not-at-end -Wno-missing-field-initializers -Wno-pragmas -Wno-sign-compare -Wno-tautological-consta
nt-out-of-range-compare -Wno-unknown-pragmas -Wno-unused-parameter -fno-strict-aliasing -march=native -O2 -pipe -pthread -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_42 -DGLIB_VERSION_MAX_ALLO
WED=GLIB_VERSION_2_42 -MD -MQ src/nmcli/nmcli.p/connections.c.o -MF src/nmcli/nmcli.p/connections.c.o.d -o src/nmcli/nmcli.p/connections.c.o -c ../NetworkManager-1.48.4/src/nmcli/connections
.c                                             
FAILED: src/nmcli/nmcli.p/connections.c.o 
clang -Isrc/nmcli/nmcli.p -Isrc/nmcli -I../NetworkManager-1.48.4/src/nmcli -Isrc/libnm-core-public -I../NetworkManager-1.48.4/src/libnm-core-public -Isrc -I../NetworkManager-1.48.4/src -I. -
I../NetworkManager-1.48.4 -Isrc/libnm-client-public -I../NetworkManager-1.48.4/src/libnm-client-public -I/usr/include/gio-unix-2.0 -I/usr/lib64/libffi/include -I/usr/include/glib-2.0 -I/usr/
lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -Wdeclaration-after-statement -Wf
loat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-conversion -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototype
s -Wold-style-definition -Wparentheses-equality -Wpointer-arith -Wshadow -Wshift-negative-value -Wstrict-prototypes -Wtypedef-redefinition -Wundef -Wunknown-attributes -Wvla -Wno-duplicate-d
ecl-specifier -Wno-format-truncation -Wno-format-y2k -Wno-gnu-variable-sized-type-not-at-end -Wno-missing-field-initializers -Wno-pragmas -Wno-sign-compare -Wno-tautological-constant-out-of-
range-compare -Wno-unknown-pragmas -Wno-unused-parameter -fno-strict-aliasing -march=native -O2 -pipe -pthread -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_42 -DGLIB_VERSION_MAX_ALLOWED=GLIB_V
ERSION_2_42 -MD -MQ src/nmcli/nmcli.p/connections.c.o -MF src/nmcli/nmcli.p/connections.c.o.d -o src/nmcli/nmcli.p/connections.c.o -c ../NetworkManager-1.48.4/src/nmcli/connections.c
../NetworkManager-1.48.4/src/nmcli/connections.c:7687:29: error: incompatible function pointer types assigning to 'rl_hook_func_t *' (aka 'int (*)(void)') from 'int (const char *, int)' [-Wi
ncompatible-function-pointer-types]            
 7687 |             rl_startup_hook = nmc_rl_set_deftext;                                      
      |                             ^ ~~~~~~~~~~~~~~~~~~                                       
1 error generated.                           
...
[679/919] clang -Isrc/nmcli/nmcli.p -Isrc/nmcli -I../NetworkManager-1.48.4/src/nmcli -Isrc/libnm-core-public -I../NetworkManager-1.48.4/src/libnm-core-public -Isrc -I../NetworkManager-1.48.4
/src -I. -I../NetworkManager-1.48.4 -Isrc/libnm-client-public -I../NetworkManager-1.48.4/src/libnm-client-public -I/usr/include/gio-unix-2.0 -I/usr/lib64/libffi/include -I/usr/include/glib-2
.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -Wdeclaration-after-sta
tement -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-conversion -Wmissing-declarations -Wmissing-include-dirs -Wmissing
-prototypes -Wold-style-definition -Wparentheses-equality -Wpointer-arith -Wshadow -Wshift-negative-value -Wstrict-prototypes -Wtypedef-redefinition -Wundef -Wunknown-attributes -Wvla -Wno-d
uplicate-decl-specifier -Wno-format-truncation -Wno-format-y2k -Wno-gnu-variable-sized-type-not-at-end -Wno-missing-field-initializers -Wno-pragmas -Wno-sign-compare -Wno-tautological-consta
nt-out-of-range-compare -Wno-unknown-pragmas -Wno-unused-parameter -fno-strict-aliasing -march=native -O2 -pipe -pthread -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_42 -DGLIB_VERSION_MAX_ALLO
WED=GLIB_VERSION_2_42 -MD -MQ src/nmcli/nmcli.p/agent.c.o -MF src/nmcli/nmcli.p/agent.c.o.d -o src/nmcli/nmcli.p/agent.c.o -c ../NetworkManager-1.48.4/src/nmcli/agent.c                      
FAILED: src/nmcli/nmcli.p/agent.c.o                                                                                                                                                           
clang -Isrc/nmcli/nmcli.p -Isrc/nmcli -I../NetworkManager-1.48.4/src/nmcli -Isrc/libnm-core-public -I../NetworkManager-1.48.4/src/libnm-core-public -Isrc -I../NetworkManager-1.48.4/src -I. -
I../NetworkManager-1.48.4 -Isrc/libnm-client-public -I../NetworkManager-1.48.4/src/libnm-client-public -I/usr/include/gio-unix-2.0 -I/usr/lib64/libffi/include -I/usr/include/glib-2.0 -I/usr/
lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -Wdeclaration-after-statement -Wf
loat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-conversion -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototype
s -Wold-style-definition -Wparentheses-equality -Wpointer-arith -Wshadow -Wshift-negative-value -Wstrict-prototypes -Wtypedef-redefinition -Wundef -Wunknown-attributes -Wvla -Wno-duplicate-d
ecl-specifier -Wno-format-truncation -Wno-format-y2k -Wno-gnu-variable-sized-type-not-at-end -Wno-missing-field-initializers -Wno-pragmas -Wno-sign-compare -Wno-tautological-constant-out-of-
range-compare -Wno-unknown-pragmas -Wno-unused-parameter -fno-strict-aliasing -march=native -O2 -pipe -pthread -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_42 -DGLIB_VERSION_MAX_ALLOWED=GLIB_V
ERSION_2_42 -MD -MQ src/nmcli/nmcli.p/agent.c.o -MF src/nmcli/nmcli.p/agent.c.o.d -o src/nmcli/nmcli.p/agent.c.o -c ../NetworkManager-1.48.4/src/nmcli/agent.c
../NetworkManager-1.48.4/src/nmcli/agent.c:88:29: error: incompatible function pointer types assigning to 'rl_hook_func_t *' (aka 'int (*)(void)') from 'int (const char *, int)' [-Wincompati
ble-function-pointer-types]                    
   88 |             rl_startup_hook = set_deftext;                                             
      |                             ^ ~~~~~~~~~~~                                              
1 error generated.       
...
...
ninja: build stopped: subcommand failed.                                                                                                                                                      
 * ERROR: net-misc/networkmanager-1.48.4::gentoo failed (compile phase):                                                                                                                      
 *   ninja -v -j20 -l21 failed                                                                                                                                                                
 *                                             
 * Call stack:                                 
 *     ebuild.sh, line  136:  Called src_compile                                               
 *   environment, line 4177:  Called meson-multilib_src_compile                                
 *   environment, line 2617:  Called multilib-minimal_src_compile                              
 *   environment, line 2819:  Called multilib_foreach_abi 'multilib-minimal_abi_src_compile'   
 *   environment, line 3086:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2779:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2777:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile'
 *   environment, line  670:  Called multilib-minimal_abi_src_compile                          
 *   environment, line 2813:  Called multilib_src_compile                                      
 *   environment, line 3306:  Called meson_src_compile                                         
 *   environment, line 2692:  Called eninja
 *   environment, line 1771:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "${*} failed"
 *
Comment 1 Mosaic J 2024-07-27 23:25:14 UTC
Created attachment 898421 [details]
emerge-history.txt
Comment 2 Mosaic J 2024-07-27 23:25:29 UTC
Created attachment 898422 [details]
emerge-info.txt
Comment 3 Mosaic J 2024-07-27 23:26:03 UTC
Created attachment 898423 [details]
environment
Comment 4 Mosaic J 2024-07-27 23:26:26 UTC
Created attachment 898424 [details]
package-settings (USE flags, etc)
Comment 5 Mosaic J 2024-07-27 23:27:17 UTC
hi, this is my first bug report, I apologize in advance if the format is not perfect, please point them out and let me know if there are something I should be working on :)
Comment 6 Mosaic J 2024-07-27 23:34:20 UTC
Created attachment 898425 [details]
gcc also complained the same error
Comment 7 Mosaic J 2024-07-28 00:38:28 UTC
disable 'readline' and 'libedit' seems to be the easy work-around
Comment 8 Alfred Wingate 2024-07-28 15:56:12 UTC
Good first bug report, better to have too much than too little imo. Usually you can get away with just emerge --info and the build.log (and any logs that the build mentions at the end for test failures).

The other workaround instead of disabling useflags would be to disable the warning -Wno-incompatible-function-pointer-types for this package.

Reproduced, and also noticed USE="libedit" ABI_X86="64 32" is broken because there is no abi_x86_32 libedit. :P

Ps.
Not strictly related to the bug, but did you knowingly drop -Wl,--as-needed from LDFLAGS?

Its a good to have flag which is why its there by default. And I do know of cases where not having it can causes unexpected results with unnecessary linkage (notably when someone wanted to remove gcc from their system).

https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Introduction
Comment 9 Alfred Wingate 2024-07-28 16:11:29 UTC
Looking at history. So historically readline and libedit had different signatures for rl_startup_hook. Networkmanager took this into account.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/f47d55fc66bb4873d14d37d77f651ab271637c1c

Issue is that libedit changed the signature around 2022 to match readline, breaking networkmanager and other projects that correctly adapted to libedits previous different signature.

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/readline/readline.h.diff?r1=1.52&r2=1.53&f=h
https://github.com/python/cpython/issues/117845
Comment 10 Florian Schmaus gentoo-dev 2024-12-03 11:05:39 UTC

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