Bug #22508 BUILD/compile-dist fails due to problem with readline/libedit
Submitted: 20 Sep 2006 7:14 Modified: 26 Apr 2007 16:53
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.1 OS:Linux (FC5)
Assigned to: Magnus Blåudd CPU Architecture:Any

[20 Sep 2006 7:14] Magnus Blåudd
Description:
[msvensson@shellback my51-bug19738]$ BUILD/compile-dist
<snip>
Making all in client
make[2]: Entering directory `/home/msvensson/mysql/bug19738/my51-bug19738/client'
if ccache gcc -DUNDEF_THREADS_HACK -DDEFAULT_MYSQL_HOME="\"/usr/local\"" -DDATADIR="\"/usr/local/var\""  -I. -I. -I.. -I../include -I../include -I../regex     -felide-constructors -fno-exceptions -fno-rtti   -fno-implicit-templates -fno-exceptions -fno-rtti  -MT mysql.o -MD -MP -MF ".deps/mysql.Tpo" -c -o mysql.o mysql.cc; \
then mv -f ".deps/mysql.Tpo" ".deps/mysql.Po"; else rm -f ".deps/mysql.Tpo"; exit 1; fi
mysql.cc:319: error: expected constructor, destructor, or type conversion before ‘*’ token
mysql.cc: In function ‘int not_in_history(const char*)’:
mysql.cc:1440: error: ‘HIST_ENTRY’ was not declared in this scope
mysql.cc:1440: error: ‘oldhist’ was not declared in this scope
mysql.cc:1440: error: ‘history_get’ was not declared in this scope
mysql.cc: In function ‘void initialize_readline(char*)’:
mysql.cc:1462: error: invalid conversion from ‘char** (*)()’ to ‘char** (*)(const char*, int, int)’
mysql.cc:1463: error: invalid conversion from ‘int (*)()’ to ‘char* (*)(const char*, int)’
mysql.cc: In function ‘char** new_mysql_completion(const char*, int, int)’:
mysql.cc:1485: error: ‘completion_matches’ was not declared in this scope
make[2]: *** [mysql.o] Error 1
make[2]: Leaving directory `/home/msvensson/mysql/bug19738/my51-bug19738/client'make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/msvensson/mysql/bug19738/my51-bug19738'
make: *** [all] Error 2

How to repeat:
Use BUILD/compile-dist
[20 Sep 2006 9:56] Magnus Blåudd
I think this occurs when switching between compiling with BUILD/compile-pentium-debug(which specifically specifies that readline should be used) and BUILD/compile-dist(which uses the default from configure). Most likely the symlink "include/readline" is not rebuilt and thus this error occurs.
[20 Sep 2006 13:07] Magnus Blåudd
Can't repeat it anymore. :(
[27 Mar 2007 21:56] 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/commits/23082

ChangeSet@1.2427, 2007-03-27 23:56:48+02:00, msvensson@pilot.blaudden +11 -0
  Bug#22508 BUILD/compile-dist fails due to problem with readline/libedit
   - Move the link_sources command from top level Makefile into each subdir
     that need to link files
[26 Apr 2007 11:35] Bugs System
Pushed into 5.1.18-beta
[26 Apr 2007 16:53] Paul DuBois
No changelog entry needed.