CMake error installing qiskit-aer from source - cmake

I am trying to install Qiskit from source using the instructions here (Select the "Install from source" tab). I am installing on 64-bit Ubuntu 20.04 LTS and have just updated all packages.
I am getting the errors shown below, which might be related to CMake or ninja. Ninja is installed, but when I run ninja I get this message:
> ninja
ninja: error: loading 'build.ninja': No such file or directory
I am not sure if this is relevant or not.
Does anyone know what the problem could be?
> pip install -e .
Obtaining file:///home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages/qiskit-aer
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Requirement already satisfied: pybind11>=2.6 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-aer==0.9.0) (2.6.2)
Requirement already satisfied: qiskit-terra>=0.17.0 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages/qiskit-terra (from qiskit-aer=>
Requirement already satisfied: numpy>=1.16.3 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-aer==0.9.0) (1.20.1)
Requirement already satisfied: scipy>=1.0 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-aer==0.9.0) (1.6.1)
Requirement already satisfied: jsonschema>=2.6 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-terra>=0.17.0->qiskit->
Requirement already satisfied: retworkx>=0.9.0 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-terra>=0.17.0->qiskit->
Requirement already satisfied: ply>=3.10 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-terra>=0.17.0->qiskit-aer==0>
Requirement already satisfied: psutil>=5 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-terra>=0.17.0->qiskit-aer==0>
Requirement already satisfied: sympy>=1.3 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-terra>=0.17.0->qiskit-aer==>
Requirement already satisfied: dill>=0.3 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-terra>=0.17.0->qiskit-aer==0>
Requirement already satisfied: fastjsonschema>=2.10 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-terra>=0.17.0->qi>
Requirement already satisfied: python-constraint>=1.4 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-terra>=0.17.0->>
Requirement already satisfied: python-dateutil>=2.8.0 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-terra>=0.17.0->>
Requirement already satisfied: symengine>0.7 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from qiskit-terra>=0.17.0->qiskit-ae>
Requirement already satisfied: attrs>=17.4.0 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from jsonschema>=2.6->qiskit-terra>=>
Requirement already satisfied: setuptools in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from jsonschema>=2.6->qiskit-terra>=0.1>
Requirement already satisfied: six>=1.11.0 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from jsonschema>=2.6->qiskit-terra>=0.>
Requirement already satisfied: pyrsistent>=0.14.0 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from jsonschema>=2.6->qiskit-te>
Requirement already satisfied: mpmath>=0.19 in /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages (from sympy>=1.3->qiskit-terra>=0.17.0>
Installing collected packages: qiskit-aer
Attempting uninstall: qiskit-aer
Found existing installation: qiskit-aer 0.9.0
Uninstalling qiskit-aer-0.9.0:
Successfully uninstalled qiskit-aer-0.9.0
Running setup.py develop for qiskit-aer
ERROR: Command errored out with exit status 1:
command: /home/john/anaconda3/envs/QiskitDevenv/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/john/anaconda3>
cwd: /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages/qiskit-aer/
Complete output (77 lines):
Not searching for unused variables given on the command line.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 9.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages/qiskit-aer/_cmake_test_compile/build
CMake Error at CMakeLists.txt:15 (project):
Running
'/tmp/pip-build-env-v00vgfai/overlay/bin/ninja' '--version'
failed with:
No such file or directory
-- Configuring incomplete, errors occurred!
See also "/home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages/qiskit-aer/_skbuild/linux-x86_64-3.9/cmake-build/CMakeFiles/CMakeOutput>
File "/tmp/pip-build-env-nhehkrf9/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 582, in setup
env = cmkr.configure(cmake_args,
File "/tmp/pip-build-env-nhehkrf9/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 229, in configure
raise SKBuildError(
An error occurred while configuring with CMake.
Command:
/tmp/pip-build-env-nhehkrf9/overlay/lib/python3.9/site-packages/cmake/data/bin/cmake /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-p>
Source directory:
/home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages/qiskit-aer
Working directory:
/home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages/qiskit-aer/_skbuild/linux-x86_64-3.9/cmake-build
Please see CMake's output for more information.
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - success
--------------------------------------------------------------------------------
Configuring Project
Working directory:
/home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages/qiskit-aer/_skbuild/linux-x86_64-3.9/cmake-build
Command:
/tmp/pip-build-env-nhehkrf9/overlay/lib/python3.9/site-packages/cmake/data/bin/cmake /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-p>
Traceback (most recent call last):
----------------------------------------
Rolling back uninstall of qiskit-aer
Moving to /home/john/anaconda3/envs/QiskitDevenv/lib/python3.9/site-packages/qiskit-aer.egg-link
from /tmp/pip-uninstall-vno4ffn6/qiskit-aer.egg-link
ERROR: Command errored out with exit status 1: /home/john/anaconda3/envs/QiskitDevenv/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.ar>

The error msg ninja: error: loading 'build.ninja': No such file or directory is not relevant, and is due to the file build.niinja not existing..
The pb is rather a cmake error when building (running setup.py) Aer package.
Try to downgrade python to version 3.8 or even 3.7 (I remember a similar problem when installing from WSL Ubuntu 20.04 with Python 3.9. Downgrading to Python 3.8 solved it)
Try using the latest stable version of qiskit-aer (git checkout tags/0.8.2)

Related

Failed to process package 'rosconsole':

I have installed ROS noetic on raspian buster but it get gives error when this command is implemented as per the procedure mentioned in
http://wiki.ros.org/noetic/Installation/Source
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
It succesfully goes till 61 ros packages and gives a cmake error at 'rosconsole'
The error goes like this
==> Processing catkin package: 'rosconsole'
==> Building with env: '/home/pi/ros_catkin_ws/install_isolated/env.sh'
==> cmake /home/pi/ros_catkin_ws/src/rosconsole -DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel_isolated/rosconsole -DCMAKE_INSTALL_PREFIX=/home/pi/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release-DPYTHON_EXECUTABLE=/usr/bin/python3 -G Unix Makefiles in '/home/pi/ros_catkin_ws/build_isolated/rosconsole'
-- Using CATKIN_DEVEL_PREFIX: /home/pi/ros_catkin_ws/devel_isolated/rosconsole
-- Using CMAKE_PREFIX_PATH: /home/pi/ros_catkin_ws/install_isolated
-- This workspace overlays: /home/pi/ros_catkin_ws/install_isolated
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.3", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/pi/ros_catkin_ws/build_isolated/rosconsole/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.7.3")
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.10
-- BUILD_SHARED_LIBS is on
-- rosconsole backend: print
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:
LOG4CXX_LIBRARIES
linked by target "rosconsole-thread_test" in directory /home/pi/ros_catkin_ws/src/rosconsole
linked by target "rosconsole-utest" in directory /home/pi/ros_catkin_ws/src/rosconsole
-- Configuring incomplete, errors occurred!
See also "/home/pi/ros_catkin_ws/build_isolated/rosconsole/CMakeFiles/CMakeOutput.log".
See also "/home/pi/ros_catkin_ws/build_isolated/rosconsole/CMakeFiles/CMakeError.log".
<== Failed to process package 'rosconsole':
Command '['/home/pi/ros_catkin_ws/install_isolated/env.sh', 'cmake', '/home/pi/ros_catkin_ws/src/rosconsole', '-DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel_isolated/rosconsole', '-DCMAKE_INSTALL_PREFIX=/home/pi/ros_catkin_ws/install_isolated', '-DCMAKE_BUILD_TYPE=Release-DPYTHON_EXECUTABLE=/usr/bin/python3', '-G', 'Unix Makefiles']' returned non-zero exit status 1.
Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/rosconsole && /home/pi/ros_catkin_ws/install_isolated/env.sh cmake /home/pi/ros_catkin_ws/src/rosconsole -DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel_isolated/rosconsole -DCMAKE_INSTALL_PREFIX=/home/pi/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release-DPYTHON_EXECUTABLE=/usr/bin/python3 -G 'Unix Makefiles'
Command failed, exiting.
Tried every possible thing, cant resolve the issue.
In addition to this, rospy package is successfully installed and sourced but cant be imported. Is there any way i can import rospy, I am a total beginner. any help is appreciated. Rospy succussed installation log is as follows
==> Processing catkin package: 'rospy'
==> Building with env: '/home/pi/ros_catkin_ws/install_isolated/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/home/pi/ros_catkin_ws/build_isolated/rospy'
==> make -j4 -l4 in '/home/pi/ros_catkin_ws/build_isolated/rospy'
==> make install in '/home/pi/ros_catkin_ws/build_isolated/rospy'
Install the project...
-- Install configuration: "Release-DPYTHON_EXECUTABLE=/usr/bin/python3"
-- Installing: /home/pi/ros_catkin_ws/install_isolated/_setup_util.py
-- Installing: /home/pi/ros_catkin_ws/install_isolated/env.sh
-- Installing: /home/pi/ros_catkin_ws/install_isolated/setup.bash
-- Installing: /home/pi/ros_catkin_ws/install_isolated/local_setup.bash
-- Installing: /home/pi/ros_catkin_ws/install_isolated/setup.sh
-- Installing: /home/pi/ros_catkin_ws/install_isolated/local_setup.sh
-- Installing: /home/pi/ros_catkin_ws/install_isolated/setup.zsh
-- Installing: /home/pi/ros_catkin_ws/install_isolated/local_setup.zsh
-- Installing: /home/pi/ros_catkin_ws/install_isolated/.rosinstall
-- Up-to-date: /home/pi/ros_catkin_ws/install_isolated/lib/pkgconfig/rospy.pc
-- Up-to-date: /home/pi/ros_catkin_ws/install_isolated/share/rospy/cmake/rospyConfig.cmake
-- Up-to-date: /home/pi/ros_catkin_ws/install_isolated/share/rospy/cmake/rospyConfig-version.cmake
-- Up-to-date: /home/pi/ros_catkin_ws/install_isolated/share/rospy/package.xml
+ cd /home/pi/ros_catkin_ws/src/ros_comm/rospy
+ mkdir -p /home/pi/ros_catkin_ws/install_isolated/lib/python3/dist-packages
+ /usr/bin/env PYTHONPATH=/home/pi/ros_catkin_ws/install_isolated/lib/python3/dist-packages:/home/pi/ros_catkin_ws/build_isolated/rospy/lib/python3/dist-packages:/home/pi/ros_catkin_ws/install_isolated/lib/python3/dist-packages CATKIN_BINARY_DIR=/home/pi/ros_catkin_ws/build_isolated/rospy /usr/bin/python3 /home/pi/ros_catkin_ws/src/ros_comm/rospy/setup.py egg_info --egg-base /home/pi/ros_catkin_ws/build_isolated/rospy build --build-base /home/pi/ros_catkin_ws/build_isolated/rospy install --root=/ --install-layout=deb --prefix=/home/pi/ros_catkin_ws/install_isolated --install-scripts=/home/pi/ros_catkin_ws/install_isolated/bin
running egg_info
writing /home/pi/ros_catkin_ws/build_isolated/rospy/rospy.egg-info/PKG-INFO
writing dependency_links to /home/pi/ros_catkin_ws/build_isolated/rospy/rospy.egg-info/dependency_links.txt
writing top-level names to /home/pi/ros_catkin_ws/build_isolated/rospy/rospy.egg-info/top_level.txt
reading manifest file '/home/pi/ros_catkin_ws/build_isolated/rospy/rospy.egg-info/SOURCES.txt'
writing manifest file '/home/pi/ros_catkin_ws/build_isolated/rospy/rospy.egg-info/SOURCES.txt'
running build
running build_py
running build_scripts
running install
running install_lib
running install_egg_info
removing '/home/pi/ros_catkin_ws/install_isolated/lib/python3/dist-packages/rospy-1.15.15.egg-info' (and everything under it)
Copying /home/pi/ros_catkin_ws/build_isolated/rospy/rospy.egg-info to /home/pi/ros_catkin_ws/install_isolated/lib/python3/dist-packages/rospy-1.15.15.egg-info
Skipping SOURCES.txt
running install_scripts
changing mode of /home/pi/ros_catkin_ws/install_isolated/bin/rosconsole to 755
-- Up-to-date: /home/pi/ros_catkin_ws/install_isolated/share/rospy/rosbuild/rospy.cmake
-- Up-to-date: /home/pi/ros_catkin_ws/install_isolated/share/rospy/rosbuild/scripts/genmsg_py.py
-- Up-to-date: /home/pi/ros_catkin_ws/install_isolated/share/rospy/rosbuild/scripts/gensrv_py.py
-- Up-to-date: /home/pi/ros_catkin_ws/install_isolated/share/rospy/rosbuild/scripts/genutil.py
<== Finished processing package [54 of 184]: 'rospy'
I did
sudo apt update
sudo apt upgrade
tried the procedure from scratch twice from
Everytime it get stuck on this rosconsole package. All i want is to import rospy in script as i am modifying a script which uses rospy.

webkitgtk build ( WebP libraries were not found when I have installed the webp library)

when I build the webkitgtk-2.34.6 on Ubuntu 20.04.3 LTS, using the following command:(Follow the official documentation)[https://trac.webkit.org/wiki/BuildingGtk]
cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja
"WebP libraries were not found" error appear:
-- The CMake build type is: RelWithDebInfo
-- Could NOT find Ruby (missing: RUBY_INCLUDE_DIR RUBY_LIBRARY RUBY_CONFIG_INCLUDE_DIR) (found suitable version "2.7.0", minimum required is "1.9")
-- Enabling ccache: Couldn't find ccache program. Not enabling it.
-- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always
-- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always
-- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
-- Found the following HarfBuzz libraries:
-- HarfBuzz (required): /usr/lib/x86_64-linux-gnu/libharfbuzz.so
-- ICU (required): /usr/lib/x86_64-linux-gnu/libharfbuzz-icu.so
-- Found the following ICU libraries:
-- data (required)
-- i18n (required)
-- uc (required)
-- The following WebP libraries were not found:
-- WebP (required)
-- demux (required)
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find WebP (missing: WebP_INCLUDE_DIR WebP_LIBRARY
_WebP_REQUIRED_LIBS_FOUND)
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
Source/cmake/FindWebP.cmake:133 (find_package_handle_standard_args)
Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
Source/cmake/OptionsGTK.cmake:25 (find_package)
Source/cmake/WebKitCommon.cmake:220 (include)
CMakeLists.txt:20 (include)
-- Configuring incomplete, errors occurred!
See also "/home/crz/SerialscreenWebkit/CMakeFiles/CMakeOutput.log".
See also "/home/crz/SerialscreenWebkit/CMakeFiles/CMakeError.log".
but I have installed the webp library using the following command
sudo apt-get install -y webp
Reading package lists... Done
Building dependency tree
Reading state information... Done
webp is already the newest version (0.6.1-2ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.
use this command
sudo apt install libwebp-dev

Couldn't find LibSSH on msys2 even the libssh-devel has installed with pacman

I'm trying to compile the libnetconf2 with msys2 environment on Windows 10 OS. But I get a wired(I guess) issue about libssh.
I have installed libssh libssh2 libssh-devel libssh2-devel and the pkg-config also find the location of libssh:
$ pkg-config --list-all
autoopts AutoOpts - A semi-automated generated/library option parser
form formw - ncurses 6.2 add-on library
formw formw - ncurses 6.2 add-on library
libalpm libalpm - Arch Linux package management library
libcrypto OpenSSL-libcrypto - OpenSSL cryptography library
libmagic libmagic - Magic number recognition library
libpcre libpcre - PCRE - Perl compatible regular expressions C library with 8 bit character support
libpcre16 libpcre16 - PCRE - Perl compatible regular expressions C library with 16 bit character support
libpcre2-16 libpcre2-16 - PCRE2 - Perl compatible regular expressions C library (2nd API) with 16 bit character support
libpcre2-32 libpcre2-32 - PCRE2 - Perl compatible regular expressions C library (2nd API) with 32 bit character support
libpcre2-8 libpcre2-8 - PCRE2 - Perl compatible regular expressions C library (2nd API) with 8 bit character support
libpcre2-posix libpcre2-posix - Posix compatible interface to libpcre2-8
libpcre32 libpcre32 - PCRE - Perl compatible regular expressions C library with 32 bit character support
libpcrecpp libpcrecpp - PCRECPP - C++ wrapper for PCRE
libpcreposix libpcreposix - PCREPosix - Posix compatible interface to libpcre
libpkgconf libpkgconf - a library for accessing and manipulating development framework configuration
libssh libssh - The SSH Library
libssh2 libssh2 - Library for SSH-based communication
libssl OpenSSL-libssl - Secure Sockets Layer and cryptography libraries
$ pkg-config --modversion libssh
0.9.6
And then run the command "cmake .." in
libnetconf2/build
, which gives the error:
$ cmake ..
CMake Warning at CMakeLists.txt:171 (message):
valgrind executable not found! Disabling memory leaks tests.
-- Could NOT find CMocka (missing: CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR) (Required is at least version "1.0.1")
-- Disabling tests because of missing CMocka
-- Could NOT find Uncrustify (missing: UNCRUSTIFY) (Required is at least version "0.71")
-- OpenSSL found, required for TLS
CMake Error at /usr/share/cmake-3.21.3/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find LibSSH (missing: LIBSSH_LIBRARIES) (Required is at least
version "0.7.1")
Call Stack (most recent call first):
/usr/share/cmake-3.21.3/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
CMakeModules/FindLibSSH.cmake:113 (find_package_handle_standard_args)
CMakeLists.txt:239 (find_package)
-- Configuring incomplete, errors occurred!
And then I try to compile libssh from source code, after compiling and installation, the cmake still can't find the correct libssh (Below is the log for libssh compile and install):
$ make install
Consolidate compiler generated dependencies of target ssh
[ 58%] Built target ssh
Consolidate compiler generated dependencies of target libssh_scp
[ 63%] Built target libssh_scp
Consolidate compiler generated dependencies of target sshnetcat
[ 68%] Built target sshnetcat
Consolidate compiler generated dependencies of target ssh-client
[ 73%] Built target ssh-client
Consolidate compiler generated dependencies of target scp_download
[ 78%] Built target scp_download
[ 80%] Built target libsshpp
Consolidate compiler generated dependencies of target samplesshd-cb
[ 82%] Built target samplesshd-cb
Consolidate compiler generated dependencies of target senddata
[ 87%] Built target senddata
Consolidate compiler generated dependencies of target exec
[ 92%] Built target exec
Consolidate compiler generated dependencies of target libsshpp_noexcept
[ 94%] Built target libsshpp_noexcept
Consolidate compiler generated dependencies of target keygen
[ 96%] Built target keygen
Consolidate compiler generated dependencies of target samplesftp
[100%] Built target samplesftp
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/pkgconfig/libssh.pc
-- Installing: /usr/local/lib/cmake/libssh/libssh-config-version.cmake
-- Installing: /usr/local/include/libssh/callbacks.h
-- Installing: /usr/local/include/libssh/libssh.h
-- Installing: /usr/local/include/libssh/ssh2.h
-- Installing: /usr/local/include/libssh/legacy.h
-- Installing: /usr/local/include/libssh/libsshpp.hpp
-- Installing: /usr/local/include/libssh/sftp.h
-- Installing: /usr/local/include/libssh/server.h
-- Installing: /usr/local/include/libssh/libssh_version.h
-- Installing: /usr/local/lib/libssh.dll.a
-- Installing: /usr/local/bin/msys-ssh-4.dll
-- Installing: /usr/local/lib/cmake/libssh/libssh-config.cmake
-- Installing: /usr/local/lib/cmake/libssh/libssh-config-noconfig.cmake
BTW, the LD_LIBRARY_PATH has added:
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
I have resolved this issue as the link:
Libgit2 and libssh2 CMake package 'libssh2' not found
/usr/local is the prefix path that I compiled and installed the libssh from source code.
cmake -DLIBSSH_INCLUDE_DIRS=/usr/local/include/libssh -DLIBSSH_LIBRARIES=/usr/local/lib/ ..

Compile FreeCAD on macOS Big Sur 11.5.1 with Homebrew, error finding XercesC files

Iā€™m stuck compiling FC on macOS Big Sur. The build breaks with an error not finding certain XercesC libraries. But these libraries are installed and the path is even found by the CMake preparation process.
I postet this issue in the FreeCAD forum under https://forum.freecadweb.org/viewtopic.php?f=4&t=60663, but found no help. I would appreciate if anyone here at StackOverflow could verify this error or better yet have a hint for a solution. Thanks in advance.
System Info:
macOS Big Sur version 11.5.1
Homebrew version 3.2.5-15-g13d3eab
FreeCAD Version from latest master, see https://github.com/FreeCAD/FreeCAD
Complete steps for the build prozess:
# install freecad dependencies via homebrew
brew tap freecad/freecad
brew install eigen
brew install --only-dependencies freecad --with-packaging-utils
# Freecad source is located in folder freecad-source/
# setup the build folder and change into newly created folder
mkdir -p freecad-build
cd freecad-build
# export path to installed dependencies
export PREFIX_PATH="\
/usr/local/opt/qt5152/lib/cmake;\
/usr/local/opt/nglib/Contents/Resources;\
/usr/local/opt/vtk#8.2.0/lib/cmake;\
/usr/local/opt/opencascade#7.5.0/lib/cmake;\
/usr/local/opt/med-file/share/cmake;\
/usr/local/opt/shiboken2/lib/cmake;\
/usr/local/opt/pyside2/lib/cmake;\
/usr/local/opt/coin#4.0.0;\
/usr/local/opt/boost#1.75.0/lib/cmake;\
/usr/local/opt/boost-python3#1.75.0/lib/cmake"
# initiate build instructions
cmake \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DCMAKE_VERBOSE_MAKEFILE=OFF \
-Wno-dev \
-DBUILD_TESTING=OFF \
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk \
-DBUILD_QT5=ON \
-DUSE_PYTHON3=1 \
-DCMAKE_CXX_STANDARD=14 \
-DBUILD_ENABLE_CXX_STD:STRING=C++14 \
-DBUILD_FEM_NETGEN=1 \
-DBUILD_FEM=1 \
-DBUILD_FEM_NETGEN:BOOL=ON \
-DBUILD_WEB=ON \
-DFREECAD_USE_EXTERNAL_KDL=ON \
-DPYTHON_EXECUTABLE=/usr/local/opt/python3.9/bin/python3 \
-DPYTHON_INCLUDE_DIR=/usr/local/opt/python3.9/Frameworks/Python.framework/Headers \
-DCMAKE_PREFIX_PATH="$PREFIX_PATH" \
-DFREECAD_CREATE_MAC_APP=1 \
-DCMAKE_INSTALL_PREFIX="./.." \
../freecad-source
The CMake process ends successfully with the following summary report. Note here, that XercesC is correctly found under
-- XercesC: 3.2.3 [/usr/local/lib/libxerces-c.dylib] [/usr/local/include]:
-- The C compiler identification is AppleClang 12.0.5.12050022
-- The CXX compiler identification is AppleClang 12.0.5.12050022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Compiler: AppleClang, version: 12.0.5.12050022
-- Looking for GL/gl.h
-- Looking for GL/gl.h - not found
-- Looking for C++ include istream
-- Looking for C++ include istream - found
-- Looking for C++ include ostream
-- Looking for C++ include ostream - found
-- Looking for C++ include fstream
-- Looking for C++ include fstream - found
-- Looking for C++ include sstream
-- Looking for C++ include sstream - found
-- Looking for C++ include ios
-- Looking for C++ include ios - found
-- Looking for C++ include iostream
-- Looking for C++ include iostream - found
-- Looking for C++ include iomanip
-- Looking for C++ include iomanip - found
-- Looking for C++ include iostream
-- Looking for C++ include iostream - found
-- Check for STD namespace
-- Check for STD namespace - found
-- Force BOOST_PP_VARIADICS=1 for clang
-- prefix: /Users/dirkolbrich/Freecad
-- bindir: bin
-- datadir: share
-- docdir: share/doc/FreeCAD
-- includedir: include
-- libdir: lib
-- cmake: 3.21.1
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
=====================================================
Doxygen not found, will not build documentation.
=====================================================
-- Detected Homebrew install at /usr/local
-- Found Python3: /usr/local/bin/python3.9 (found version "3.9.6") found components: Interpreter Development Development.Module Development.Embed
-- Found XercesC: /usr/local/lib/libxerces-c.dylib (found version "3.2.3")
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libz.tbd (found version "1.2.11")
# lots of other setup stuff deleted for clarity
#
#
==============
Summary report
==============
-- Build type: Release
-- Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ (12.0.5.12050022)
-- Flags: -Wall -Wextra -Wpedantic -Wno-write-strings -Wno-undefined-var-template
-- Standard: Requires C++14
-- Python: 3.9.6 [/usr/local/bin/python3.9] [.cpython-39-darwin]
-- PCL: not enabled
-- pybind11: not enabled
-- Boost: 1.75.0 (1.75.0)
-- XercesC: 3.2.3 [/usr/local/lib/libxerces-c.dylib] [/usr/local/include]
-- ZLIB: 1.2.11
-- PyCXX: 6.2.8 [/Users/dirkolbrich/Freecad/freecad-source/src]
-- OCC: 7.5.0 [TKFillet;TKMesh;TKernel;TKG2d;TKG3d;TKMath;TKIGES;TKSTL;TKShHealing;TKXSBase;TKBool;TKBO;TKBRep;TKTopAlgo;TKGeomAlgo;TKGeomBase;TKOffset;TKPrim;TKSTEPBase;TKSTEPAttr;TKSTEP209;TKSTEP;TKHLR;TKFeat] [/usr/local/opt/opencascade#7.5.0/lib] [/usr/local/opt/opencascade#7.5.0/include/opencascade]
-- SMESH: build internal
-- MEDFile: 4.0.0 [/usr/local/lib/libmedC.dylib;/usr/local/lib/libmed.dylib] [/usr/local/include]
-- HDF5: 1.12.1
-- VTK: 8.2.0
-- NETGEN: 6.2.2101 (6.2.2101) [-DNO_PARALLEL_THREADS;-DOCCGEOMETRY;-DNETGEN_VERSION=395829] [] [/usr/local/opt/nglib/Contents/Resources/include/include;/usr/local/opt/nglib/Contents/Resources/include] [nglib] [/usr/local/opt/nglib/Contents/Resources/include/include;/usr/local/opt/nglib/Contents/Resources/include]
-- SWIG: 4.0.2
-- Eigen3 3.3.9
-- Qt5Core: 5.15.2
-- Qt5Network: 5.15.2
-- Qt5Xml: 5.15.2
-- Qt5XmlPatterns: 5.15.2
-- Qt5Widgets: 5.15.2
-- Qt5PrintSupport: 5.15.2
-- Qt5OpenGL: 5.15.2
-- Qt5Svg: 5.15.2
-- Qt5UiTools: 5.15.2
-- Qt5Concurrent: 5.15.2
-- Qt5WebEngineWidgets: 5.15.2
-- Shiboken2: 5.15.2 [/usr/local/opt/shiboken2/lib/cmake/Shiboken2-5.15.2] [/usr/local/opt/shiboken2/include/shiboken2;/usr/local/opt/python3.9/Frameworks/Python.framework/Headers]
-- PySide2: 5.15.2 [/usr/local/opt/pyside2/include/PySide2]
-- PySide2Tools: [/usr/local/bin/uic] [/usr/local/bin/rcc]
-- Freetype: 2.11.0
-- OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework
-- OpenGLU: [/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework][/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework]
-- Coin3D: 4.0.0 [/usr/local/opt/coin#4.0.0/lib/libCoin.dylib] [/usr/local/opt/coin#4.0.0/include]
-- Pivy: 0.6.5
-- SPNAV: [SPNAV_LIBRARY-NOTFOUND] [SPNAV_INCLUDE_DIR-NOTFOUND]
-- Matplotlib: 2.1.1
-- Rift: not enabled (BUILD_VR)
-- Doxygen: not found
=================================================
Now run 'cmake --build /Users/dirkolbrich/Freecad/freecad-build' to build FreeCAD
=================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/dirkolbrich/Freecad/freecad-build
Now I start the build process with the following steps:
# set path to icu4c
# see https://forum.freecadweb.org/viewtopic.php?p=507588#p507588
export LIBRARY_PATH="/usr/local/opt/icu4c/lib"
#start the build according to the last line of the cmake summary report
cmake --build /Users/dirkolbrich/freecad/freecad-build/release
The build errors shortly before finish with an error of not finding the XercesC library files:
[ 91%] Building CXX object src/Mod/Measure/App/CMakeFiles/Measure.dir/AppMeasure.cpp.o
In file included from /Users/dirkolbrich/freecad/freecad-source/src/Mod/Measure/App/AppMeasure.cpp:32:
In file included from /Users/dirkolbrich/freecad/freecad-source/src/Mod/Measure/App/Measurement.h:29:
In file included from /Users/dirkolbrich/freecad/freecad-source/src/App/DocumentObject.h:28:
In file included from /Users/dirkolbrich/freecad/freecad-source/src/App/TransactionalObject.h:27:
In file included from /Users/dirkolbrich/freecad/freecad-source/src/App/ExtensionContainer.h:33:
/Users/dirkolbrich/freecad/freecad-source/src/Base/Reader.h:32:10: fatal error: 'xercesc/framework/XMLPScanToken.hpp' file not found
#include <xercesc/framework/XMLPScanToken.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/Mod/Measure/App/CMakeFiles/Measure.dir/AppMeasure.cpp.o] Error 1
make[1]: *** [src/Mod/Measure/App/CMakeFiles/Measure.dir/all] Error 2
make: *** [all] Error 2
The not found files exist under the specified path at /usr/local/include/xercesc/framework/XMLPScanToken.hpp according to the summary report and verified manually.
Even adding -DXERCESC_INCLUDE_DIR=/usr/include/xercesc to the cmake command does not help.
There is a typo in the build script.
The final report prints XercesC_INCLUDE_DIRS,
but the CMakeLists.txt for that subdirectory uses XERCESC_INCLUDE_DIR.
I suggest you fix the typo (to XercesC_INCLUDE_DIRS) in src/Mod/Measure/App/CMakeLists.txt and file a pull request.

Installing GNU Radio using PyBOMBS

I am following the installation instructions on https://github.com/gnuradio/pybombs.
I get the following error message:
ā†’ sudo -H pybombs prefix init ~/prefix -a myprefix -R gnuradio-default
PyBOMBS.ConfigManager - INFO - Prefix Python version is: 2.7.6
PyBOMBS - INFO - PyBOMBS Version 2.3.3a0
PyBOMBS.prefix - WARNING - There already is a prefix in `~/prefix'.
Continue using this path Y/[N]? y
PyBOMBS.ConfigManager - INFO - Prefix Python version is: 2.7.6
Alias `myprefix' already exists, overwrite Y/[N]? y
PyBOMBS.ConfigManager - INFO - Prefix Python version is: 2.7.6
PyBOMBS.prefix - INFO - Installing default packages for prefix...
PyBOMBS.prefix - INFO -
- <ruamel.yaml.comments.CommentedSeq object at 0x7f3891d44d20>
- <ruamel.yaml.comments.CommentedSeq object at 0x7f3891d44d70>
PyBOMBS.install_manager - INFO - Phase 1: Creating install tree and installing binary packages:
PyBOMBS.get_recipe - ERROR - Error fetching recipe `<ruamel.yaml.comments.CommentedSeq object at 0x7f3891d44d20>':
Package <ruamel.yaml.comments.CommentedSeq object at 0x7f3891d44d20> has no recipe file!
It seems like a mismatch in the use of ruamel.yamel. Reinstalling ruamel.yamel does not solve this:
ā†’ sudo -H pip install --upgrade --force-reinstall ruamel.yaml
Collecting ruamel.yaml
Downloading https://files.pythonhosted.org/packages/3c/bf/6be7b1510270d785ca53193d06ba64c2f2bd969db732d108e2a82cbc9a0e/ruamel.yaml-0.15.57-cp27-cp27mu-manylinux1_x86_64.whl (590kB)
Collecting ruamel.ordereddict; platform_python_implementation == "CPython" and python_version <= "2.7" (from ruamel.yaml)
Using cached https://files.pythonhosted.org/packages/f3/2c/fa6d75dc459b371ed3b88fdbf8042785ce1655073c884fd97bdbb9f48e01/ruamel.ordereddict-0.4.13-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: ruamel.ordereddict, ruamel.yaml
Found existing installation: ruamel.ordereddict 0.4.13
Uninstalling ruamel.ordereddict-0.4.13:
Successfully uninstalled ruamel.ordereddict-0.4.13
Found existing installation: ruamel.yaml 0.15.55
Uninstalling ruamel.yaml-0.15.55:
Successfully uninstalled ruamel.yaml-0.15.55
Successfully installed ruamel.ordereddict-0.4.13 ruamel.yaml-0.15.57
I using Ubuntu 14.04.4 LTS (for various reasons I cannot upgrade).
Any suggestion will be greatly appreciated.
PyBOMBS could not cope with recent changes in ruamel.yaml where CommentedMap and CommentedSeq were no longer subclasses of dict resp list but of the abstract baseclasses MutableMapping resp. MutableSequence (from collections.abc). PyBombs actually checked using isinstance() against dict resp. list.
Installing an older version of ruamel.yaml (anything <= 0.15.52) should work, you can do so with pip install 'ruamel.yaml<=0.15.52'
In the mean time a PR was submitted and merge to fix this issue, so make sure you run with the latest version of PyBOMBS checked out from github.
It is likely that your config.yml was truncated, so make sure you restore/regenerate that one.