Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434552 - mysql-cmake.eclass should not disable readline support
Summary: mysql-cmake.eclass should not disable readline support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-09-10 09:01 UTC by Christoph Brill (egore) (RESIGNED)
Modified: 2013-01-20 02:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mysql-eclass.patch (mysql-eclass.patch,1.07 KB, patch)
2012-09-10 09:02 UTC, Christoph Brill (egore) (RESIGNED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Brill (egore) (RESIGNED) 2012-09-10 09:01:43 UTC
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.
Comment 1 Christoph Brill (egore) (RESIGNED) 2012-09-10 09:02:05 UTC
Created attachment 323384 [details, diff]
mysql-eclass.patch
Comment 2 Brian Evans (RETIRED) gentoo-dev 2012-09-10 12:43:00 UTC
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.
Comment 3 Christoph Brill (egore) (RESIGNED) 2012-09-10 13:34:55 UTC
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....
Comment 4 Christoph Brill (egore) (RESIGNED) 2012-09-10 13:54:49 UTC
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.
Comment 5 Brian Evans (RETIRED) gentoo-dev 2012-09-10 15:26:43 UTC
(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.
Comment 6 Hank Leininger 2012-11-30 02:50:27 UTC
FWIW, I came here with the same problem, tried rebuilding with the patches attached to this bug, worked great.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-01-20 02:25:33 UTC
InCVS.