QiBuild/CMake cannot not find BOOST_FILESYSTEM - c++

I'm trying to build the C++ examples from Aldebaran like helloworld and sayhelloworld, but qiBuild keeps saying it cannot not find BOOST_FILESYSTEM. Boost is installed and working, I tested it with some other projects in Visual Studio.
This is the error after running qibuild configure -c atom1145:
[WARN ]: Nested worktrees detected:
d:\ald_sdk\naoqi-sdk-1.14.5-win32-vs2010\doc\examples is already in a worktree
(in d:\ald_sdk)
Current build worktree: d:\ald_sdk\naoqi-sdk-1.14.5-win32-vs2010\doc\examples
Using toolchain: atom1145
Build type: Debug
* (1/1) Configuring sayhelloworld
-- Using qibuild 3.7.1
-- Binary: sayhelloworld
CMake Error at D:/Programs/CMake/share/cmake-3.1/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find BOOST_FILESYSTEM (missing: BOOST_FILESYSTEM_LIBRARIES)
Call Stack (most recent call first):
D:/Programs/CMake/share/cmake-3.1/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
d:/Programs/Python27/share/cmake/qibuild/find.cmake:361 (find_package_handle_standard_args)
d:/Programs/Python27/share/cmake/qibuild/find.cmake:269 (_qi_call_fphsa)
d:/Programs/Python27/share/cmake/qibuild/modules/boostutils.cmake:39 (export_lib)
d:/Programs/Python27/share/cmake/qibuild/modules/boost_filesystem-config.cmake:9 (boost_flib)
d:/Programs/Python27/share/cmake/qibuild/internal/uselib.cmake:80 (find_package)
d:/Programs/Python27/share/cmake/qibuild/internal/uselib.cmake:94 (_qi_use_lib_get_deps)
d:/Programs/Python27/share/cmake/qibuild/internal/uselib.cmake:94 (_qi_use_lib_get_deps)
d:/Programs/Python27/share/cmake/qibuild/internal/uselib.cmake:94 (_qi_use_lib_get_deps)
d:/Programs/Python27/share/cmake/qibuild/internal/uselib.cmake:94 (_qi_use_lib_get_deps)
d:/Programs/Python27/share/cmake/qibuild/internal/uselib.cmake:158 (_qi_use_lib_get_deps)
d:/Programs/Python27/share/cmake/qibuild/stage.cmake:246 (_qi_use_lib_internal)
CMakeLists.txt:17 (qi_use_lib)
-- Configuring incomplete, errors occurred!
See also "D:/ALD_SDK/naoqi-sdk-1.14.5-win32-vs2010/doc/examples/core/sayhelloworld/build-atom1145/CMakeFiles/CMakeOutput.log".
See also "D:/ALD_SDK/naoqi-sdk-1.14.5-win32-vs2010/doc/examples/core/sayhelloworld/build-atom1145/CMakeFiles/CMakeError.log".
[ERROR]: ConfigureFailed Error occurred when configuring project sayhelloworld
After Boost compiled, I got the following paths:
The following directory should be added to compiler include paths:
D:/Programs/boost_1_57_0
The following directory should be added to linker library paths:
D:\Programs\boost_1_57_0\stage\lib
These are not the default path's and I guess that's causing some problems.
In the CMakeCache.txt I found that the Boost entries were "cleared":
//The directory containing a CMake configuration file for BOOST.
BOOST_DIR:PATH=d:/Programs/Python27/share/cmake/qibuild/modules
//The directory containing a CMake configuration file for BOOST_FILESYSTEM.
BOOST_FILESYSTEM_DIR:PATH=d:/Programs/Python27/share/cmake/qibuild/modules
//Cleared.
BOOST_FILESYSTEM_EXECUTABLE:STRING=
//Cleared.
BOOST_FILESYSTEM_EXECUTABLE_DEBUG:STRING=
//Cleared.
Boost_DEFINITIONS:STRING=
//Cleared.
Boost_EXECUTABLE:STRING=
//Cleared.
Boost_EXECUTABLE_DEBUG:STRING=
//Boost filesystem library (debug)
Boost_FILESYSTEM_LIBRARY_DEBUG:FILEPATH=Boost_FILESYSTEM_LIBRARY_DEBUG-NOTFOUND
//Boost filesystem library (release)
Boost_FILESYSTEM_LIBRARY_RELEASE:FILEPATH=Boost_FILESYSTEM_LIBRARY_RELEASE-NOTFOUND
//Path to a file.
Boost_INCLUDE_DIR:PATH=D:/ALD_SDK/naoqi-sdk-1.14.5-win32-vs2010/include
//Cleared.
Boost_INCLUDE_DIRS:STRING=
//Cleared.
Boost_LIBRARIES:STRING=
I tried to add some variables to the CMakeLists.txt like this, but it didn't help:
set(Boost_DEBUG true)
set(BOOST_ROOT "D:/Programs/boost_1_57_0")
set(BOOST_INCLUDEDIR "D:/Programs/boost_1_57_0/boost")
set(BOOST_LIBRARYDIR "D:/Programs/boost_1_57_0/stage/lib")
Any help would be really appreciated!

