Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938249 - net-misc/networkmanager-1.48.4[libedit] - [gcc-15] ../.../agent.c: error: assignment to int ( )(void) from incompatible pointer type int ( )(const char , int) [-Wincomp
Summary: net-misc/networkmanager-1.48.4[libedit] - [gcc-15] ../.../agent.c: error: ass...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 936803 (view as bug list)
Depends on:
Blocks: c99-porting gcc-14 gcc-14-stable
  Show dependency tree
 
Reported: 2024-08-20 16:05 UTC by Toralf Förster
Modified: 2025-01-31 07:23 UTC (History)
5 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,18.90 KB, text/plain)
2024-08-20 16:05 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,136.26 KB, text/plain)
2024-08-20 16:05 UTC, Toralf Förster
Details
environment (environment,189.53 KB, text/plain)
2024-08-20 16:05 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.20 KB, application/x-xz)
2024-08-20 16:05 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,37.78 KB, application/x-xz)
2024-08-20 16:05 UTC, Toralf Förster
Details
net-misc:networkmanager-1.48.4:20240820-130939.log.xz (net-misc:networkmanager-1.48.4:20240820-130939.log.xz,22.89 KB, application/x-xz)
2024-08-20 16:05 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,40.74 KB, application/x-xz)
2024-08-20 16:05 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,63.09 KB, application/x-xz)
2024-08-20 16:05 UTC, Toralf Förster
Details
=net-misc/networkmanager-1.48.10:0::gentoo (1731681658-install-net-misc_networkmanager-1.48.10:0::gentoo.out.xz,31.25 KB, application/x-xz)
2024-11-15 14:50 UTC, Paul Zander
Details
emerge --info '=net-misc/networkmanager-1.48.10-r1::gentoo' but with USE=libedit disabled in /etc/portage/package.use for this specific version. (emerge-info.txt,19.76 KB, text/plain)
2025-01-29 15:01 UTC, Andreas Thalhammer
Details
build log of failing build (without additional patch) (net-misc:networkmanager-1.48.10-r1:20250129-145553.log,913.79 KB, text/x-log)
2025-01-29 15:03 UTC, Andreas Thalhammer
Details
build log of failing build with patch from mentioned upstream pull request (net-misc:networkmanager-1.48.10-r1:20250129-145220.log,920.75 KB, text/x-log)
2025-01-29 15:06 UTC, Andreas Thalhammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-08-20 16:05:28 UTC
too long lines were shrinked:

[676/919] x86_64-pc-linux-gnu-gcc -Isrc/libnm-crypto/libnm-crypto-null.a.p -Isrc/libnm-crypto -I../NetworkManager-1.48.4/src/libnm-crypto -I. -I../NetworkManager-1.48.4 -Isrc -I../NetworkManager-1.48.4/src -I/usr/include/gio-unix-2.0 -I/usr/lib64/libffi/include -I/usr/include/glib-2.0 -I/usr/lib64/g
[677/919] x86_64-pc-linux-gnu-gcc -Isrc/libnm-crypto/libnm-crypto-gnutls.a.p -Isrc/libnm-crypto -I../NetworkManager-1.48.4/src/libnm-crypto -I. -I../NetworkManager-1.48.4 -Isrc -I../NetworkManager-1.48.4/src -I/usr/include/gio-unix-2.0 -I/usr/lib64/libffi/include -I/usr/include/glib-2.0 -I/usr/lib64
[678/919] x86_64-pc-linux-gnu-gcc -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
FAILED: src/nmcli/nmcli.p/agent.c.o 
x86_64-pc-linux-gnu-gcc -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-cli
../NetworkManager-1.48.4/src/nmcli/agent.c: In function get_secrets_from_user:
../NetworkManager-1.48.4/src/nmcli/agent.c:88:29: error: assignment to int (*)(void) from incompatible pointer type int (*)(const char *, int) [-Wincompatible-pointer-types]
   88 |             rl_startup_hook = set_deftext;
      |                             ^

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_desktop_gnome_systemd-20240817-145313

  UNMASKED:
    Please re-assign to toolchain@ if you get a test failure in C, C++, or Fortran code which makes no sense.
  <sys-devel/gcc-15.0.9999:15

  The attached etc.portage.tar.xz has all details.
  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-15 *
clang/llvm (if any):
clang version 18.1.8
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/18
18.1.8
Python 3.12.5
Available Ruby profiles:
  [1]   ruby31 (with Rubygems)
  [2]   ruby32 (with Rubygems)
  [3]   ruby33 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.80.1 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 17.0.12_p7 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.4_p7 [openjdk-bin-21]
3)	Eclipse Temurin JDK 8.422_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-17 
  [3]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):
go version go1.23.0 linux/amd64

  HEAD of ::gentoo
commit 3bf85fad694c0f8630e65fe706deb4ea82ffec3a
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Aug 20 11:04:18 2024 +0000

    2024-08-20 11:04:18 UTC

