How to set adf_path and build a project for LYRA-T board? - esp-idf

"Warn about uninitialized values.
CMake Warning (dev) at CMakeLists.txt:5 (include):
uninitialized variable 'ADF_PATH'
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at CMakeLists.txt:5 (include):
include could not find load file:
/CMakeLists.txt
-- Found Git: C:/Program Files/Git/bin/git.exe (found version "2.25.1.windows.1")
-- Unexpected file in components directory: C:/Users/Embedded/Desktop/esp/esp-idf/components/.gitkeep
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/Embedded/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/Embedded/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/Embedded/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/Embedded/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: C:/Users/Embedded/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
warning: the default selection SR_RUN_WM6_CORE1 (undefined) of (defined at C:/Users/Embedded/Desktop/esp/esp-idf/components/esp-sr/Kconfig.projbuild:83) is not contained in the choice
warning: the default selection CONFIG_SR_MN1_MODEL_QUANT (undefined) of (defined at C:/Users/Embedded/Desktop/esp/esp-idf/components/esp-sr/Kconfig.projbuild:100) is not contained in the choice
-- App "play_mp3" version: v2.0-beta2-21-g30403e2-dirty
-- Found PythonInterp: C:/Users/Embedded/.espressif/python_env/idf4.2_py2.7_env/Scripts/python.exe (found version "2.7.12")
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- Adding linker script C:/Users/Embedded/Desktop/esp/esp-adf/examples/get-started/play_mp3/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script C:/Users/Embedded/Desktop/esp/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script C:/Users/Embedded/Desktop/esp/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs-time.ld
-- Adding linker script C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Current board name is CONFIG_ESP_LYRAT_V4_3_BOARD
-- Components: adf_utils app_trace app_update asio audio_board audio_hal audio_pipeline audio_sal audio_stream bluetooth_service bootloader bootloader_support bt cbor clouds coap console cxx display_service driver dueros_service efuse esp-adf-libs esp-sr esp-tls esp32 esp_actions esp_adc_cal esp_common esp_dispatcher esp_eth esp_event esp_gdbstub esp_http_client esp_http_server esp_https_ota esp_https_server esp_local_ctrl esp_netif esp_peripherals esp_ringbuf esp_rom esp_serial_slave_link esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test input_key_service jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table perfmon playlist protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter ulp unity vfs wear_levelling wifi_provisioning wifi_service wpa_supplicant xtensa
-- Component paths: C:/Users/Embedded/Desktop/esp/esp-idf/components/adf_utils C:/Users/Embedded/Desktop/esp/esp-idf/components/app_trace C:/Users/Embedded/Desktop/esp/esp-idf/components/app_update C:/Users/Embedded/Desktop/esp/esp-idf/components/asio C:/Users/Embedded/Desktop/esp/esp-idf/components/audio_board C:/Users/Embedded/Desktop/esp/esp-idf/components/audio_hal C:/Users/Embedded/Desktop/esp/esp-idf/components/audio_pipeline C:/Users/Embedded/Desktop/esp/esp-idf/components/audio_sal C:/Users/Embedded/Desktop/esp/esp-idf/components/audio_stream C:/Users/Embedded/Desktop/esp/esp-idf/components/bluetooth_service C:/Users/Embedded/Desktop/esp/esp-idf/components/bootloader C:/Users/Embedded/Desktop/esp/esp-idf/components/bootloader_support C:/Users/Embedded/Desktop/esp/esp-idf/components/bt C:/Users/Embedded/Desktop/esp/esp-idf/components/cbor C:/Users/Embedded/Desktop/esp/esp-idf/components/clouds C:/Users/Embedded/Desktop/esp/esp-idf/components/coap C:/Users/Embedded/Desktop/esp/esp-idf/components/console C:/Users/Embedded/Desktop/esp/esp-idf/components/cxx C:/Users/Embedded/Desktop/esp/esp-idf/components/display_service C:/Users/Embedded/Desktop/esp/esp-idf/components/driver C:/Users/Embedded/Desktop/esp/esp-idf/components/dueros_service C:/Users/Embedded/Desktop/esp/esp-idf/components/efuse C:/Users/Embedded/Desktop/esp/esp-idf/components/esp-adf-libs C:/Users/Embedded/Desktop/esp/esp-idf/components/esp-sr C:/Users/Embedded/Desktop/esp/esp-idf/components/esp-tls C:/Users/Embedded/Desktop/esp/esp-idf/components/esp32 C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_actions C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_adc_cal C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_common C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_dispatcher C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_eth C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_event C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_gdbstub C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_http_client C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_http_server C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_https_ota C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_https_server C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_local_ctrl C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_netif C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_peripherals C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_ringbuf C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_rom C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_serial_slave_link C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_timer C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_websocket_client C:/Users/Embedded/Desktop/esp/esp-idf/components/esp_wifi C:/Users/Embedded/Desktop/esp/esp-idf/components/espcoredump C:/Users/Embedded/Desktop/esp/esp-idf/components/esptool_py C:/Users/Embedded/Desktop/esp/esp-idf/components/expat C:/Users/Embedded/Desktop/esp/esp-idf/components/fatfs C:/Users/Embedded/Desktop/esp/esp-idf/components/freemodbus C:/Users/Embedded/Desktop/esp/esp-idf/components/freertos C:/Users/Embedded/Desktop/esp/esp-idf/components/heap C:/Users/Embedded/Desktop/esp/esp-idf/components/idf_test C:/Users/Embedded/Desktop/esp/esp-idf/components/input_key_service C:/Users/Embedded/Desktop/esp/esp-idf/components/jsmn C:/Users/Embedded/Desktop/esp/esp-idf/components/json C:/Users/Embedded/Desktop/esp/esp-idf/components/libsodium C:/Users/Embedded/Desktop/esp/esp-idf/components/log C:/Users/Embedded/Desktop/esp/esp-idf/components/lwip C:/Users/Embedded/Desktop/esp/esp-adf/examples/get-started/play_mp3/main C:/Users/Embedded/Desktop/esp/esp-idf/components/mbedtls C:/Users/Embedded/Desktop/esp/esp-idf/components/mdns C:/Users/Embedded/Desktop/esp/esp-idf/components/mqtt C:/Users/Embedded/Desktop/esp/esp-idf/components/newlib C:/Users/Embedded/Desktop/esp/esp-idf/components/nghttp C:/Users/Embedded/Desktop/esp/esp-idf/components/nvs_flash C:/Users/Embedded/Desktop/esp/esp-idf/components/openssl C:/Users/Embedded/Desktop/esp/esp-idf/components/partition_table C:/Users/Embedded/Desktop/esp/esp-idf/components/perfmon C:/Users/Embedded/Desktop/esp/esp-idf/components/playlist C:/Users/Embedded/Desktop/esp/esp-idf/components/protobuf-c C:/Users/Embedded/Desktop/esp/esp-idf/components/protocomm C:/Users/Embedded/Desktop/esp/esp-idf/components/pthread C:/Users/Embedded/Desktop/esp/esp-idf/components/sdmmc C:/Users/Embedded/Desktop/esp/esp-idf/components/soc C:/Users/Embedded/Desktop/esp/esp-idf/components/spi_flash C:/Users/Embedded/Desktop/esp/esp-idf/components/spiffs C:/Users/Embedded/Desktop/esp/esp-idf/components/tcp_transport C:/Users/Embedded/Desktop/esp/esp-idf/components/tcpip_adapter C:/Users/Embedded/Desktop/esp/esp-idf/components/ulp C:/Users/Embedded/Desktop/esp/esp-idf/components/unity C:/Users/Embedded/Desktop/esp/esp-idf/components/vfs C:/Users/Embedded/Desktop/esp/esp-idf/components/wear_levelling C:/Users/Embedded/Desktop/esp/esp-idf/components/wifi_provisioning C:/Users/Embedded/Desktop/esp/esp-idf/components/wifi_service C:/Users/Embedded/Desktop/esp/esp-idf/components/wpa_supplicant C:/Users/Embedded/Desktop/esp/esp-idf/components/xtensa
-- Configuring incomplete, errors occurred!
See also "C:/Users/Embedded/Desktop/esp/esp-adf/examples/get-started/play_mp3/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1
"

