cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -DDATADIR=\"/usr/local/share\" -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -MT readline.o -MD -MP -MF .deps/readline.Tpo -c -o readline.o readline.c readline.c:192:16: error: too many arguments to function call, expected 0, have 1 192 | rl_message(message); | ~~~~~~~~~~ ^~~~~~~ /usr/local/include/readline/readline.h:410:12: note: 'rl_message' declared here 410 | extern int rl_message (void); | ^ 1 error generated. *** Error code 1 Stop. The relevant part of readline.h: #if defined (USE_VARARGS) && defined (PREFER_STDARG) extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2))); #else extern int rl_message (); #endif I think the USE_VARARGS or PREFER_STDARG isn't defined.
The problem is that rlstd.c has the following block: /* Moved from config.h.in because readline.h:rl_message depends on these defines. */ #if defined (__STDC__) && defined (HAVE_STDARG_H) # define PREFER_STDARG # define USE_VARARGS which checks for HAVE_STDARG_H. This assumes that the consumer a) uses autoconf b) checks for stdarg.h c) includes config.h before any readline headers. As a temp fix, CFLAGS+= -DHAVE_STDARG_H helps.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e52e44fc0c271a1250991d648867319db93cb605 commit e52e44fc0c271a1250991d648867319db93cb605 Author: Zsolt Udvari <uzsolt@FreeBSD.org> AuthorDate: 2024-10-07 14:10:19 +0000 Commit: Zsolt Udvari <uzsolt@FreeBSD.org> CommitDate: 2024-10-07 14:12:34 +0000 devel/rlwrap: fix rl_message() build error Should define HAVE_STDARG_H and as a temporary fix add it to CFLAGS. While I'm here, remove GNU_CONFIGURE_MANPREFIX and unneeded python_OLD_CMD (declared already). PR: 281920 Approved by: portmgr (blanket) devel/rlwrap/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
(In reply to Konstantin Belousov from comment #1) Thanks for quick fix!