This was the solution from the Aldebaran support:
It seems to have some incompatibilty between the NAOqi 1.14.5 C++ SDK for windows and the latest version of qibuild.
On my side I have tested with the latest version of qibuild and it gave me the same error as yours.
I will let our team now to update the documentation.
In the mean time I can propose you a workaround, ie, uninstall qibuild by using
pip uninstall qibuild and reinstall a version that is working with the NAOqi 1.14.5 C++ SDK for windows
pip install qibuild==3.5.1
This one should be working.

Related

How to use CMake to compile SharkML library? [duplicate]

I am trying to build ripple by following the build guide on GitHub, but boost is continuously throwing some unknown error. Boost is installed and running. I installed boost_1_71_0 as described by the build guide.
/home/usman/Downloads/clion-2020.1.2/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /home/usman/Desktop/ripple/rippled
-- Using 4 cores for ExternalProject builds.
-- rippled version: 1.6.0
-- NIH-EP cache path: /home/usman/Desktop/ripple/rippled/.nih_c/unix_makefiles/GNU_9.3.0/Debug
-- using [01bd5a2646cda78ee09d2067c287c8f89872736d] as build container tag...
-- docker local user id: 1000
-- docker local group id: 1000
-- BOOST_ROOT: /usr/local
-- BOOST_LIBRARYDIR: /usr/local/lib/
CMake Error at /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
Found package configuration file:
/usr/local/lib/cmake/boost_chrono-1.71.0/boost_chrono-config.cmake
but it set boost_chrono_FOUND to FALSE so package "boost_chrono" is
considered to be NOT FOUND. Reason given by package:
No suitable build variant has been found.
The following variants have been tried and rejected:
* libboost_chrono.so.1.71.0 (shared, Boost_USE_STATIC_LIBS=ON)
* libboost_chrono.a (shared runtime, Boost_USE_STATIC_RUNTIME=ON)
Call Stack (most recent call first):
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
Builds/CMake/deps/FindBoost.cmake:273 (find_package)
Builds/CMake/deps/Boost.cmake:50 (find_package)
CMakeLists.txt:43 (include)
-- Configuring incomplete, errors occurred!
See also "/home/usman/Desktop/ripple/rippled/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/home/usman/Desktop/ripple/rippled/cmake-build-debug/CMakeFiles/CMakeError.log".
[Finished]
There is a similar question here, but your issue appears to be the opposite case.
The important section of the error is here:
No suitable build variant has been found.
The following variants have been tried and rejected:
* libboost_chrono.so.1.71.0 (shared, Boost_USE_STATIC_LIBS=ON)
* libboost_chrono.a (shared runtime, Boost_USE_STATIC_RUNTIME=ON)
It shows you what libraries were found, and even gives the reason why they were rejected. All of the libraries found on your machine are shared libraries. However, your CMake configuration indicates you do not want to use shared libraries (Boost_USE_STATIC_LIBS=ON and Boost_USE_STATIC_RUNTIME=ON). To fix the error, you have two options:
Set Boost_USE_STATIC_LIBS to OFF and Boost_USE_STATIC_RUNTIME to OFF:
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost ... )
Build the static Boost libraries also, so not only the shared libraries are available on your machine.

How to use Facebook Wangle in Windows with vcpkg

When I install Wangle with vcpkg install wangle I see the below message:
The following packages are already installed:
wangle[core]:x64-windows
Starting package 1/1: wangle:x64-windows
Package wangle:x64-windows is already installed
Elapsed time for package wangle:x64-windows: 3.573 ms
Total elapsed time: 4.733 ms
The package wangle:x64-windows provides CMake targets:
find_package(wangle CONFIG REQUIRED)
target_link_libraries(main PRIVATE wangle::wangle)
But when I write my own CMakeLists.txt and write find_package(wangle CONFIG REQUIRED) . and run with
cmake .. -DCMAKE_TOOLCHAIN_FILE='C:\Users\sooro\Documents\vcpkg\vcpkg\scripts\buildsystems\vcpkg.cmake'
I see the below error:
CMake Error at C:/Users/sooro/Documents/vcpkg/vcpkg/installed/x64-windows/share/wangle/wangle-config.cmake:22 (message):
File or directory
C:/Users/sooro/Documents/vcpkg/vcpkg/installed/x64-windows/lib/cmake/wangle
referenced by variable WANGLE_CMAKE_DIR does not exist !
Call Stack (most recent call first):
C:/Users/sooro/Documents/vcpkg/vcpkg/installed/x64-windows/share/wangle/wangle-config.cmake:39 (set_and_check)
C:/Users/sooro/Documents/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake:258 (_find_package)
CMakeLists.txt:35 (find_package)
-- Configuring incomplete, errors occurred!
As you can see in [wangle] find_package(wangle) failed issue on vcpkg, this problem is for bug on port, and after this bug was resolved, the above error (WANGLE_CMAKE_DIR does not exist) was resolved, and the library worked properly.
So as you can see in the install message below, the command is working correctly for using Wangle in Windows with vcpkg in all CMake base projects.
find_package(wangle CONFIG REQUIRED)
target_link_libraries(main PRIVATE wangle::wangle)

