On Wed, 2011-11-09 at 02:50 +0100, Vladislav Vaintroub wrote:
Oh, this is libedit vs readline. It is the most complicated stuff in current cmake setup (cmake/readline.cmake), that unfortunately got ported 1-1 from autotools, and the code in autotools was already bad originally and it has not got prettier with CMake , and it was my very first CMake code , and it remained as ugly as it was at the start.
But to the problem
There are different possibilities to use system readline, system libedit, bundled readline, bundled libedit , the default is bundled libedit (frankly I've got no clue why we or MySQL have a choice of 2 almost equivalent libs, but anyway)
The cmake flags that enable one or another are -DWITH_READLINE={1,0} -DWITH_LIBEDIT={1,0}
If none is set (equivalent to both are 0), system library is searched, with readline preference, and libedit backoff. I have to admit , I do not understand the logic in cmake/readline.cmake fully, so this is also from my memory mostly. One of those libs should be new otherwise there are problems with header files, and HIST_ENTRY might well be this problem.
What you can definitely do right now, is to remove CMakeCache.txt and rerun cmake <path-to-source> -DWITH_LIBEDIT=0 -DWITH_READLINE=0
That did not work, cmake died with: CMake Error at cmake/readline.cmake:223 (MESSAGE): Cannot find system readline or libedit libraries.Use WITH_READLINE or WITH_LIBEDIT
If that fails, try the cmake <path-to-source> -DWITH_LIBEDIT=0 -DWITH_READLINE=1 .
This one did work.
Once we find the variant that works on HPUX, I'd prefer to hardcode that in cmake/os/HP-UX.cmake (if memory serves me right, only readline is workable on HPUX, not libedit, but it has been some time since I have compiled 5.5 on HPUX )
It looks like READLINE is the way to go. And with this change added to the earlier ones I got the build to complete with no errors. I haven't tried running the test suite yet, but I will do that next. This build was done with GCC, I want to also try building with the HP compiler to see how that works. Steve Ellcey sje@cup.hp.com