ccmake using cmake version 3.10 - cmake

I am trying to install the new ITK version which needs a cmake version higher than 3.9
I have just download the cmake 3.10 version.
and when I install it there is no ccmake in the bin folder. usually the new ccmake version is here.
when I want to install ccmake using apt it links it to the 3.5 cmake version.
How can I do to have a ccmake version linked to the 3.10 version of cmake ?

Turning my comment into an answer
You can use the following tutorial to build and install the latest CMake version: How do I install the latest version of cmake from the command line?
But - as for the time of your question - it was lacking the hint to install the curses library/headers first (see here,
you don't get ccmake built and installed without it ). So I had the same problem on my Ubuntu and was able to install and rebuild it with the following steps:
# sudo apt-get install libncurses-dev
# cd ~/temp/cmake-3.10.2
# cmake .
...
# make -j8
...
# sudo make install
...
# ccmake
Usage
ccmake <path-to-source>
ccmake <path-to-existing-build>
Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.
Run 'ccmake --help' for more information.

The binary ccmake is a target of the make file.
To get all, perform:
./configure
make all
sudo make install
To just get ccmake, perform:
make ccmake

Related

cmake installation on aix installed but command not found

i installed cmake on my AIX 7.2
bash-3.2# yum install cmake
Setting up Install Process
Package cmake-3.16.0-2.ppc already installed and latest version
Nothing to do
bash-3.2#
but running it .
bash-3.2$ cmake
bash: cmake: command not found
there is also no folder for cmake in /opt/bin directory
The RPM's on AIX likely install software to /opt/freeware so you probably need /opt/freeware/bin in your PATH to casually use "cmake" on the command line.
You can verify the paths installed by a package with e.g.
rpm -ql cmake|grep bin/

How to install cmake-gui latest version on Ubuntu

When installing from package-manager, cmake-gui or cmake-qt-gui are shipped with an older version of cmake.
Even after I build and install cmake's latest version from source, cmake-gui continues to use the older version.
How to force cmake-gui to use cmake latest version builded from source?
The cmake-gui package from repository has a built-in cmake, those two have the same version.
Steps to install cmake-gui latest version.
Install checkinstall to easily remove cmake in the future: sudo apt-get install checkinstall;
Download latest cmake from official site;
Extract the compressed file to some folder;
Open a terminal inside that folder;
Execute: ./bootstrap --qt-gui;
Execute: checkinstall -D make install; You will be prompted with some questions, answer them;
Finished installation! Type cmake at Ubuntu's search bar and you will see a CMake icon;
Verify the version clicking at help >> about;
An alternative to the above.
Check if you have an old version of cmake with cmake --version. If so, remove it with sudo apt-get purge cmake
Download latest cmake from official site
Extract the downloaded cmake-x.xx.x file to your Desktop and then open a terminal inside that file.
Execute: ./bootstrap --qt-gui
After finished, run gmake as prompted.
Move cmake-x.xx.x file to /opt/ directory by going up to your Desktop with the terminal and then running sudo mv cmake-x.xx.x /opt/
Declare cmake binary as global by writing export PATH=/opt/cmake-x.xx.x/bin:$PATH in your ~.bashrc file.
Source with source .bashrc
You will then be able to open cmake or cmake-gui with your terminal from any path in your computer.

Running CMake on Amazon Linux

I am trying to build OpenJpeg on an AWS Amazon Linux EC2 instance. I installed cmake and gcc and had no issues during installation. When I try to cmake openjpeg I get the following error:
-- Check if the system is big endian
-- Searching 16 bit integer
CMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:44 (message):
no suitable type found
Call Stack (most recent call first):
CMakeLists.txt:164 (TEST_BIG_ENDIAN)
-- Configuring incomplete, errors occurred!
Checking the error logs it seems CMake is unable to determine the size of integers, shorts and longs. The full error log can be found in this gist
How can I work this out and make CMake work?
Amazon has a guide: Preparing to Compile Software, which proposes the following command to install a C compiler.
sudo yum groupinstall "Development Tools"
Next, you can download and build Cmake yourself: Install Cmake 3.
wget https://cmake.org/files/v3.18/cmake-3.18.0.tar.gz
tar -xvzf cmake-3.18.0.tar.gz
cd cmake-3.18.0
./bootstrap
make
sudo make install
Note: the last make actually needs sudo.
This works in the most recent Amazon Linux image (Nov 2021):
# Install sudo, wget and openssl, which is required for building CMake
yum install sudo wget openssl-devel -y
# Install development tools
sudo yum groupinstall "Development Tools" -y
# Download, build and install cmake
wget https://cmake.org/files/v3.18/cmake-3.18.0.tar.gz
tar -xvzf cmake-3.18.0.tar.gz
cd cmake-3.18.0
./bootstrap
make
sudo make install
Though this does not actually answer why the error was happening but I was able to build OpenJpeg by building CMake from source. So I just removed Cmake which was installed via yum and I believe was 2.8.12. Downloaded the latest CMake3 sources (v 3.10) built Cmake and openjpeg and all my other packages with no issues.
You could try to set up a Docker container to replicate correct environment. This way, you could form a container on your local machine, make sure it all builds on the container environment, and later use this environment on the EC2.
There is a project on Github that provides a Docker image which can be used to compile for Lambda and test stuff locally. Have a look: https://github.com/lambci/docker-lambda

CMake v3.4.1 finds CUDA 7.5 instead of CUDA 8.0 on Ubuntu 16.04

I am trying to install the GPU support for XGBoost but I get the following error when I try to build it with CMake:
CMake Error at /usr/local/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find CUDA: Found unsuitable version "7.5", but required is at
least "8.0" (found /usr)
I only installed CUDA 8.0 and the environmental variables in .bashrc are specified as:
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
How can I have CMake detect the right CUDA version?
PATH and LD_LIBRARY_PATH have no effect on cmake, so what you have tried will not work.
If you look at the documentation for find_package it is possible to provide a PATHS argument to tell cmake to look in non-standard locations
Unfortunately, if you look at the source for XGBoost's CMakeLists.txt, you can see it calls find_package(CUDA ...), but doesn't allow the user to provide a PATHS option
if(USE_CUDA)
find_package(CUDA 8.0 REQUIRED)
...
endif()
As such you are left with 2 options:
Edit XGBoost's CMakeLists.txt file, and add PATHS /usr/local/cuda-8.0 to the find_package call
Install cuda-8.0 into a standard location (eg: use /usr/local as your PREFIX, not /usr/local/cuda-8.0)
I ran into a similar issue when trying to install the R version with GPU support. The issue was that I was running the commands from their install guide:
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
cd R-package
R CMD INSTALL .
and then running the commands for GPU support:
mkdir build
cd build
cmake .. -DUSE_CUDA=ON -DR_LIB=ON
I was able to avoid the issue by running:
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
mkdir build
cd build
cmake .. -DUSE_CUDA=ON -DR_LIB=ON
make install -j

installation of cmake on debian 8

I tried to install mcsema on my debian linux but I am stopped by error
Cmake 3.1 or higher is required. You are running 3.0.2. On debian this is the only version could be installed by apt-get install. Building CMake from sources, I get several errors as well. Does anyone know how to install the latest version of Cmake on Debian 8?
Download latests cmake release and follow the README.rst instructions:
UNIX/Mac OSX/MinGW/MSYS/Cygwin ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You need to have a compiler and a make installed. Run the
bootstrap script you find in the source directory of CMake. You
can use the --help option to see the supported options. You may
use the --prefix=<install_prefix> option to specify a custom
installation directory for CMake. You can run the bootstrap script
from within the CMake source directory or any other build directory of
your choice. Once this has finished successfully, run make and
make install. In summary::
$ ./bootstrap && make && make install