Install BLAS DLLs separately or there is a full package or another soloution

I am configuring a project via CMAKE 3.10.1 with MinGW.also I installed BLAS from sources(compiled with CMAKE) .I got Two DLL files. libblas.dll and liblapack.dll.I see only BLAS_blas_LIBRARY is pointed to C:/Windows/System32/libblas.dll. others not.such as :
BLAS_Accelerate_LIBRARY-NOTFOUND
BLAS_acml_LIBRARY-NOTFOUND
BLAS_acml_mp_LIBRARY-NOTFOUND
BLAS_complib.sgimath_LIBRARY-NOTFOUND
BLAS_cxml_LIBRARY-NOTFOUND
BLAS_dxml_LIBRARY-NOTFOUND
BLAS_essl_LIBRARY-NOTFOUND
BLAS_f77blas_LIBRARY-NOTFOUND
BLAS_goto2_LIBRARY-NOTFOUND
BLAS_mkl_intel_c_dll_LIBRARY-NOTFOUND
BLAS_mkl_intel_lp64_dll_LIBRARY-NOTFOUND
BLAS_openblas_LIBRARY-NOTFOUND
BLAS_scsl_LIBRARY-NOTFOUND
BLAS_sgemm_LIBRARY-NOTFOUND
BLAS_sunperf_LIBRARY-NOTFOUND
BLAS_vecLib_LIBRARY-NOTFOUND
only
BLAS_blas_LIBRARY C:/Windows/System32/libblas.dll
The CMake stop at this error :
CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBLAS.cmake:699 (message):
A required library with BLAS API not found. Please specify library
location.
Call Stack (most recent call first):
CMakeLists.txt:155 (FIND_PACKAGE)
so I should install all of those DLLs separately(I searched and googled a lot,there are not integrated) or there is a full BLAS package?or problem is with something else.
here is :
my Cmake snapshot
here is :
all my instruction

CMake: can't find boost 1_60_0 (version.hp not found)

I am trying to compile a program using Boost with CMake under Mac OS X.
I have got the following error:
CMake Error at
/Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindBoost.cmake:721
(file): file STRINGS file
"/Users/.../src/boost_1_60_0/boost/boost/version.hpp" cannot be
read. Call Stack (most recent call first): CMakeLists.txt:44
(find_package)
Boost version: 0.0.0
Indeed, when I go inside boost_1_60_0/boost, there isn't a folder called boost.
Is my FindBoost not up-to-date?
I beleive that you set your env wrong !
try to set entry BOOST_INCLUDE_DIR = "/Users/.../src/boost_1_60_0"
It looks like you are getting it directly to /boost_1_60_0/boost which won't work as your CMAKE will look for the verion.hpp in BOOST_INCLUDE_DIR/boost/ folder.
BTW, are you sure that the version.hpp is not there ? that's strange !
Cheers

Qt 5 and OS X Mavericks issues

I'm using Cmake to build a QT project on OS X 10.9.
Since Mavericks, the location of the OpenGL headers seems to have changed. The folder /System/Library/Frameworks/OpenGL.framework/Headers is missing now, and cmake says
CMake Error at /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:8 (message):
Failed to find "gl.h" in
"/System/Library/Frameworks/OpenGL.framework/Headers"
"/System/Library/Frameworks/AGL.framework/Headers""."
and asks me to provide the correct path in this variable _qt5gui_OPENGL_INCLUDE_DIR, which I tried with the path they apparently moved the headers to in Mavericks:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Headers
But I still get the following cmake error:
CMake Error at /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:15 (message):
The imported target "Qt5::Gui" references the file
"/System/Library/Frameworks/OpenGL.framework/Headers"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake"
but not all the files it references.
Call Stack (most recent call first):
/Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:57 (_qt5_Gui_check_file_exists)
/Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:64 (_qt5gui_find_extra_libs)
/Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:123 (include)
CMakeLists.txt:40 (find_package)
Now I don't know what to do about this error, any ideas?
You need Qt 5.2 and CMake 2.8.12:
https://codereview.qt-project.org/#change,69605
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1fce189e