3

I followed the first answer to this question.

 sudo apt-get install build-essential
 wget http://www.cmake.org/files/v3.2/cmake-3.5.0-rc2.tar.gz
 tar xf cmake-3.5.0-rc2.tar.gz
 cd cmake-3.5.0-rc2
 ./configure
 make
 sudo apt-get install checkinstall
 sudo checkinstall

And this worked but ccmake was not installed. While googling I couldn't find how to add to the build/install cmake-curses-gui too.

3 Answers 3

3

I found an answer:

https://stackoverflow.com/questions/28110169/update-ccmake-on-ubuntu-when-building-from-source

  1. Install libncurses5-dev
  2. Reconfigure/compile/install cmake
  3. Restart the shell (initially it was available, but the shell couldn't find it)
0

Solution (2018-12-07):

This doesn't work out of the box for me on Ubuntu 18.04 but the libncurses5-dev is a prerequisite library.

As said on SO there; I fixed it by running cmake-gui (the one previously installed without ccmake) in the sources directory of cmake itself (sounds strange but worked like a charm).

Then, I looked for BUILD_CursesDialog (as suggested in this thread [1]) in cmake-gui.
This option wasn't checked, so I checked it.
Click configure & generate.
Close cmake-gui.
Then run make -j4 & $ sudo checkinstall (I previously used $ sudo dpkg -r cmake to properly remove cmake).

[1] https://cmake.org/pipermail/cmake/2011-November/047657.html

Checks:

$ which cmake
/usr/local/bin/cmake

$ which cmake-gui
/usr/local/bin/cmake-gui

$ which ccmake
/usr/local/bin/ccmake

$ cmake --version
cmake version 3.13.20181205-gf92e9

$ cmake-gui --version
ccmake-gui version 3.13.20181205-gf92e9

$ ccmake --version
ccmake version 3.13.20181205-gf92e9
0

cmake's bootstrap script generates a Makefile that will also build ccmake if (as s.k. points out) the boolean variable BUILD_CursesDialog is set.

To decide the truth value of BUILD_CursesDialog, the bootstrap script tries compiling a simple ncurses program. If the compilation of the ncurses program fails, the BUILD_CursesDialog variable is unset. If libncurses5-dev is installed, the ncurses program builds and thus, the Makefile generated for cmake upon bootstrap also has instructions to build ccmake.

With this understanding of the current build process, the sequence of steps listed by augre are to be followed. Additionally, remember to also clean any temporary build files first (coming from a similar experience, I believe this is what s.k. did not do, and found an admirable :) hack to work around).

Thus, for me, running off git, the process is:

  • git clean -f -d

Replicate augre's solution:

  • install libncurses5-dev
  • Reconfigure/compile/install cmake
  • Potentially restart terminal

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .