installation of cmake on debian 8 - cmake

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

Related

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.

configure: error: Qtenv cannot find qmake in omnet++ installation

I'm trying to install omnetpp 5.2.1 on windows 10. But getting an error while doing ./configure command related to QT environment. I tried changing the configure.user file in omnetpp package to change the path of QT but still its not working. Here is the error:
configure:error: Qtenv cannot find qmake--maybe it is not in the path
or has some exotic name (tested names were: qmake qmake-qt5 qmake5)-
disabling Qtenv. You can try setting QT_PATH variable in
configure.user to a valid location.
qt5 might not be installed.
sudo apt install qt5-default worked for me while installing on Ubuntu 20.04.
OMNeT++ comes with all dependencies bundled. As long as you have executed the mingwenv.cmd and running from that shell, qmake should be available in the path (in tools/win64/mingw64/bin). Check if qmake.exe is present there. If not, make sure that ZIP file you have downloaded is intact. Standard windows unzip may fail on certain systems...
run ./configure WITH_QTENV = no

ccmake using cmake version 3.10

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

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

Configuration for Java binding for ZeroMQ (0MQ) with no root privileges on Linux

I am a novice with zeroMQ and I am stuck at binding ØMQ with java on a server running CentOS release 5.9.
Unfortunately, I do not have super user/root privileges on the server and am trying to install ØMQ as a normal user with restricted privileges. I have installed ØMQ by following instructions on http://www.zeromq.org/area:download
Make sure that libtool, autoconf, automake are installed.
Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
Unpack the .tar.gz source archive.
Run ./configure, followed by make.
Could not run the following obviously
To install ØMQ system-wide run sudo make install.
On Linux, run sudo ldconfig after installing ØMQ.
Then I attempted to install jzmq.
Cloned [git clone https://github.com/zeromq/jzmq.git]
Ran autogen.sh
Ran configure
At this point I get the following error
checking for ZeroMQ... no
checking zmq.h usability... no
checking zmq.h presence... no
checking for zmq.h... no
configure: error: cannot find zmq.h
As a result of the above error I am not able to run java tests and get error "no jzmq in java.library.path".
Can anybody help/direct me to how to get java binding for zeromq work when you dont have root privileges to install it? Its difficult to get IT department to install a new software on servers.
Appreciate your help.
Note: I do not have write permissions to /usr directory
Thanks
GBP
This can be overcome by adding --with-zeromq=/home/user/zeromq (installation directory of zeromq)
./configure --with-zeromq=/home/user/zeromq
Other steps include
export LD_LIBRARY_PATH=/home/user/zeromq/lib
You can also use JeroMQ (https://github.com/zeromq/jeromq) which is a pure Java implementation of ZeroMQ
I got this working by running autogen.sh on OEL 6 then running configure / compiling / installing on CentOS 5.9. I briefly looked into why autogen.sh was failing and the problem was the tool chain was too old. Since I had a more up-to-date system with a modern tool chain available running autogen.sh on something other than CentOS 5 was the easiest path for me. I'm sure it works fine with other modern Linux variants, I had OEL 6 at my finger tips.
I also did not have access to a standard directory for installation. To get that working I added zmq.jar to my class path, and the run-time linker needed to be able to find the zeromq and jzmq run-time libraries.
I faced the same issue on CentOS 6.5 and found that you need to install "gcc-c++" for this to work.
I used the following to install dependencies:
yum -y install jdk zeromq-devel unzip libtool gcc autoconf automake gcc-c++ python
Note that "jdk" comes from our private repository and it's same what can be downloaded from java.com
The following public repositories are installed on server:
atomic
Actually, I ended up having this same issue, and the following script worked for me, where I installed zeromq into ~ (so that I have ~/lib contains libzmq.a libzmq.la libzmq.so libzmq.so.3 libzmq.so.3.1.0 pkgconfig)
./autogen.sh ./configure --prefix=$HOME \ #because you don't have root privileges
--with-zeromq=$HOME --includedir=$HOME/include/ --libdir=$HOME/lib/
./make
./make -n install
#to check to see if it installs it to the right location
make install