if using Windows :
in IDF command prompt
set ADF_PATH = "C:\Users\username\Desktop\esp-adf"
to ensure your path
echo %ADF_PATH%
Permanent solution :add the following at the end of export.bat (found in IDF folder)
set ADF_PATH = "C:\Users\username\Desktop\esp-adf"

Related

Boost_program_option is not found during the cmake step

I am installing a bioinformatic tool named SuperDCA in a new conda environment. However, I get an error in the cmake step. It indicates:
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /mnt/d/conda/superdca/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: /mnt/d/conda/superdca/bin/CC - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to "Release" since none was specified by user.
SUPERDCA_DEPENDENCIES setup: check for Boost
CMake Error at /mnt/d/conda/superdca/lib/cmake/Boost-1.80.0/BoostConfig.cmake:141 (find_package):
Found package configuration file:
/mnt/d/conda/superdca/lib/cmake/boost_program_options-1.80.0/boost_program_options-config.cmake
but it set boost_program_options_FOUND to FALSE so package
"boost_program_options" 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_program_options.so.1.80.0 (shared, Boost_USE_STATIC_LIBS=ON)
Call Stack (most recent call first):
/mnt/d/conda/superdca/lib/cmake/Boost-1.80.0/BoostConfig.cmake:262 (boost_find_component)
/mnt/d/conda/superdca/share/cmake-3.24/Modules/FindBoost.cmake:594 (find_package)
externals/boost.cmake:25 (find_package)
externals/CMakeLists.txt:14 (include)
-- Configuring incomplete, errors occurred!
See also "/mnt/d/download/SuperDCA/SuperDCA/build/CMakeFiles/CMakeOutput.log".
Since it says it set boost_program_options_FOUND to FALSE, should I set it to TRUE?
The package versions are:
# Name Version Build Channel
boost-cpp 1.80.0 h75c5d50_0 conda-forge
cmake 3.24.1 h5432695_0 conda-forge
The clue is here:
* libboost_program_options.so.1.80.0 (shared, Boost_USE_STATIC_LIBS=ON)
Presumbly your Conda environment has only shared libraries for Boost in $CONDA_PREFIX/lib, and not static ones. For some reason, the software you're trying to build has set Boost_USE_STATIC_LIBS to require static linking. Without knowing why that is, there are two possible solutions:
Find where Boost_USE_STATIC_LIBS is set, and remove it.
Find a Boost package which contains static libraries. This may be fairly uncommon on Linux, where shared libraries are used most of the time.

