Using boost: __func_Grm00gZzHB Function invoked with incorrect arguments - biicode

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.

Related

Cmake not able to find a directory even if it is specified in CmakeSettings.json in visual studio 2022

I am trying to build a project which requires to have OsgEarth installed from source code and not vcpkg. I build the Osgearth and now I have set the OSGEARTH_DIR (in the CmakeSettings.json) to the place where I build it from the source. I am using visual studio on Windows 11 64 bit. Even after setting ALL the OSGEARTH variables to its appropriate path in CMakeSettings.json (obtained by clicking on Project from the top menu and clicking "CMake Settings for hsave-top-level"), I am getting the following error.
I checked it many times to make sure that the OSGEARTH_INCLUDE_DIR is set to C:/Users/14077/osgearth/install/include but still I am getting this error. I also tried delete cache and reconfigure, but no success. Please help me to resolve this NOTFOUND error.
PS C:\Users\14077\HSA_VE\build> cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:/Users/14077/HSA_VE/install -DCMAKE_TOOLCHAIN_FILE=C:/Users/14077/vcpkg/scripts/buildsystems/vcpkg.cmake
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
CMake Warning (dev) at C:/Users/14077/vcpkg/scripts/buildsystems/vcpkg.cmake:816 (_find_package):
Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
CMake variable OpenVR_ROOT is set to:
C:/Users/14077/vcpkg/installed/x64-windows
For compatibility, CMake is ignoring the variable.
Call Stack (most recent call first):
src/hsave/CMakeLists.txt:6 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found the OpenVR
-- Found ZLIB: optimized;C:/Users/14077/vcpkg/installed/x64-windows/lib/zlib.lib;debug;C:/Users/14077/vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found suitable version "1.2.12", minimum required is "1")
-- Found ZLIB: optimized;C:/Users/14077/vcpkg/installed/x64-windows/lib/zlib.lib;debug;C:/Users/14077/vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found version "1.2.12")
-- Reading C:/Users/14077/vcpkg/installed/x64-windows/share/GeoTIFF/geotiff-config.cmake
-- GeoTIFF configuration, version 1.7.1
-- include directory: ${GeoTIFF_INCLUDE_DIRS}
-- ${GeoTIFF_LIBRARIES} set to shared library
-- Found ZLIB: optimized;C:/Users/14077/vcpkg/installed/x64-windows/lib/zlib.lib;debug;C:/Users/14077/vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found suitable version "1.2.12", minimum required is "1")
-- Found ZLIB: optimized;C:/Users/14077/vcpkg/installed/x64-windows/lib/zlib.lib;debug;C:/Users/14077/vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found version "1.2.12")
COMPONENT = openvdb
-- OpenVDB ABI Version: 9
CMake Warning at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindBoost.cmake:1369 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindBoost.cmake:1492 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindBoost.cmake:2102 (_Boost_MISSING_DEPENDENCIES)
C:/Users/14077/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
C:/Users/14077/vcpkg/scripts/buildsystems/vcpkg.cmake:770 (include)
C:/Users/14077/vcpkg/installed/x64-windows/share/openvdb/FindOpenVDB.cmake:499 (find_package)
C:/Users/14077/vcpkg/installed/x64-windows/share/openvdb/vcpkg-cmake-wrapper.cmake:10 (_find_package)
C:/Users/14077/vcpkg/scripts/buildsystems/vcpkg.cmake:770 (include)
src/VoxelDatabase/CMakeLists.txt:8 (find_package)
CMake Warning at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindBoost.cmake:1369 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindBoost.cmake:1492 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindBoost.cmake:2102 (_Boost_MISSING_DEPENDENCIES)
C:/Users/14077/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
C:/Users/14077/vcpkg/scripts/buildsystems/vcpkg.cmake:770 (include)
C:/Users/14077/vcpkg/installed/x64-windows/share/openvdb/FindOpenVDB.cmake:499 (find_package)
C:/Users/14077/vcpkg/installed/x64-windows/share/openvdb/vcpkg-cmake-wrapper.cmake:10 (_find_package)
C:/Users/14077/vcpkg/scripts/buildsystems/vcpkg.cmake:770 (include)
src/VoxelDatabase/CMakeLists.txt:8 (find_package)
CMake Warning at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindBoost.cmake:1369 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindBoost.cmake:1492 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindBoost.cmake:2102 (_Boost_MISSING_DEPENDENCIES)
C:/Users/14077/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
C:/Users/14077/vcpkg/scripts/buildsystems/vcpkg.cmake:770 (include)
C:/Users/14077/vcpkg/installed/x64-windows/share/openvdb/FindOpenVDB.cmake:499 (find_package)
C:/Users/14077/vcpkg/installed/x64-windows/share/openvdb/vcpkg-cmake-wrapper.cmake:10 (_find_package)
C:/Users/14077/vcpkg/scripts/buildsystems/vcpkg.cmake:770 (include)
src/VoxelDatabase/CMakeLists.txt:8 (find_package)
CMake Warning (dev) at C:/Users/14077/vcpkg/scripts/buildsystems/vcpkg.cmake:816 (_find_package):
Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
CMake variable OpenVR_ROOT is set to:
C:/Users/14077/vcpkg/installed/x64-windows
For compatibility, CMake is ignoring the variable.
Call Stack (most recent call first):
src/voxeldb_seed/CMakeLists.txt:7 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found the OpenVR
-- Configuring done
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:
C:/Users/14077/HSA_VE/src/VoxelDatabase/OSGEARTH_INCLUDE_DIR
used as include directory in directory C:/Users/14077/HSA_VE/src/VoxelDatabase
C:/Users/14077/HSA_VE/src/hsave/OSGEARTH_INCLUDE_DIR
used as include directory in directory C:/Users/14077/HSA_VE/src/hsave
C:/Users/14077/HSA_VE/src/voxeldb_seed/OSGEARTH_INCLUDE_DIR
used as include directory in directory C:/Users/14077/HSA_VE/src/voxeldb_seed
OSGEARTH_LIBRARY
linked by target "hsave" in directory C:/Users/14077/HSA_VE/src/hsave
linked by target "VoxelDatabase" in directory C:/Users/14077/HSA_VE/src/VoxelDatabase
linked by target "voxeldb_seed" in directory C:/Users/14077/HSA_VE/src/voxeldb_seed
CMake Error at C:/Users/14077/vcpkg/scripts/buildsystems/vcpkg.cmake:568 (_add_executable):
Cannot find source file:
OSGEARTH_INCLUDE_DIR-NOTFOUND/osgEarth/ImGui/ImGui.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
.hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
Call Stack (most recent call first):
src/hsave/CMakeLists.txt:120 (add_executable)
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
It looks like it can't find the ImGui.cpp file that is distributed with osgearth. Make sure you are building the master osgearth and not the 3.2 release, the master distributes the ImGui.cpp headers but 3.2 does not. Also make sure to run the INSTALL target when you build osgEarth so that it copies the headers to the correct location. For building hsave you can also feel free to email my work address and I'll try to help you out.

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.

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?

cmake error: Could not find QCA2

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

Resources