The Samba-Bugzilla – Bug 8056
Compile failed unless --without-readline
Last modified: 2011-04-05 23:31:20 UTC
Simply ./configure; make on Mac OS X 10.6.7 with Xcode 3.2.6 (gcc 4.2.1) fails and following messages are displayed.
lib/readline.c: In function ‘smb_readline’:
lib/readline.c:146: error: ‘rl_completion_func_t’ undeclared (first use in this function)
lib/readline.c:146: error: (Each undeclared identifier is reported only once
lib/readline.c:146: error: for each function it appears in.)
lib/readline.c:146: error: expected expression before ‘)’ token
The following command failed:
gcc -O -fno-common -I. -I/Volumes/temp/work/samba-3.5.8/source3 -I/Volumes/temp/work/samba-3.5.8/source3/../lib/popt -I/Volumes/temp/work/samba-3.5.8/source3/iniparser/src -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./libaddns -I./librpc -I./.. -I./../lib/talloc -I../lib/tdb/include -DHAVE_CONFIG_H -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./libaddns -I./librpc -I./.. -I./../lib/popt -I/usr/local/include -DLDAP_DEPRECATED -I/Volumes/temp/work/samba-3.5.8/source3/lib -I.. -I../source4 -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3 -fPIE -c lib/readline.c -o lib/readline.o
make: *** [lib/readline.o] Error 1
Simply running ./configure --without-readline successed.
Is HAVE_NEW_LIBREADLINE defined in the config.h ?
That's what turns on this definition..
(In reply to comment #1)
> Is HAVE_NEW_LIBREADLINE defined in the config.h ?
> That's what turns on this definition..
Yes, and HAVE_LIBREADLINE, HAVE_READLINE_H, HAVE_READLINE_HISTORY_H and
HAVE_READLINE_READLINE_H are not defined.
Looks like this check in configure.in:
# The readline API changed slightly from readline3 to readline4, so
# code will generate warnings on one of them unless we have a few
# special cases.
[Do we have rl_completion_matches?])],
isn't enough. Needs to explicitly check for the rl_completion_func_t type as well.