CMake issue when Avast is running

I have an issue when running CMake on Windows 10 when avast antivirus is running.
I wrote a small basic CMakeLists.txt :
cmake_minimum_required(VERSION 3.10)
# set the project name
project(RayTracing)
# add the executable
add_executable(rat_tracing main.cpp)
When I run cmake -G "MSYS Makefiles" CMakeLists.txt with Avast activated I get::
-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/CMakeDetermineCompilerABI.cmake:49 (try_compile):
Failed to open
C:/Users/pc/Documents/C++/MyRayTracing/CMakeFiles/CMakeTmp/CMakeLists.txt
Permission denied
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.23/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
CMakeLists.txt:4 (project)
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files/msys64/mingw64/bin/gcc.exe
CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/CMakeTestCCompiler.cmake:56 (try_compile):
Failed to open
C:/Users/pc/Documents/C++/MyRayTracing/CMakeFiles/CMakeTmp/CMakeLists.txt
Permission denied
Call Stack (most recent call first):
CMakeLists.txt:4 (project)
-- Check for working C compiler: C:/Program Files/msys64/mingw64/bin/gcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler
"C:/Program Files/msys64/mingw64/bin/gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Users/pc/Documents/C++/MyRayTracing/CMakeFiles/CMakeOutput.log".
See also "C:/Users/pc/Documents/C++/MyRayTracing/CMakeFiles/CMakeError.log".
But when I disable Avast, everything works fine and I get :
-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/msys64/mingw64/bin/gcc.exe - 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: C:/Program Files/msys64/mingw64/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/pc/Documents/C++/MyRayTracing
I've done some research, but no one seems to have had the same problem. The most similar cases are those where Avast thinks Cmake is a virus.
Thx.
While working on another small c++ project, I find a solution to this problem.
Create a small "Hello word !" program.
main.cpp
#include <iostream>
int main() {
std::cout << "Hello word ! " << std::endl;
return 0;
}
And a small CMakeLists.txt.
CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
# set the project name
project(Tutorial)
# add the executable
add_executable(Tutorial main.cpp)
The use cmake or cmake-gui to configure and build the project.
At this point, a warning from Avast will appear. It will say that CMakeLists.txt is trying to modify a protected directory, in my case it was "C:/Users/pc/Documents/" and will ask if you allow it or not.
Authorize it and it will work on any other project.

Fail to install Mircosoft SEAL

When i used vcpkg to install SEAL, it occurs this:
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: seal:x86-windows
Vcpkg version: 2021-01-13-unknownhash
Additionally, attach any relevant sections from the log files above.
C:\src\vcpkg\vcpkg\buildtrees\seal\config-x86-windows-dbg-out.log
-- The CXX compiler identification is MSVC 19.28.29335.0
-- The C compiler identification is MSVC 19.28.29335.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type (CMAKE_BUILD_TYPE): Debug
-- Microsoft SEAL debug mode: ON
-- Microsoft GSL: found
-- Found ZLIB: optimized;C:/src/vcpkg/vcpkg/installed/x86-windows/lib/zlib.lib;debug;C:/src/vcpkg/vcpkg/installed/x86-windows/debug/lib/zlibd.lib (found suitable version "1.2.11", minimum required is "1.2.11")
-- ZLIB: found
-- Configuring incomplete, errors occurred!
See also "C:/src/vcpkg/vcpkg/buildtrees/seal/x86-windows-dbg/CMakeFiles/CMakeOutput.log".
C:\src\vcpkg\vcpkg\buildtrees\seal\config-x86-windows-dbg-err.log
CMake Error at CMakeLists.txt:186 (message):
Zstandard: must be static
what's the maining of "Zstandard: must be static" ???
Please tell me how to fix it or how to install SEAL on Windows. Thanks!
SEAL requires Zstandard to be built statically. You can only use vcpkg to install a static SEAL if you want to have Zstandard support. To do this, specify the triple as follows (for example): .\vcpkg install seal:windows-x64-static.

