cmake 3.12 version installation on RHEL 7 - cmake

I had cmake 3.9 version on my RHEL 7.6 system. But for some development work, i need 3.12 version.
I downloaded the https://cmake.org/files/v3.12/cmake-3.12.2.tar.gz. Untarred the tar file and
Executed the commands trying to install it. But I am getting errors in each of the below case.
Can anyone please let me know if you have any idea to fix it and get the latest version?
1st trial
./bootstrap --prefix=$HOME
make;make install
CMake Error at cmake_install.cmake:82 (file):
file failed to open for writing (Permission denied):
/workspace/poomanju/_cmake_build/cmake-3.12.2/install_manifest.txt
2nd trial
./bootstrap
make;make install.
3rd trial
./configure
make;make install
I tried the command being root. It seems the installation completes successfully. But when I come out of root privilege and view the version as regular user, I see the version is still 3.9.
bash-4.2$ /usr/local/bin/cmake --version
cmake version 3.12.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
bash-4.2$ which cmake
/usr/local/bin/cmake
bash-4.2$ cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.9
cmake version 3.9.6
CMake suite maintained and supported by Kitware (kitware.com/cmake).

Related

Use CMake binares to build cpp projects without installing CMake

I want to use specific version of CMake 3.19.0 for Ubuntu 14.04 (32-bits) without installing CMake (use only binaries).
I tried to build CMake 3.19.0 on my test machine. It builded and installed successfully. In install_manifest.txt I see lot of files that were installed on my test system.
So, I tried to copy only installed binaries from /usr/local/bin/ (this is default path where CMake binaries were installed) and paste it to another machine that doesn't know about CMake. I paste 3 binaries: cmake, ctest, cpack to /usr/local/bin/.
If I run which cmake it shows path:
/usr/local/bin/cmake
If I run cmake --verison it shows:
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.19
cmake version 3.19.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
It looks like CMake needs some modules that I haven't copied yet. I tried to build my cpp project and it shows me:
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.19
CMake Error: Error executing cmake::LoadCache(). Aborting.
What are the minimum required modules needed for stable building? And where I should copy it?
Just copied builded Modules and Templates directories from cmake-3.19.0 build directory to /usr/local/share/cmake-3.19

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/

CMake 3.18.0 not finding libopenjpeg2

Please forgive my ignorance when is comes to Cmake. I'm trying to install Poppler 0.86.1 on Centos 7 but I am stuck with an error that says CMake Error at CMakeLists.txt:208 (message): Install libopenjpeg2 before trying to build poppler. I have installed libopenjpeg2 including the dev package by running the following:
sudo yum install openjpeg2-devel
I am taking the following steps to install poppler:
wget https://poppler.freedesktop.org/poppler-0.86.1.tar.xz
tar xf poppler-0.86.1.tar.xz
cd poppler-0.86.1/
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
Which results in the following error
CMake Error at CMakeLists.txt:208 (message):
Install libopenjpeg2 before trying to build poppler. You can also decide
to use the internal unmaintained JPX decoder or none at all.
-- Configuring incomplete, errors occurred!
This is where the failure occurs in the CMakeLists.txt
if(ENABLE_LIBOPENJPEG STREQUAL "openjpeg2")
find_package(OpenJPEG)
set(WITH_OPENJPEG ${OpenJPEG_FOUND})
if(NOT OpenJPEG_FOUND OR OPENJPEG_MAJOR_VERSION VERSION_LESS 2)
message(FATAL_ERROR "Install libopenjpeg2 before trying to build poppler. You can also decide to use the internal unmaintained JPX decoder or none at all.")
endif()
...
Can anyone point me in the right direction in figuring out how to get Poppler 0.86.1 to successfully install on Centos 7?
If I remember correctly, I had the same problem when I was trying to use the latest version of the Poppler in my Docker image. I fixed it by installing libopenjp2-7-dev. Please check my answer, specifically, the second row of my Dockerfile where you can see what I installed before running cmake.
I hit this and it was due to https://github.com/uclouvain/openjpeg/issues/1174. I modified my local copy of /lib64/openjpeg-2.3/OpenJPEGConfig.cmake to work around this.

cmake 3.11 installation in solaris11

I am new to solaris 11 machine. I have a vitual box and I can only interact via command promt. I am trying to install cmake 3.11 version. I tried downloading cmake source code and building it. But failed at one point where in code uses c++11 and the our gcc compiler is not able to compile it.
It will be very greatfull if anyone can give me steps for installing and using cmake in solaris11.
Thanks in advance.
Solaris 11 offers a cmake package in its package repos, so pkg install cmake as root should do it.

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