Why pip not install latest cmake on Ubuntu

As you can see in https://pypi.org/project/cmake/. This is not the latest version. On windows it’s work as expected. Is it a bug or something ? Thanks.

root@85acafdb63d3 /app# pip3 install cmake Collecting cmake   Downloading https://files.pythonhosted.org/packages/3e/3a/6d2c6bc7fb8eaf79bdc9d6d8647f54f83d22bf973552d5af5f2c86e89e8a/cmake-3.13.3-cp37-cp37m-manylinux1_x86_64.whl (15.9MB)     100% |████████████████████████████████| 15.9MB 60kB/s  Installing collected packages: cmake Successfully installed cmake-3.13.3 

“NSPR headers not found” error while building evolution using cmake

I am installing Evolution from source using cmake by following command:

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DWITH_OPENLDAP=OFF .. 

But it result in following error message:

-- Looking for include files nspr.h, prio.h -- Looking for include files nspr.h, prio.h - not found CMake Error at cmake/modules/FindSMIME.cmake:80 (message):   NSPR headers not found.  Use -DWITH_NSPR_INCLUDES=/path/to/nspr to specify the include dir of NSPR. 

Any one could help me to solve this problem?

NOTE: -DWITH_OPENLDAP=OFF is because cmake gives me an error if I do not use this phrase.

Running CMake through GUI – After identical reinstall of Ubuntu, cmake-gui throws an error and does not launch

I’ve been reinstalling Ubuntu on my server a bunch of times, as I’ve inadvertently mucked something up every time, and found it easier to just do a fresh install.

Now, for some reason, after doing a fresh install with Ubuntu 19.04 minimal, as provided by myserver host Hetzner, the cmake-gui command does not run.

The server itself does not come with a GUI, so I installed LXDE on it, and can run GUI applications just fine while remote connecting through X2Go. I’ve installed cmake, and cmake-gui, yet for some reason, it throws the following error: https://i.imgur.com/ifLX1Zn.png

From the few google results that were relevant, it’s got something to do with display drivers not interfacing well with x-server, with the solution being to downgrade the kernel. Never had to do anything like that in prior Ubuntu installs, so I assume that’s not the issue at all.

So how do I resolve this?

Cmake giving error “compute_20”, even though the architecture is explicitly unstated in the make file

I have the same error as the person in this question, however, when I tried the solution (Just delete the target for compute_20), I’m still getting the error, even after cleaning the project.

To be specific: I’m trying to install caffe by following these instructions, step by step. Even more specifically, here is my steps.

I run sudo cmake .., and I get the following information:

