Bug #4728 mysql couldn't be compiled using system readline (readline-4.3)
Submitted: 23 Jul 2004 18:29 Modified: 24 Aug 2004 18:18
Reporter: Sergey Kostyliov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.1.4 (bk snapshot from 20040718) OS:Linux (Linux (Gentoo v2004.1))
Assigned to: Bugs System CPU Architecture:Any

[23 Jul 2004 18:29] Sergey Kostyliov
Description:
mysql-4.1.X couldn't be compiled using system readline. 
 
rathamahata@dev mysql-4.1.4-20040718-gcc-3.4.1 $ grep VERSION 
-r /usr/include/readline/ 
/usr/include/readline/readline.h:#define RL_READLINE_VERSION    0x0403          /* 
Readline 4.3 */ 
/usr/include/readline/readline.h:#define RL_VERSION_MAJOR       4 
/usr/include/readline/readline.h:#define RL_VERSION_MINOR       3 
rathamahata@dev mysql-4.1.4-20040718-gcc-3.4.1 $ 
 
mysql-4.0.X is fine. 

How to repeat:
CC=/var/tmp/gcc/bin/gcc \ 
CXX=/var/tmp/gcc/bin/gcc \ 
CFLAGS="-g -pipe -D_GNU_SOURCE" \ 
CXXLDFLAGS="-Wl,--defsym -Wl,__cxa_pure_virtual=0" \ 
CXXFLAGS="-g -pipe -felide-constructors -fno-exceptions -fno-rtti 
-DUSE_MYSYS_NEW -D_GNU_SOURCE" \ 
./configure  --build=i686-pc-linux-gnu \ 
--prefix=/usr \ 
--localstatedir=/var/lib/mysql/3 \ 
--enable-assembler \ 
--with-mysql-user=mysql \ 
--with-innodb \ 
--without-readline \ 
--without-libedit \ 
--with-unix-socket-path=/var/lib/mysql/mysql.sock \ 
--with-extra-charsets=latin1,koi8r,cp1251,utf8 \ 
--without-ndbcluster \ 
--with-named-thread-libs=-lpthread \ 
--enable-thread-safe-client \ 
--with-debug=full 
 
 
make failed with: 
 
/var/tmp/gcc/bin/gcc -DUNDEF_THREADS_HACK -I. -I. -I.. -I../include     -g 
-DSAFE_MUTEX -DSAFEMALLOC -g -pipe -felide-constructors -fno-exceptions -fno-rtti 
-DUSE_MYSYS_NEW -D_GNU_SOURCE   -fno-implicit-templates -fno-exceptions 
-fno-rtti -c -o mysql.o `test -f mysql.cc || echo './'`mysql.cc 
mysql.cc:307: error: expected constructor, destructor, or type conversion before '*' 
token 
mysql.cc:307: error: expected `,' or `;' before '*' token 
mysql.cc: In function `int not_in_history(const char*)': 
mysql.cc:1269: error: `HIST_ENTRY' undeclared (first use this function) 
mysql.cc:1269: error: (Each undeclared identifier is reported only once for each 
function it appears in.) 
mysql.cc:1269: error: `oldhist' undeclared (first use this function) 
mysql.cc:1269: error: `history_get' undeclared (first use this function) 
make[2]: *** [mysql.o] Error 1 
make[2]: Leaving directory `/var/tmp/mysql-4.1.4-20040718-gcc-3.4.1/client' 
make[1]: *** [all-recursive] Error 1 
make[1]: Leaving directory `/var/tmp/mysql-4.1.4-20040718-gcc-3.4.1' 
make: *** [all] Error 2 
 

Suggested fix:
[23 Jul 2004 20:20] Sergey Kostyliov
This is obviously a compile issue. Category has been accordingly.
[23 Jul 2004 20:36] Sergey Kostyliov
Oops, I believe this is a duplicate of bug#3937 
http://bugs.mysql.com/bug.php?id=3937
[24 Aug 2004 14:55] Victor Vagin
bk commit into 4.1 tree (vva:1.1963)

ChangeSet
  1.1963 04/08/24 19:23:23 vva@eagle.mysql.r18.ru +4 -0
  fixed :
  Bug #3937     fails to compile with both gcc 3.3.3/icc8
  Bug #4728     mysql couldn't be compiled using system readline (readline-4.3)
[24 Aug 2004 18:18] Victor Vagin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

The fix will be in the mysql-4.1.4