Thanks anikitin, that helped to pin it down.
It is a user mistake, strictly speaking. To repeat this error one need to start without libncurses5-dev installed. Run cmake. It will fail with the message
Curses library not found. Please install appropriate package, remove CMakeCache.txt and rerun cmake.
|
On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
|
Now, install the appropriate package, ignore the help text and DO NOT remove CMakeCache.txt, and re-run cmake. This way you will end up with part of the configuration being done without curses and the other part — with curses. CMakeCache.txt will be inconsistent and the compilation will fail.
Remember that CMake works incrementally, it does not re-run checks that were already run and stored in the CMakeCache.txt.
Having said that, I seem to have fixed this particular issue. Still, in the future, if you change you system configuration, it's always safer to remove CMakeCache.txt file before re-running cmake.
Just finished compiling 10.1.9 and this error is not present in that version.