CMake Warning (dev) at cmake/Misc.cmake:32 (set):   implicitly converting 'BOOLEAN' to 'STRING' type. Call Stack (most recent call first):   CMakeLists.txt:24 (include) This warning is for project developers.  Use -Wno-dev to suppress it.  -- Found Boost: /usr/include (found suitable version "1.65.1", minimum required is "1.46") found components:  system thread filesystem chrono date_time atomic  -- Found gflags  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so) -- Found glog    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so) -- Found PROTOBUF Compiler: /usr/bin/protoc -- HDF5: Using hdf5 compiler wrapper to determine C configuration -- HDF5: Using hdf5 compiler wrapper to determine CXX configuration -- Found lmdb    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/liblmdb.so) -- Found LevelDB (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libleveldb.so) -- Found Snappy  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libsnappy.so) -- CUDA detected: 10.1 -- Automatic GPU detection failed. Building for all known architectures. -- Added CUDA NVCC flags for: sm_20 sm_21 sm_30 sm_35 sm_50 -- OpenCV found (/usr/share/OpenCV) -- Found OpenBLAS libraries: /usr/lib/x86_64-linux-gnu/libopenblas.so -- Found OpenBLAS include: /usr/include/x86_64-linux-gnu -- NumPy ver. 1.11.0 found (include: /usr/local/lib/python2.7/dist-packages/numpy/core/include) -- Found Boost: /usr/include (found suitable version "1.65.1", minimum required is "1.46") found components:  python  -- Found NCCL (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libnccl.so) -- Detected Doxygen OUTPUT_DIRECTORY: ./doxygen/ --  -- ******************* Caffe Configuration Summary ******************* -- General: --   Version           :   0.15.14 --   Git               :   v0.15.14-16-g4b8d54d8-dirty --   System            :   Linux --   C++ compiler      :   /usr/bin/c++ --   Release CXX flags :   -O3 -DNDEBUG -fPIC -Wall -Wno-sign-compare -Wno-uninitialized --   Debug CXX flags   :   -g -fPIC -Wall -Wno-sign-compare -Wno-uninitialized --   Build type        :   Release --  --   BUILD_SHARED_LIBS :   ON --   BUILD_python      :   ON --   BUILD_matlab      :   OFF --   BUILD_docs        :   ON --   CPU_ONLY          :   OFF --   USE_OPENCV        :   ON --   USE_LEVELDB       :   ON --   USE_LMDB          :   ON --   ALLOW_LMDB_NOLOCK :   OFF --  -- Dependencies: --   BLAS              :   Yes (open) --   Boost             :   Yes (ver. 1.65) --   glog              :   Yes --   gflags            :   Yes --   protobuf          :   Yes (ver. 3.0.0) --   lmdb              :   Yes (ver. 0.9.21) --   LevelDB           :   Yes (ver. 1.20) --   Snappy            :   Yes (ver. ..) --   OpenCV            :   Yes (ver. 3.2.0) --   CUDA              :   Yes (ver. 10.1) --  -- NVIDIA CUDA: --   Target GPU(s)     :   Auto --   GPU arch(s)       :   sm_20 sm_21 sm_30 sm_35 sm_50 --   cuDNN             :   Not found --   NCCL              :   Yes --  -- Python: --   Interpreter       :   /usr/bin/python2.7 (ver. 2.7.15) --   Libraries         :   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.15+) --   NumPy             :   /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.11.0) --  -- Documentaion: --   Doxygen           :   /usr/bin/doxygen (1.8.13) --   config_file       :   /home/par/caffe/.Doxyfile --  -- Install: --   Install path      :   /home/par/caffe/build/install --  -- Configuring done -- Generating done -- Build files have been written to: /home/par/caffe/build 

NOTE: The configuration says specifically that it’s compiling to sm_20 compute version, which is not what I want to do. I searched all files that I have for this “sm_20” token, and the results are all in /caffe/build/src/caffe/CMakeFiles/cuda_compile_1.dir/, meaning that they are not contained within a make file.

I searched the same files for a compute_20 mention, and once again, the only mentions are in the directory above. I remove them, keeping syntax in check, and then run make -j"$ (nproc)" to which I get the following error:

