Currently the eclass mysql-cmake disables readline support by adding "-DWITHOUT_READLINE=1" to the cmake arguments. It would be better to change the eclass to enable this using a USE-flag. The attached patch changes the eclass(es) accordingly.
Created attachment 323384 [details, diff] mysql-eclass.patch
MySQL's definition of WITHOUT_READLINE means use the system over the bundled readline. It is rather contradictory to the traditional use of with/without. WITHOUT_READLINE = use system readline WITH_READLINE = use bundled readline This bug is INVALID IMO.
Hmm, I justed looked at the source of mysql 5.5.22 and you are right. But I only get working readline support when using the bundled one. I verified that I have readline installed (not libedit). I need to investigate this further....
Ok, it looks like "-DWITHOUT_READLINE=1" is not valid. At first I figured out that this would cause the bundled libedit to be used. So I changed it to "-DWITHOUT_READLINE=1 -DWITHOUT_LIBEDIT=1". But that didn't do the trick either. So I changed it to "-DWITH_READLINE=0 -DWITH_LIBEDIT=0" and finally I get the following lines in the log: -- Performing Test readline_HAVE_HIST_ENTRY -- Performing Test readline_HAVE_HIST_ENTRY - Failed -- Performing Test readline_USE_LIBEDIT_INTERFACE -- Performing Test readline_USE_LIBEDIT_INTERFACE - Failed -- Performing Test readline_USE_NEW_READLINE_INTERFACE -- Performing Test readline_USE_NEW_READLINE_INTERFACE - Success So my tests tell me that we need to replace "-DWITHOUT_READLINE=1" by "-DWITH_READLINE=0 -DWITH_LIBEDIT=0" to actually build against the system readline.
(In reply to comment #4) > Ok, it looks like "-DWITHOUT_READLINE=1" is not valid. > > At first I figured out that this would cause the bundled libedit to be used. > So I changed it to "-DWITHOUT_READLINE=1 -DWITHOUT_LIBEDIT=1". > > But that didn't do the trick either. So I changed it to "-DWITH_READLINE=0 > -DWITH_LIBEDIT=0" and finally I get the following lines in the log: > > -- Performing Test readline_HAVE_HIST_ENTRY > -- Performing Test readline_HAVE_HIST_ENTRY - Failed > -- Performing Test readline_USE_LIBEDIT_INTERFACE > -- Performing Test readline_USE_LIBEDIT_INTERFACE - Failed > -- Performing Test readline_USE_NEW_READLINE_INTERFACE > -- Performing Test readline_USE_NEW_READLINE_INTERFACE - Success > > So my tests tell me that we need to replace "-DWITHOUT_READLINE=1" by > "-DWITH_READLINE=0 -DWITH_LIBEDIT=0" to actually build against the system > readline. Verified as described. MariaDB does not have this issue because they reworked cmake/readline.cmake. MySQL has a small bug in the macro file that defaults HAVE_LIBEDIT to on. This configure suggestion seems to be the best option. It should appear in the overlay soon.
FWIW, I came here with the same problem, tried rebuilding with the patches attached to this bug, worked great.
InCVS.