cmake error: Could not find QCA2 - makefile

Encountered the following message while cmake-ing libjreen on Mac.
$ cmake ..
-- checking for module 'qca2'
-- package 'qca2' not found
CMake Error at /opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find QCA2 (missing: QCA2_LIBRARIES QCA2_INCLUDE_DIR)
Call Stack (most recent call first):
/opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
cmake/FindQCA2.cmake:44 (find_package_handle_standard_args)
CMakeLists.txt:22 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
How do I go on about installing qca2?
Update I have installed qca through macports without any luck. It seems I would need libqca2-devel which is not present on macports. How do I install libqca2-devel?

Well, this got solved.
I had to install qca2 from source so that cmake could pick it up

Related

Could NOT find Boost - python3 components missing

When trying to compile cv_bridge in ROS2 cmake find_package does not find boost-python3 package.
Follow error ensues:
--- stderr: cv_bridge
CMake Error at /usr/local/Cellar/cmake/3.17.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Could NOT find Boost (missing: python3) (found version "1.72.0")
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.17.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.17.1/share/cmake/Modules/FindBoost.cmake:2145 (find_package_handle_standard_args)
CMakeLists.txt:32 (find_package)
---
Failed <<< cv_bridge [ Exited with code 1 ]
What is the reason for this?
Making sure CMake uses the built-in Boost CMake files instead of the Boost-installed one fixes the issue:
colcon build --symlink-install --cmake-args ' -DBoost_NO_BOOST_CMAKE:BOOL=0'
Add the CMake argument -D Boost_NO_BOOST_CMAKE:BOOL=0
As described and referenced from here https://www.forum.freecadweb.org/viewtopic.php?f=4&t=39301 :
This tells cmake to not use the cmake-config files included in boost directly. Instead config files from cmake are used like for the previous boost versions.

How to solve the issue "A required library with BLAS API not found"?

I am trying to install JDFTx by simply following the instructions on the page http://jdftx.org/CompilingBasic.html.
I have installed Cygwin from here (Windows, x64): https://cygwin.com/install.html . And I also believe that I have installed necessary libraries, listed here: http://jdftx.org/Dependencies.html .
Now, when I enter in the Cygwin64 terminal the command:
cmake ../jdftx-VERSION/jdftx
I am getting the following message:
CMake Error at /usr/share/cmake-3.6.2/Modules/FindBLAS.cmake:690 (message):
A required library with BLAS API not found. Please specify library
location.
Call Stack (most recent call first):
/usr/share/cmake-3.6.2/Modules/FindLAPACK.cmake:165 (find_package)
CMake-Modules/FindLAPACK_ATLAS.cmake:20 (find_package)
CMakeLists.txt:85 (find_package)
-- Configuring incomplete, errors occurred!
See also "/cygdrive/c/jdftx/build/CMakeFiles/CMakeOutput.log".
See also "/cygdrive/c/jdftx/build/CMakeFiles/CMakeError.log".
The solution is to use this command instead, thus explicitly specifying the location of the library:
cmake -DLAPACK_LIBRARIES=/usr/lib/liblapack.dll.a ../jdftx-1.4.1/jdftx
However, now I am getting the following output, containing another error message:
-- Forcing static linking for Cygwin/Windows
-- Found GSL: /lib/libgsl.dll.a
-- Found FFTW3: /lib/libfftw3_threads.dll.a /lib/libfftw3.dll.a
-- Found LAPACK: /usr/lib/liblapack.dll.a
-- Found CBLAS: /usr/lib/libgslcblas.dll.a
-- Found MPI_C: /usr/lib/libmpi.dll.a;/usr/lib/libopen-rte.dll.a;/usr/lib/libope n-pal.dll.a;/usr/lib/libm.a;/usr/lib/w32api/libgdi32.a
CMake Warning at /usr/share/cmake-3.6.2/Modules/FindMPI.cmake:420 (message):
Unable to find MPI library mpi_cxx
Call Stack (most recent call first):
/usr/share/cmake-3.6.2/Modules/FindMPI.cmake:610 (interrogate_mpi_compiler)
CMakeLists.txt:93 (find_package)
CMake Error at /usr/share/cmake-3.6.2/Modules/FindPackageHandleStandardArgs.cmak e:148 (message):
Could NOT find MPI_CXX (missing: MPI_CXX_LIBRARIES)
Call Stack (most recent call first):
/usr/share/cmake-3.6.2/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA _FAILURE_MESSAGE)
/usr/share/cmake-3.6.2/Modules/FindMPI.cmake:628 (find_package_handle_standard _args)
CMakeLists.txt:93 (find_package)
-- Configuring incomplete, errors occurred!
See also "/cygdrive/c/jdftx/build/CMakeFiles/CMakeOutput.log".
See also "/cygdrive/c/jdftx/build/CMakeFiles/CMakeError.log".
Would anyone have an idea what other option should I use in the cmake call?
Thanks!
The solution is:
cmake -DLAPACK_LIBRARIES=/usr/lib/liblapack.dll.a -DMPI_CXX_LIBRARIES=/usr/lib/libmpi_mpifh.dll.a ../jdftx-1.4.1/jdftx
Now I realize, this is not a solution for the second error...
The actual solution is to uninstall all related libraries and install previous versions (instead of the newest ones). After I have done it, everything works fine.