[  6%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_crop_layer.cu.o nvcc fatal   : Unsupported gpu architecture 'compute_20' CMake Error at cuda_compile_1_generated_math_functions.cu.o.Release.cmake:219 (message):   Error generating   /home/par/caffe/build/src/caffe/CMakeFiles/cuda_compile_1.dir/util/./cuda_compile_1_generated_math_functions.cu.o 

What is the cause of this, if compute_20 nor sm_20 are mentioned in any makefile?

CMake can’t find source dir when run from bash script in WSL

Im running the ubuntu version of Windows Subsystem for Linux. In there i’ve set up a simple cmake project and created a script to save me from typing out

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../../

every time i want to build. My CMakeLists.txt exists in two directories above (thus ../../). The build works fine if i type the command above manually OR run a powershell script with the exact same command and nothing else.

But running this bash script inside WSL

#!/bin/bash cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../../ 

i receive the error " does not exist.source directory "/mnt/c/dev-files/C/Practice/.

It looks like the bash script messes up the error output of cmake, so im guessing the script is executing cmake or passing the arguments incorrectly but i have no idea why.

g++ version error while using cmake

I’m trying to install (actually, in this step, clone and compile) edb-debugger with the following sequence (taken from the Hamza Megahed’s book “Penetration testing with shellcode”):

  • $ git clone --recursive https://github.com/eteran/edb-debugger.git
  • $ cd edb-debugger
  • $ mkdir build
  • $ cd build
  • $ cmake ..
  • $ make

But when I try to execute $ cmake .. shows up this error:

“CMake Error at CMakeLists.txt:19 (message):
Your g++ version is too old. At least 5.0 is required.

— Configuring incomplete, errors occurred!
See also “home/usr/edb-debugger/build/CMakeFiles/CMakeOutput.log”

It’s a pretty clear error message but the problem is that I have already tried installing a new version of g++ yet it doesn’t work (the $ cmake .. command, not the installation).

So, I check the version of g++:

  • $ g++ --version

With the output:

“g++ (Ubuntu 5.5.0-12ubuntu~14.04) 5.5.0 20171010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.”

Then, I try executing the $ cmake .. command but it shows the same error as before.

I’m running Ubuntu 14.04 64-bit on VirtualBox

I would appreciate any kind of help!

Использование консоли MSYS2 для сборки проектов CMake

Решил попробовать использовать MSYS2 в качестве единого хранилища всех тулзов для сборки и компиляции разных проектов. Простенькие проекты без зависимостей с помощью CMake собираются спокойно, но вот с зависимостями – проблемы постоянные.

Решил сделать маленький проект на SFML, соответственно взял уже скомпиленную библиотеку, слинковал в своем проекте нужные зависимости, кроме одной, которую MSYS2 в упор не может найти для CMake (может проблема и не в msys2, но Clion со своим cmake спокойно собирает проект) – opengl

Часть кода из CMakeLists.txt:

# .... set(SFML_STATIC_LIBRARIES TRUE) set(SFML_DIR "$  {PROJECT_EXTLIBS_DIR}/lib-SFML/lib/cmake/SFML")  find_package(SFML 2.5 COMPONENTS system window network graphics audio main REQUIRED) # .... target_link_libraries($  {TARGET_NAME}     sfml-system     sfml-window     sfml-network     sfml-graphics     sfml-audio     sfml-main     $  {PROJECT_EXTLIBS_DIR}/lib-SFML/lib/libFLAC.a     $  {PROJECT_EXTLIBS_DIR}/lib-SFML/lib/libfreetype.a     $  {PROJECT_EXTLIBS_DIR}/lib-SFML/lib/libogg.a     $  {PROJECT_EXTLIBS_DIR}/lib-SFML/lib/libopenal32.a     $  {PROJECT_EXTLIBS_DIR}/lib-SFML/lib/libvorbis.a     $  {PROJECT_EXTLIBS_DIR}/lib-SFML/lib/libvorbisenc.a     $  {PROJECT_EXTLIBS_DIR}/lib-SFML/lib/libvorbisfile.a     )  

В $ PATH у MSYS2 скопирован Windows $ PATH. Компиляция:

$   mkdir build $   cd build $   cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER="clang.exe" -DCMAKE_CXX_COMPILER="clang++.exe" ..  /* ... */  CMake Error at extlibs/lib-SFML/lib/cmake/SFML/SFMLConfig.cmake:139 (message):   SFML found but some of its dependencies are missing ( OpenGL) Call Stack (most recent call first):   CMakeLists.txt:37 (find_package)   CMake Error at CMakeLists.txt:37 (find_package):   Found package configuration file:      /d/Projects/testproject/extlibs/lib-SFML/lib/cmake/SFML/SFMLConfig.cmake    but it set SFML_FOUND to FALSE so package "SFML" is considered to be NOT   FOUND.   -- Configuring incomplete, errors occurred!  

Clion, соответственно, без каких либо проблем собирает этот проект.

На сколько я понял CMake не может найти что-то похожее на libopengl32.a

Итак сам вопрос: В чем может быть проблема с невозможностью нахождения OpenGL (сам .a файл я нашел в папке с msys2) и как это исправить?

CMake error while installing Bullet Physics (PYTHON_LIBRARY set to NOTFOUND)

Hello everyone I’m trying to install Bullet Physics in my Ubuntu 18.04 LTS.

I managed to install cmake successfully, but as soon as I try to run


it shows me the error

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: PYTHON_LIBRARY (ADVANCED) 

I already installed python3-pip and other libraries, but why is this error happening?

(In usr/lib there are the following folders python2.7, python3, python3.6, python3.7)

Thanks in advance!