Bug 8056 - Compile failed unless --without-readline
Summary: Compile failed unless --without-readline
Status: NEW
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.5.8
Hardware: x86 Mac OS X
: P5 minor
Target Milestone: ---
Assignee: Björn Jacke
QA Contact: Samba QA Contact
Depends on:
Reported: 2011-04-03 06:57 UTC by TAKAHASHI Motonobu
Modified: 2011-04-05 23:31 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description TAKAHASHI Motonobu 2011-04-03 06:57:11 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.

Compiling lib/readline.c
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
sleopard-1:source3 monyo$ 

Simply running ./configure --without-readline successed.
Comment 1 Jeremy Allison 2011-04-05 23:13:42 UTC
Is HAVE_NEW_LIBREADLINE defined in the config.h ?

That's what turns on this definition..

Comment 2 TAKAHASHI Motonobu 2011-04-05 23:28:30 UTC
(In reply to comment #1)
> Is HAVE_NEW_LIBREADLINE defined in the config.h ?
> That's what turns on this definition..
> Jeremy.

HAVE_READLINE_READLINE_H  are not defined.
Comment 3 Jeremy Allison 2011-04-05 23:31:20 UTC
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.
AC_CHECK_LIB(readline, rl_completion_matches,
                        [Do we have rl_completion_matches?])],

isn't enough. Needs to explicitly check for the rl_completion_func_t type as well.