FindOpenMP failed on setting OpenMP_pthread_LIBRARY on alpine

I was trying to build a multi-threading application with cmake in my container. It failed when I tried to find OpenMP 3.0 with FindOpenMP, but worked fine if FindOpenMP was removed. Here is my test
#include <omp.h>
int main(void) {
omp_get_max_threads();
return 0;
}
and the configuration
cmake_minimum_required(VERSION 3.15)
project(test)
find_package(Threads REQUIRED)
find_package(OpenMP 3.0 REQUIRED)
add_executable(test test.cpp)
target_link_libraries(test
PUBLIC gomp)
CMake complained that a variable was missing, but when I commented out the line find_package(OpenMP 3.0 REQUIRED), it passed all checks.
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: /opt/gcc/9.2.0/bin/gcc
-- Check for working C compiler: /opt/gcc/9.2.0/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/gcc/9.2.0/bin/c++
-- Check for working CXX compiler: /opt/gcc/9.2.0/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenMP_C (missing: OpenMP_pthread_LIBRARY) (found suitable
version "4.5", minimum required is "3.0")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindOpenMP.cmake:477 (find_package_handle_standard_args)
CMakeLists.txt:6 (find_package)
-- Configuring incomplete, errors occurred!
My container was built from the latest alpine image. GCC 9.2.0 was built manually with options
--enable-languages=c,c++ --disable-multilib --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --disable-libsanitizer --disable-libatomic --disable-libitm
The docker image is maintained at https://hub.docker.com/repository/docker/leavesask/gcc/general. I've been using it for other projects for a long time, but this is my first time trying to make use of FindOpenMP.

How to recompile opencv_traincascade (OpenCV 2.4)?

I would like to know How to compile ONLY the program opencv_traincascade on macOS Sierra.
I have the source code of the traincascade (in the folder /opencv-2.4.13/apps/traincascade/). However, when I go to this folder and type on terminal:
cmake ..
It returns:
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at haartraining/CMakeLists.txt:2 (ocv_check_dependencies):
Unknown CMake command "ocv_check_dependencies".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.6)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
=> It does not understand the "ocv_check_dependencies"
Here is the CMakeLists.txt code:
SET(OPENCV_TRAINCASCADE_DEPS opencv_core opencv_ml opencv_imgproc opencv_objdetect opencv_highgui opencv_calib3d opencv_video opencv_features2d opencv_flann opencv_legacy)
ocv_check_dependencies(${OPENCV_TRAINCASCADE_DEPS})
if(NOT OCV_DEPENDENCIES_FOUND)
return()
endif()
project(traincascade)
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv")
ocv_include_modules(${OPENCV_TRAINCASCADE_DEPS})
set(traincascade_files traincascade.cpp
cascadeclassifier.cpp cascadeclassifier.h
boost.cpp boost.h features.cpp traincascade_features.h
haarfeatures.cpp haarfeatures.h
lbpfeatures.cpp lbpfeatures.h
HOGfeatures.cpp HOGfeatures.h
imagestorage.cpp imagestorage.h)
set(the_target opencv_traincascade)
add_executable(${the_target} ${traincascade_files})
target_link_libraries(${the_target} ${OPENCV_TRAINCASCADE_DEPS} opencv_haartraining_engine)
set_target_properties(${the_target} PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
OUTPUT_NAME "opencv_traincascade")
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
endif()
if(INSTALL_CREATE_DISTRIB)
if(BUILD_SHARED_LIBS)
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev)
endif()
else()
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev)
endif()
In addition, this question raised on my mind because I got stuck in the training process with -featureType LBP . When I train my face detector with LBP feature, it shows:
Andy-Chen:Temp Training macpro$ opencv_traincascade -data data -vec faces_15000-80000.vec -bg neg.txt -numPos 4000 -numNeg 10000 -numStages 10 -w 21 -h 24 -featureType LBP
===== TRAINING 0-stage =====
<BEGIN
POS count : consumed 4000 : 4000
NEG count : acceptanceRatio 10000 : 1
and then it keeps this status for several hours without any progress. However, if I train with HAAR feature, everything works fine.
Thus, I want to add some "cout" commands to the source code of traincascade so that I can see where the program gets stuck and then look for a solution or modify something to make it workable.
I look forward to hearing from your help. Thank you very much for your time.

Resources