bugGNU Networking Utilities - Bugs: bug #65263, FTBFS with GCC 14

 
 

bug #65263: FTBFS with GCC 14

Submitter:  Xi Ruoyao <xry111>
Submitted:  Tue 06 Feb 2024 08:13:04 AM UTC
Votes: 1
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 05 Oct 2024 03:06:32 PM UTC, comment #2: 

--- inetutils-2.5/am/libcurses.m4 2022-12-31 18:35:18.000000000 -0600
+++ inet-utils-2.5-works/am/libcurses.m4 2024-10-04 23:26:29.969075967 -0600
@@ -130,11 +130,22 @@
 #ifndef _XOPEN_CURSES
 # include <term.h>
 #endif]])
+
       if test "$ac_cv_lib_curses_tgetent" = yes \
    && test "$ac_cv_have_decl_tgetent" = yes; then
  AC_DEFINE([HAVE_CURSES_TGETENT], 1)
       fi
+
+      if test "$ac_cv_lib_curses_tgetent" = yes \
+   && test "$ac_cv_have_decl_tgetent" = no; then
+ AC_DEFINE([HAVE_CURSES_NO_PROTOTYPE_BUT_YES_TGETENT], 1, [curses defined but no prototype])
+      fi
+     
+     
+
+
     fi
+   
     if test "$ac_cv_lib_curses_tgetent" = no \
  && test "$ac_cv_lib_termcap_tgetent" = no; then
       AC_CHECK_LIB(termlib, tgetent, LIBTERMCAP=-ltermlib)




--- inetutils-2.5/telnet/telnet.c 2023-12-29 11:34:46.000000000 -0600
+++ inet-utils-2.5-works/telnet/telnet.c 2024-10-05 08:56:16.983486581 -0600
@@ -80,6 +80,8 @@
 # endif
 #endif
 
+
+
 #ifdef AUTHENTICATION
 # include <libtelnet/auth.h>
 #endif
@@ -758,11 +760,16 @@
  */
 char termbuf[2048] = { 0 };
 
+#ifdef HAVE_CURSES_NO_PROTOTYPE_BUT_YES_TGETENT
+#include <term.h>
+#endif
+
 static int
 init_term (char *tname, int *errp)
 {
   int err = -1;
 
+
 #ifdef HAVE_TGETENT
   err = tgetent (termbuf, tname);
   if (err == 1)


--- inetutils-2.5/telnetd/utility.c 2023-12-29 11:34:46.000000000 -0600
+++ inet-utils-2.5-works/telnetd/utility.c 2024-10-05 08:59:31.451471852 -0600
@@ -44,6 +44,12 @@
 # endif
 #endif
 
+
+#ifdef HAVE_CURSES_NO_PROTOTYPE_BUT_YES_TGETENT
+#include <term.h>
+#endif

+
 #if defined HAVE_STREAMSPTY && defined HAVE_GETMSG \
   && defined HAVE_STROPTS_H
 # include <stropts.h>


seems to work

Jeffrey Cliff <themusicgod1>
Sat 05 Oct 2024 05:02:40 AM UTC, comment #1: 

ran across this too

(  ncurses 6.4.20221231  / gcc (GCC) 15.0.0 20240509 (experimental) )

verified that

./config.log:ac_cv_lib_curses_tgetent=yes

  • HAVE_TERMCAP_TGETENT is not defined at L767
  • HAVE_CURSES_TGETENT  is not defined at L767 (despite the above)



Jeffrey Cliff <themusicgod1>
Tue 06 Feb 2024 08:13:04 AM UTC, original submission:  

With ncurses-6.4-20230520, a "compatibility" symlink /usr/lib/libcurses.so -> libncurses.so, and GCC 14, telnet FTBFS with:

telnet.c: In function 'init_term':
telnet.c:767:9: error: implicit declaration of function 'tgetent'; did you mean 'getenv'? [-Wimplicit-function-declaration]
  767 |   err = tgetent (termbuf, tname);
      |         ^~~~~~~
      |         getenv

The problem is ncurses curse.h does not have a prototype for tgetent, but our configuration system does not try term.h or termcap.h after finding tgetent in -lcurses.

Xi Ruoyao <xry111>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #56477:  telnet.patch added by themusicgod1 (2KiB - text/x-patch - the above in patch form)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by themusicgod1 (Voted in favor of this item)
  • -email is unavailable- added by themusicgod1 (Posted a comment)
  • -email is unavailable- added by xry111 (Submitted the item)
  •  

    There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-10-13 themusicgod1 Carbon-Copy- Added themusicgod1
    2024-10-05 themusicgod1 Attached File- Added telnet.patch, #56477

    Back to the top

    Powered by Savane 3.14-7003.
    Corresponding source code