11

I'm trying to build 5.6.4-labs-innodb-memcached, but having this issue:

# cmake ./
-- MySQL 5.6.4-labs-innodb-memcached
-- Could NOT find Curses (missing:  CURSES_LIBRARY CURSES_INCLUDE_PATH) 
CMake Error at cmake/readline.cmake:83 (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.
Call Stack (most recent call first):
cmake/readline.cmake:127 (FIND_CURSES)
cmake/readline.cmake:217 (MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:263 (MYSQL_CHECK_READLINE)


-- Configuring incomplete, errors occurred!

libncurses5-dev is installed and CURSES_USE_NCURSES=true is set, but it doesn't help. Any ideas? I have already compiled this package, but it was on the other machine...

EDITED:

/var/cache/apt/archives/libncurses5-dev_5.7+20101128-1_i386.deb
/var/lib/dpkg/info/libncurses5.postinst
/var/lib/dpkg/info/libncursesw5.list
/var/lib/dpkg/info/ncurses-base.preinst
/var/lib/dpkg/info/libncursesw5.postrm
/var/lib/dpkg/info/libncursesw5.shlibs
/var/lib/dpkg/info/libncursesw5.md5sums
/var/lib/dpkg/info/libncurses5.symbols
/var/lib/dpkg/info/ncurses-bin.preinst
/var/lib/dpkg/info/ncurses-bin.list
/var/lib/dpkg/info/libncurses5-dev.list
/var/lib/dpkg/info/libncursesw5.symbols
/var/lib/dpkg/info/libncursesw5.postinst
/var/lib/dpkg/info/libncurses5-dev.md5sums
/var/lib/dpkg/info/ncurses-base.conffiles
/var/lib/dpkg/info/libncurses5.shlibs
/var/lib/dpkg/info/ncurses-base.list
/var/lib/dpkg/info/ncurses-bin.md5sums
/var/lib/dpkg/info/libncurses5.md5sums
/var/lib/dpkg/info/libncurses5.list
/var/lib/dpkg/info/libncurses5.postrm
/var/lib/dpkg/info/ncurses-base.md5sums
/tmp/curses
/usr/include/cursesf.h
/usr/include/curses.h
/usr/include/cursesw.h
/usr/include/cursesp.h
/usr/include/ncurses_dll.h
/usr/include/ncurses.h
/usr/include/cursesm.h
/usr/include/cursesapp.h
/usr/share/lintian/overrides/ncurses-bin
/usr/share/lintian/overrides/ncurses-base
/usr/share/man/man1/ncursesw5-config.1.gz
/usr/share/man/man1/ncurses5-config.1.gz
/usr/share/doc/libncurses5
/usr/share/doc/libncurses5/TODO.Debian
/usr/share/doc/libncurses5/copyright
/usr/share/doc/libncurses5/FAQ
/usr/share/doc/libncurses5/changelog.Debian.gz
/usr/share/doc/ncurses-bin
/usr/share/doc/ncurses-bin/copyright
/usr/share/doc/ncurses-bin/changelog.Debian.gz
/usr/share/doc/libncurses5-dev
/usr/share/doc/libncurses5-dev/copyright
/usr/share/doc/libncurses5-dev/changelog.Debian.gz
/usr/share/doc/libncursesw5
/usr/share/doc/libncursesw5/copyright
/usr/share/doc/libncursesw5/changelog.Debian.gz
/usr/share/doc/ncurses-base
/usr/share/doc/ncurses-base/copyright
/usr/share/doc/ncurses-base/changelog.Debian.gz
/usr/bin/ncurses5-config
/usr/bin/aptitude-curses
/usr/bin/ncursesw5-config
/usr/lib/libncurses++.a
/usr/lib/libncurses.so
/usr/lib/libncurses.a
/usr/lib/libcurses.so
/usr/lib/libcurses.a
/usr/lib/python2.7/curses
/usr/lib/python2.7/curses/textpad.pyc
/usr/lib/python2.7/curses/has_key.pyc
/usr/lib/python2.7/curses/wrapper.py
/usr/lib/python2.7/curses/ascii.py
/usr/lib/python2.7/curses/panel.pyc
/usr/lib/python2.7/curses/has_key.py
/usr/lib/python2.7/curses/__init__.py
/usr/lib/python2.7/curses/textpad.py
/usr/lib/python2.7/curses/panel.py
/usr/lib/python2.7/curses/__init__.pyc
/usr/lib/python2.7/curses/wrapper.pyc
/usr/lib/python2.7/curses/ascii.pyc
/usr/lib/python2.7/lib-dynload/_curses.so
/usr/lib/python2.7/lib-dynload/_curses_panel.so
/lib/libncursesw.so.5.7
/lib/libncurses.so.5
/lib/libncursesw.so.5
/lib/libncurses.so.5.7
Roman Newaza
  • 11,405
  • 11
  • 58
  • 89
  • what do you mean, "it was on the other machine?" -- why aren't you building everything on the same machine? – DLRdave Dec 02 '11 at 02:43

7 Answers7

19

The error may be from cache file.

Delete CMakeCache.txt, then try again.

arrowd
  • 33,231
  • 8
  • 79
  • 110
Tony Lee
  • 301
  • 4
  • 10
15

I do not know why is it failing, but you can use error message "missing ..." and set what is missing manually. I.e

cmake -DCURSES_LIBRARY=/usr/lib/libncurses.so -DCURSES_INCLUDE_PATH=/usr/include .

should fix it.

arrowd
  • 33,231
  • 8
  • 79
  • 110
Vladislav Vaintroub
  • 5,308
  • 25
  • 31
11

Perhaps you need additional ncurses files.

sudo yum install ncurses-devel 

Then delete CMakeCache.txt

Try again to run CMake. This worked for me.

arcdegree
  • 2,710
  • 3
  • 27
  • 38
8

sudo aptitude install libncurses-dev in Debian.

LCB
  • 971
  • 9
  • 22
7

For some reason, CMake can't find includes and libraries. Help it by running cmake -D CMAKE_PREFIX_PATH=/path/to/curses/prefix .

arrowd
  • 33,231
  • 8
  • 79
  • 110
  • What path should I point it to? I have added to my post all the files and directories related to curses on my machine – Roman Newaza Nov 19 '11 at 08:45
  • Hmm, strange. Well, try CMAKE_PREFIX_PATH=/usr. If it will not work, try to set CURSES_LIBRARY and CURSES_INCLUDE_PATH manually. – arrowd Nov 19 '11 at 08:57
  • CMAKE_PREFIX_PATH=/usr doesn't help. do I set CURSES_LIBRARY and CURSES_INCLUDE_PATH in shell? – Roman Newaza Nov 19 '11 at 09:06
  • No, in the same manner as the CMAKE_PREFIX_PATH - using -D flag in cmake command invocation. – arrowd Nov 19 '11 at 09:07
  • For path to CURSES_INCLUDE_PATH try `whereis curses` For path to CURSES_LIBRARY try `find /usr/lib | grep curses.*\.so$` – Lori Jul 11 '14 at 23:15
2

I had the same problem, Deleting the cache file worked for me.

2

This one works for me

  1. locate libncurses.so

  2. cmake -DCURSES_LIBRARY=/PATH OF THE LOCATE RESULT CURSES_INCLUDE_PATH=/usr/include

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
Hamdi Charef
  • 639
  • 2
  • 12
  • 19