I received the following bug report: ... make[2]: Entering directory '/home/Work/binutils-gdb/build/gdb' CXX utils.o ../../gdb/utils.c: In function ‘void maintenance_info_screen(const char*, int)’: ../../gdb/utils.c:1310:14: error: ‘COLS’ was not declared in this scope 1310 | COLS); | ^~~~ ../../gdb/utils.c:1331:15: error: ‘LINES’ was not declared in this scope; did you mean ‘LONGEST’? 1331 | LINES); | ^~~~~ | LONGEST make[2]: *** [Makefile:1920: utils.o] Error 1 make[2]: Leaving directory '/home/Work/binutils-gdb/build/gdb' make[1]: *** [Makefile:14587: all-gdb] Error 2 make[1]: Leaving directory '/home/Work/binutils-gdb/build' make: *** [Makefile:1009: all] Error 2 ... filed here ( https://github.com/bminor/binutils-gdb/commit/f1531d046178fbdd97e3440e3d454683440b75f9#r110673657 ). I haven't been reproduce it yet, so I'm not sure what a fix would be. I tried building without tui but _nc_LINES is resolved by /lib64/libtinfo.so.6.
Not sure how to reproduce this yet, but I suppose a simple #ifdef COLS/LINES will fix this.
(In reply to Tom de Vries from comment #1) > Not sure how to reproduce this yet, but I suppose a simple #ifdef COLS/LINES > will fix this. Reproduced, by: - de-installing package ncurses-devel (which for me also de-installs readline-devel and guile-devel), and - building with --disable-tui (such that we don't require ncurses) and --without-system-readline (such that we don't require readline).
(In reply to Tom de Vries from comment #2) > - de-installing package ncurses-devel Suggested here: https://sourceware.org/pipermail/gdb-patches/2023-April/199152.html
Created attachment 14854 [details] Tentative patch Tentative patch, using HAVE_LIBCURSES.
The master branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e5cbbbf79ad269983f744414a7efece6784dd682 commit e5cbbbf79ad269983f744414a7efece6784dd682 Author: Tom de Vries <tdevries@suse.de> Date: Sat Apr 29 07:04:27 2023 +0200 [gdb/build] Fix build without ncurses in maintenance_info_screen With a build without ncurses we run into: ... src/gdb/utils.c: In function âvoid maintenance_info_screen(const char*, int)â: src/gdb/utils.c:1310:7: error: âCOLSâ was not declared in this scope COLS); ^~~~ src/gdb/utils.c:1331:8: error: âLINESâ was not declared in this scope LINES); ^~~~~ ... Fix this by using HAVE_LIBCURSES. Tested on x86_64-linux. PR build/30391 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30391
Fixed.