Bug #8162 MySQL cannot be compiled without readline
Submitted: 27 Jan 2005 13:57 Modified: 28 Apr 2005 2:31
Reporter: Aleksey Kishkin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.9 OS:Linux (Linux sparc alfa)
Assigned to: Magnus Blåudd CPU Architecture:Any

[27 Jan 2005 13:57] Aleksey Kishkin
Description:
Hi! Even if I set --without-readline  for configure, ndb tries to link readline. And if readline is not installed, compilations fails..

How to repeat:
on alfa:
./configure --build=alpha-linux --host=alpha-linux --prefix=/usr         --exec-prefix=/usr         --libexecdir=/usr/sbin         --datadir=/usr/share         --sysconfdir=/etc/mysql         --localstatedir=/var/lib/mysql         --includedir=/usr/include         --infodir=/usr/share/info         --mandir=/usr/share/man --with-server-suffix=-Debian_4 --enable-shared --enable-static --enable-thread-safe-client          --enable-local-infile --with-raid --with-unix-socket-path=/var/run/mysqld/mysqld.sock        --with-mysqld-user=mysql --with-libwrap --with-client-ldflags=-lstdc++ --with-vio --without-openssl     --without-docs --without-bench --without-readline --with-extra-charsets=all --with-berkeley-db --with-innodb --with-mysqlfs --with-isam --with-archive-storage-engine --with-csv-storage-engine --without-embedded-server --with-ndbcluster --with-ndb-shm --without-ndb-sci --without-ndb-test --with-ndb-docs

(please notice --without-readline)
leads

............
g++ -DHAVE_CONFIG_H -DNDEBUG   -I. -I. -I../../..  -I. -I../../../include -I../../../ndb/include -I../../../ndb/include/kernel -I../../../ndb/include/transporter -I../../../ndb/include/debugger -I../../../ndb/include/mgmapi -I../../../ndb/include/mgmcommon -I../../../ndb/include/ndbapi -I../../../ndb/include/util -I../../../ndb/include/portlib -I../../../ndb/include/logger -I../../../ndb/include/mgmapi -I../../../ndb/src/common/mgmcommon    -O3 -DDBUG_OFF    -fno-implicit-templates -fno-exceptions -fno-rtti   -c -o main.o main.cpp
main.cpp: In function `int read_and_execute(int)':
main.cpp:129: passing `const char *' as argument 1 of `readline(char *)' discards qualifiers
make[4]: *** [main.o] Error 1
make[4]: Leaving directory `/home/akishkin/mysql-4.1.9/ndb/src/mgmclient'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/akishkin/mysql-4.1.9/ndb/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/akishkin/mysql-4.1.9/ndb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/akishkin/mysql-4.1.9'
make: *** [all] Error 2

on sparc:

 ./configure --build=sparc-linux --host=sparc-linux --prefix=/usr         --exec-prefix=/usr         --libexecdir=/usr/sbin         --datadir=/usr/share         --sysconfdir=/etc/mysql         --localstatedir=/var/lib/mysql         --includedir=/usr/include         --infodir=/usr/share/info         --mandir=/usr/share/man --with-server-suffix="-Debian_4" --enable-shared --enable-static --enable-thread-safe-client         --enable-assembler  --enable-local-infile --with-raid --with-unix-socket-path=/var/run/mysqld/mysqld.sock        --with-mysqld-user=mysql --with-libwrap --with-client-ldflags=-lstdc++ --with-vio --without-openssl     --without-docs --without-bench --without-readline --with-extra-charsets=all --with-berkeley-db --with-innodb --with-mysqlfs --with-isam --with-archive-storage-engine --with-csv-storage-engine --without-embedded-server --with-ndbcluster --with-ndb-shm --without-ndb-sci --without-ndb-test --with-ndb-docs

(please notice --wiyhout-readline)
leads:

g++ -DHAVE_CONFIG_H -DNDEBUG   -I. -I. -I../../..  -I. -I../../../include -I../../../ndb/include -I../../../ndb/include/kernel -I../../../ndb/include/transporter -I../../../ndb/include/debugger -I../../../ndb/include/mgmapi -I../../../ndb/include/mgmcommon -I../../../ndb/include/ndbapi -I../../../ndb/include/util -I../../../ndb/include/portlib -I../../../ndb/include/logger -I../../../ndb/include/mgmapi -I../../../ndb/src/common/mgmcommon    -O3 -DDBUG_OFF    -fno-implicit-templates -fno-exceptions -fno-rtti   -c -o main.o main.cpp
main.cpp:25: readline/readline.h: No such file or directory
make[4]: *** [main.o] Error 1
make[4]: Leaving directory `/users/akishkin/bk/mysql-4.1.9/ndb/src/mgmclient'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/users/akishkin/bk/mysql-4.1.9/ndb/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/users/akishkin/bk/mysql-4.1.9/ndb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/users/akishkin/bk/mysql-4.1.9'
make: *** [all] Error 2
[28 Jan 2005 7:40] Tomas Ulin
I don't have the access rights as mysqldev... so I cannot compile
[2 Feb 2005 17:17] Aleksey Kishkin
that computers both are NIS based. so you can login with your account.
I am setting directories readable/writeable for your
[4 Feb 2005 16:21] Tomas Ulin
You get that whatever you compile in the mysql tree.  It is not ndb specific.

I think with out without readline just means whether to use "mysql's" readline or not...

It is not possible to compile without readline...

tulin@bitch:/users/akishkin/bk/mysql-4.1.9$ make -C client/
make: Entering directory `/users/akishkin/bk/mysql-4.1.9/client'
source='mysql.cc' object='mysql.o' libtool=no \
depfile='.deps/mysql.Po' tmpdepfile='.deps/mysql.TPo' \
depmode=gcc /bin/sh ../depcomp \
g++ -DUNDEF_THREADS_HACK -I. -I. -I.. -I../include -I../regex     -O3 -DDBUG_OFF    -fno-implicit-templates -fno-exceptions -fno-rtti  -c -o mysql.o mysql.cc
mysql.cc:87: readline/readline.h: No such file or directory
make: *** [mysql.o] Error 1
make: Leaving directory `/users/akishkin/bk/mysql-4.1.9/client'
[4 Feb 2005 20:48] Sergei Golubchik
I would not call it a bug.
Reopening with corrected synopsis
[4 Feb 2005 20:48] Sergei Golubchik
ehh, would not call it "not a bug" sorry
[27 Apr 2005 9:19] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/24353
[27 Apr 2005 10:15] Magnus Blåudd
If you want to use readline but configure does not find the header files <readline/readline.h>, the path to the headerfile can be added to CFLAGS and CXXFLAGS. For example if the header files are in /usr/local/include set CFLAGS="-I/usr/local/include" and CXXFLAGS="-I/usr/local/include". If the linking stage does not find the readline lib set LDFLAGS="-L/usr/local/lib"
[27 Apr 2005 19:56] Magnus Blåudd
configure will display error message if it can't find system readline
Pushed to 4.1.12 and 5.0.6
[28 Apr 2005 2:31] Paul DuBois
No changelog note needed.