install cgal as non root user + error due to gmp

I want to install CGAL in my account in our cluster; as a prerequisite, I installed PMG in a folder, and according to this post https://unix.stackexchange.com/questions/265239/how-to-install-a-custom-gmp-lib-for-just-one-user
I added some lines to the content of the .bashrc file.
GMP_DIR="${HOME}/gmp-6.1.2"
export LD_LIBRARY_PATH=${GMP_DIR}/lib64:$LD_LIBRARY_PATH
export LIBRARY_PATH=${GMP_DIR}/lib64:$LIBRARY_PATH
export CPATH=${GMP_DIR}/include:$CPATH
But after configuring CGAL with the following command
cmake -DWITH_CGAL_Core=ON -DWITH_CGAL_Qt5=OFF -DWITH_CGAL_ImageIO=OFF -DWITH_examples=OFF -DWITH_demos=OFF -DGMP_LIBRARIES_DIR:PATH=/data/home/parisa/gmp-6.1.2/lib -DGMP_INCLUDE_DIR:PATH=/data/home/parisa/gmp-6.1.2/include .
I got this error message :
External libraries supported: GMP;GMPXX;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
-- Preconfiguring library: GMP ...
-- Could NOT find GMP (missing: GMP_LIBRARIES)
CMake Error at cmake/modules/CGAL_SetupDependencies.cmake:66 (message):
CGAL requires GMP to be found
Call Stack (most recent call first):
CMakeLists.txt:673 (include)
-- Configuring incomplete, errors occurred!
See also "/data/home/parisa/CGAL-4.9.1/CMakeFiles/CMakeOutput.log".
I tried to change the lib in the above command to libgmp.a, libgmp.la ,and ... but none of them worked!
How can I fix this error?

cmake cannot find the version of boost 1.59

I want to setup CGAL-4.7 and, in order to do that, i need to install boost. Specifically, i use boost-1.59. Cmake version is 3.4.0. I get the following message:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindBoost.cmake:1247 (message):
Unable to find the requested Boost libraries.
Boost version: 0.0.0
Boost include path: C:/local/boost_1_59_0/boost
Detected version of Boost is too old. Requested version was 1.39 (or
newer).
Call Stack (most recent call first):
cmake/modules/CGAL_SetupBoost.cmake:6 (find_package)
cmake/modules/CGAL_SetupDependencies.cmake:85 (include)
CMakeLists.txt:649 (include)
EDIT
The main error is this:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindBoost.cmake:721
(file): file STRINGS file "C:/local/boost_1_59_0/boost/boost/version.hpp" cannot be read. Call Stack (most recent call first): cmake/modules/CGAL_SetupBoost.cmake:6
(find_package) cmake/modules/CGAL_SetupDependencies.cmake:85(include)
CMakeLists.txt:649 (include)
What could be the problem?

Using boost: __func_Grm00gZzHB Function invoked with incorrect arguments

I have a problem to use boost with biicode. I have a simple project with a main. The project uses boost. In order to get boost with biicode I used the following cmake file:
include(biicode/boost/setup)
ADD_BII_TARGETS()
bii_find_boost(COMPONENTS unit_test_framework REQUIRED)
target_include_directories(${BII_BLOCK_TARGET} INTERFACE ${Boost_INCLUDE_DIRS})
target_link_libraries(${BII_BLOCK_TARGET} INTERFACE ${Boost_LIBRARIES})
If I now call "bii configure", boost is downloaded and extracted (i checked the .biicode/boost folder). Nevertheless I get some weired errors (A trace version can be found here) and the configuration process fails:
$ bii configure --verbose
DEBUG: Everything up to date
DEBUG: No valid files found in d:\C++\Workspace\testx\blocks
INFO: Processing changes...
Running: "cmake" -G "Visual Studio 12" -Wno-dev ..\cmake
BLOCK: user/testx
-----------------------------------------------------------
CMake Error at C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:1 (__func_1111111111):
__func_1111111111 Function invoked with incorrect arguments for function
named: __func_1111111111
Call Stack (most recent call first):
C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:4 (include)
../deps/toeb/cmakepp/cmake/task/task_run_next.cmake:34 (eval)
../deps/toeb/cmakepp/cmake/task/task_run_next.cmake:42 (task_run_next)
../deps/toeb/cmakepp/cmake/task/task_run_all.cmake:6 (task_run_next)
../deps/toeb/cmakepp/cmakepp.cmake:110 (task_run_all)
../deps/boost/install/build_jobs.cmake:1 (include)
../deps/boost/install/install.cmake:2 (include)
../deps/biicode/boost/setup.cmake:1 (include)
../../CMakeLists.txt:1 (include)
CMake Error at C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:1 (__func_6oohAf7Azh):
__func_6oohAf7Azh Function invoked with incorrect arguments for function
named: __func_6oohAf7Azh
Call Stack (most recent call first):
C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:4 (include)
../deps/toeb/cmakepp/cmake/task/task_run_next.cmake:34 (eval)
../deps/toeb/cmakepp/cmake/task/task_run_all.cmake:6 (task_run_next)
../deps/toeb/cmakepp/cmakepp.cmake:110 (task_run_all)
../deps/boost/install/build_jobs.cmake:1 (include)
../deps/boost/install/install.cmake:2 (include)
../deps/biicode/boost/setup.cmake:1 (include)
../../CMakeLists.txt:1 (include)
CMake Error at C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:1 (__func_F9SWokvms4):
__func_F9SWokvms4 Function invoked with incorrect arguments for function
named: __func_F9SWokvms4
Call Stack (most recent call first):
C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:4 (include)
../deps/toeb/cmakepp/cmake/task/task_run_next.cmake:34 (eval)
../deps/toeb/cmakepp/cmake/task/task_run_all.cmake:6 (task_run_next)
../deps/toeb/cmakepp/cmakepp.cmake:110 (task_run_all)
../deps/boost/install/build_jobs.cmake:1 (include)
../deps/boost/install/install.cmake:2 (include)
../deps/biicode/boost/setup.cmake:1 (include)
../../CMakeLists.txt:1 (include)
CMake Error at C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:1 (__func_Grm00gZzHB):
__func_Grm00gZzHB Function invoked with incorrect arguments for function
named: __func_Grm00gZzHB
Call Stack (most recent call first):
C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:4 (include)
../deps/toeb/cmakepp/cmake/task/task_run_next.cmake:34 (eval)
../deps/toeb/cmakepp/cmake/task/task_run_all.cmake:6 (task_run_next)
../deps/toeb/cmakepp/cmakepp.cmake:110 (task_run_all)
../deps/boost/install/build_jobs.cmake:1 (include)
../deps/boost/install/install.cmake:2 (include)
../deps/biicode/boost/setup.cmake:1 (include)
../../CMakeLists.txt:1 (include)
+ LIB: user_testx
+ EXE: user_testx___main
-- No linking type specified. Assuming static linking
-- Setting up biicode Boost configuration...
-- Building Boost 1.57.0 components with toolset msvc-12.0...
Starting unit_test_framework library build job...
Building Boost components, please wait [ ]
Finished building unit_test_framework library
-- Boost version: 1.57.0
-- Boost version: 1.57.0
-- Found the following Boost libraries:
-- unit_test_framework
-- Configuring incomplete, errors occurred!
See also "D:/C++/Workspace/testx/bii/build/CMakeFiles/CMakeOutput.log".
ERROR: CMake failed
Ok I failed to figure out what the problem was, but i fixed it^^. The problem was something with a binary symbol RS (E1 (hex) in ascii) which was placed in some source files of https://github.com/toeb/cmakepp (must be a cmake problem, because after removing them they appeared again after executing cmake).
The problem disappeared after updating cmake from version 3.1.0-rc1 -> 3.3.0-rc3.

Resources