Could NOT find ZSTD (missing: ZSTD_LIBRARY ZSTD_INCLUDE_DIR) - cmake

I had an issue while installing headptrack with CMake when running cmake -DCMAKE_BUILD_TYPE=Release .. in heaptrack/build
-- Could NOT find ZSTD (missing: ZSTD_LIBRARY ZSTD_INCLUDE_DIR)
CMake Error at 3rdparty/libbacktrace/CMakeLists.txt:160 (message):
Could not find dwarf.h, try installing the dwarf or elfutils development
package.
-- Configuring incomplete, errors occurred!

The solution is to install the zstd dev package instead of the regular, here is the command:
sudo apt install -y libzstd-dev
The solution with the dwarf dev package for the second error:
sudo apt install libdwarf-dev

Related

cmake 3.12 version installation on RHEL 7

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).

install problem: Cmake error : include could not find load file: yarpl-exports.cmake

I'm trying to install fbthrift for fb-python.
I followed the guides in
https://github.com/facebook/fbthrift and installed the dependencies needed.
but I got this error when running
cmake ..
in cmd:
-- Found folly: /usr/local
CMake Error at /home/xian/rsocket-cpp/build/yarpl/yarpl-config.cmake:31 (include):
include could not find load file:
/home/xian/lib/cmake/yarpl/yarpl-exports.cmake
Call Stack (most recent call first):
CMakeLists.txt:107 (find_package)
-- Found YARPL: /home/xian
-- Could NOT find rsocket (missing: rsocket_DIR)
-- Found fizz: /usr/local
CMake Error at CMakeLists.txt:110 (find_package):
Could not find a package configuration file provided by "fmt" with any of
the following names:
fmtConfig.cmake
fmt-config.cmake
Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR"
to a directory containing one of the above files. If "fmt" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
I tried to build the path doing:
sudo cmake .. -DCMAKE_PREFIX_PATH=/home/xian/rsocket-cpp/build/yarpl/CMakeFiles/Export/lib/cmake
but it doesn't work.
yarpl-exports.cmake is in
/home/xian/rsocket-cpp/build/yarpl/CMakeFiles/Export/lib/cmake/yarpl
and I'm pretty sure I have installed rsocket-cpp.
what should I do?
You have to install libfmt-dev package ...
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
$ sudo apt-get install libfmt-dev
$ cmake .
-- Configuring done
Try
git clone https://github.com/fmtlib/fmt.git
cd fmt
cmake CMakeLists.txt
make
sudo make install

Doxygen - Could NOT find FLEX (missing: FLEX_EXECUTABLE)

I know there are very similar worded questions on here, but I could not find an answer to my question there, so here we go:
I'm trying to see which of my C++ methods are called by others so I found Doxygen after googling.
On their page the installation seems pretty straightforward:
If you have the necessary build tools installed (i.e. g++, python,
cmake, flex, bison), you should do the following to get the initial
copy of the repository:
git clone https://github.com/doxygen/doxygen.git
cd doxygen
mkdir build
cd build
cmake -G "Unix Makefiles" ..
make
Until cmake -G "Unix Makefiles" .. everything goes well, then on that command following error occurs:
test#test-VirtualBox:~/doxygen/build$ cmake -G "Unix Makefiles" ..
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find FLEX (missing: FLEX_EXECUTABLE)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.5/Modules/FindFLEX.cmake:230 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:84 (find_package)
I thought: No big deal, why should anything work out of the box...seems I have to install flex.
So I do:
sudo apt-get update
sudo apt-get install flex
sudo apt autoremove (because after installation the command line recommended me to do this)
Now it seems to me that flex has been installed, I try cmake -G "Unix Makefiles" .. again...same error. I close the command line, start it up again, try it again - same error...
So now I'm slowly gettin' pissed and turn to Stack Overflow for help :D
What am I doing wrong???
And because I saw someone asking this in the other question's comment, here's the output of flex:
test#test-VirtualBox:~/doxygen/build$ flex
The program 'flex' can be found in the following packages:
* flex
* flex-old
Try: sudo apt install <selected package>
It seems like apt autoremove really removed the package I just installed in the previous step.
So what worked for me was:
git clone https://github.com/doxygen/doxygen.git
cd doxygen
mkdir build
cd build
These are new:
sudo apt-get install flex
sudo apt-get install bison
cmake -G "Unix Makefiles" ..
make
...but of course the horror wouldn't end there, see my next question :D

Could not find PROTOBUF Compiler. I have done apt-get install protobuf-compiler

I have looked at the other question with the same heading and could not solve my problem. I have also done
$ sudo apt-get install libprotobuf-dev protobuf-compiler
$ protoc --version
libprotoc 2.6.1
When I do
sudo make -j4 && make pycaffe
I get
CMake Error at cmake/ProtoBuf.cmake:13 (message):
Could not find PROTOBUF Compiler
Call Stack (most recent call first):
cmake/Dependencies.cmake:24 (include)
CMakeLists.txt:46 (include)
-- Configuring incomplete, errors occurred!
See also "/home/varsha/neuralmap/RRPN/caffe-fast-rcnn/CMakeFiles/CMakeOutput.log".
See also "/home/varsha/neuralmap/RRPN/caffe-fast-rcnn/CMakeFiles/CMakeError.log".
Makefile:530: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
#chan3600 suggested that I should remove the build directory. I have no build directory. Please tell me how I can solve this issue.

Could not find CMake package configuration file for "Eigen3"

When I enter this command:
cd /Users/mona/ros_catkin_ws/build_isolated/pcl_ros && /Users/mona/ros_catkin_ws/install_isolated/env.sh cmake /Users/mona/ros_catkin_ws/src/perception_pcl/pcl_ros -DCATKIN_DEVEL_PREFIX=/Users/mona/ros_catkin_ws/devel_isolated/pcl_ros -DCMAKE_INSTALL_PREFIX=/Users/mona/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'
I receive this error:
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
CMake Error at CMakeLists.txt:7 (find_package):
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one.
Could not find a package configuration file provided by "Eigen3" with any
of the following names:
Eigen3Config.cmake
eigen3-config.cmake
Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/Users/mona/ros_catkin_ws/build_isolated/pcl_ros/CMakeFiles/CMakeOutput.log".
This command is ran as part of running this command for installing ROS:
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
Any idea how that could be fixed?
Please see more details of question here: http://answers.ros.org/question/215080/how-to-add-the-installation-prefix-of-eigen3-to-cmake_prefix_path-or-set-eigen3_dir-to-a-directory-containing-one-of-the-above-files/
For linux users, this may help like it did for me: just install the developers' package of the eigen3 lib by the following command.
sudo apt install libeigen3-dev
You have to install Eigen3. It provides the FindEigen3.cmake file. The error occurs because the project you want to configure, has a dependency to Eigen3.
If you have Eigen3 installed, follow the error message and add Eigen3 to CMake's search path.