emerge -qpvO =net-misc/networkmanager-1.48.4
[ebuild  N    ] net-misc/networkmanager-1.48.4  USE="bluetooth concheck gtk-doc introspection libedit modemmanager nss policykit ppp systemd tools wext wifi -audit -connection-sharing -debug -dhclient -dhcpcd (-elogind) -gnutls -iptables -iwd -nftables -ofono -ovs -psl -resolvconf (-selinux) -syslog -teamd -test -vala" ABI_X86="(64) -32 (-x32)"
Comment 1 Toralf Förster gentoo-dev 2024-08-20 16:05:29 UTC
Created attachment 900814 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-08-20 16:05:30 UTC
Created attachment 900815 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2024-08-20 16:05:32 UTC
Created attachment 900816 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2024-08-20 16:05:32 UTC
Created attachment 900817 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2024-08-20 16:05:33 UTC
Created attachment 900818 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-08-20 16:05:34 UTC
Created attachment 900819 [details]
net-misc:networkmanager-1.48.4:20240820-130939.log.xz
Comment 7 Toralf Förster gentoo-dev 2024-08-20 16:05:35 UTC
Created attachment 900820 [details]
qlist-info.txt.xz
Comment 8 Toralf Förster gentoo-dev 2024-08-20 16:05:36 UTC
Created attachment 900821 [details]
temp.tar.xz
Comment 9 Andreas Sturmlechner gentoo-dev 2024-11-01 14:37:38 UTC
Reproducible with GCC-14 (but with USE=libedit specifically).
Comment 10 Pacho Ramos gentoo-dev 2024-11-08 20:14:30 UTC
Can you retry with 1.48.10? Thanks
Comment 11 Paul Zander 2024-11-15 14:50:47 UTC
Created attachment 908743 [details]
=net-misc/networkmanager-1.48.10:0::gentoo

Reproduces for =net-misc/networkmanager-1.48.10:0::gentoo
Comment 12 Florian Schmaus gentoo-dev 2024-12-02 17:35:36 UTC
Proposed fix inhttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2082
Comment 13 Florian Schmaus gentoo-dev 2024-12-03 11:05:39 UTC
*** Bug 936803 has been marked as a duplicate of this bug. ***
Comment 14 Florian Schmaus gentoo-dev 2024-12-03 11:07:19 UTC
https://bugs.gentoo.org/936803#c9 has a got summary about what happened here.
Comment 15 Florian Schmaus gentoo-dev 2024-12-03 11:15:40 UTC
FWIW, until this is fixed upstream, Gentoo could probably simply apply https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2082/diffs?commit_id=3adffef764ab0a0f637d5f0d76580a788a4b4f6c since all our libedit versions have the matching function signature.
Comment 16 Andreas Thalhammer 2025-01-29 07:57:42 UTC
FYI I just hit this bug with net-misc/networkmanager-1.48.10-r1 (rebuild, after updating net-dialup/ppp from 2.5.0-r7 to 2.5.1-r1. Funny enough networkmanager was installed before with USE=libedit, but I don't remember if I changed anything on that build or not as a one-time-only-solution. I think not, as I don't remember anything about it.

Long story short, the error looks just like the one mentioned here. I then downloaded the libedit patch (wget https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/3adffef764ab0a0f637d5f0d76580a788a4b4f6c.patch) and put it into my portage patch directory for the specific networkmanager version (/etc/portage/patches/net-misc/networkmanager-1.48.10-r1), the build log shows that it had been applied successfully.

*I still got the same error.*

[ebuild   R    ] net-misc/networkmanager-1.48.10-r1::gentoo  USE="bluetooth concheck connection-sharing gtk-doc introspection libedit modemmanager nftables nss ofono (policykit) ppp systemd tools wifi -audit -debug -dhclient -dhcpcd (-elogind) -gnutls -iptables -iwd -ovs -psl -resolvconf (-selinux) -syslog -teamd -test -vala -wext" ABI_X86="(64) -32 (-x32)" 0 KiB

My solution for now was USE="-libedit", which made it build successfully.

If you want, I can provide the build logs. Just tell me.
Comment 17 Florian Schmaus gentoo-dev 2025-01-29 11:46:31 UTC
(In reply to Andreas Thalhammer from comment #16)
> If you want, I can provide the build logs. Just tell me.

Yes, please.
Comment 18 Andreas Thalhammer 2025-01-29 15:01:09 UTC
Created attachment 917847 [details]
emerge --info '=net-misc/networkmanager-1.48.10-r1::gentoo' but with USE=libedit disabled in /etc/portage/package.use for this specific version.

This way the build succeeds, while it fails with USE="libedit"...
Comment 19 Andreas Thalhammer 2025-01-29 15:03:23 UTC
Created attachment 917848 [details]
build log of failing build (without additional patch)

I ran this as
  USE=libedit emerge -1v net-misc/networkmanager
because I've added "-libedit" in my /etc/portage/package.use for now.
Comment 20 Andreas Thalhammer 2025-01-29 15:06:34 UTC
Created attachment 917849 [details]
build log of failing build with patch from mentioned upstream pull request

Build also fails with the patch mentioned in comment #12 i.e. the "user patch" is this one:

wget https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/3adffef764ab0a0f637d5f0d76580a788a4b4f6c.patch

Again, ran as
  USE=libedit emerge -1v net-misc/networkmanager
because I've added "-libedit" in my /etc/portage/package.use for now.
Comment 21 Florian Schmaus gentoo-dev 2025-01-29 17:31:16 UTC
You are seeing something slightly different, but related readline/libedit API and modern C porting:

../NetworkManager-1.48.10/src/nmcli/connections.c: In function ‘nmcli_editor_tab_completion’:
../NetworkManager-1.48.10/src/nmcli/connections.c:6843:64: error: assignment to ‘void (*)(char **, int,  int)’ from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
 6843 |                             rl_completion_display_matches_hook = uuid_display_hook;
      |                                                                ^
../NetworkManager-1.48.10/src/nmcli/connections.c:6890:60: error: assignment to ‘void (*)(char **, int,  int)’ from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
 6890 |                         rl_completion_display_matches_hook = uuid_display_hook;
      |                                                            ^
Comment 22 Andreas Thalhammer 2025-01-31 07:23:04 UTC
Well, I'm no developer, but "incompatible pointer type" and "libedit" sounded like it was the same. When it is not: do you want me to file a separate bug report for this?