idf-extra-components icon indicating copy to clipboard operation
idf-extra-components copied to clipboard

Unsupported optimization level OpenCV idf component (IEC-157)

Open Ncouch64 opened this issue 6 months ago • 2 comments

Answers checklist.

  • [X] I have read the documentation of the component in question and the issue is not addressed there.
  • [X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

I am attempting to improve the performance of my program by using some of the recommended optimization settings in the documentation. When setting optimization level -02 and attempting to build I get the following error:

-- Found Git: /usr/bin/git (found version "2.34.1") -- The C compiler identification is GNU 13.2.0 -- The CXX compiler identification is GNU 13.2.0 -- The ASM compiler identification is GNU -- Found assembler: /home/vulcan/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/vulcan/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc - 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: /home/vulcan/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git' -- Could not use 'git describe' to determine PROJECT_VER. -- Building ESP-IDF components for target esp32s3 Processing 3 dependencies: [1/3] espressif/esp32-camera (2.0.10) [2/3] espressif/opencv (4.7.0~5) [3/3] idf (5.2.1) -- Project sdkconfig file /home/vulcan/Projects/cv_motion/sdkconfig -- Compiler supported targets: xtensa-esp-elf -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of time_t -- Check size of time_t - done -- Found Python3: /home/vulcan/.espressif/python_env/idf5.2_py3.10_env/bin/python (found version "3.10.12") found components: Interpreter -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success -- App "cv_motion" version: 1 -- Adding linker script /home/vulcan/Projects/cv_motion/build/esp-idf/esp_system/ld/memory.ld -- Adding linker script /home/vulcan/esp/v5.2/esp-idf/components/esp_system/ld/esp32s3/sections.ld.in -- Adding linker script /home/vulcan/esp/v5.2/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld -- Adding linker script /home/vulcan/esp/v5.2/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld -- Adding linker script /home/vulcan/esp/v5.2/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld -- Adding linker script /home/vulcan/esp/v5.2/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld -- Adding linker script /home/vulcan/esp/v5.2/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld -- Adding linker script /home/vulcan/esp/v5.2/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld CMake Error at managed_components/espressif__opencv/CMakeLists.txt:69 (message): Unsupported optimization level

-- Configuring incomplete, errors occurred! See also "/home/vulcan/Projects/cv_motion/build/CMakeFiles/CMakeOutput.log".

  • The terminal process "/usr/bin/cmake '-G=Ninja', '-DPYTHON_DEPS_CHECKED=1', '-DESP_PLATFORM=1', '-B=/home/vulcan/Projects/cv_motion/build', '-S=/home/vulcan/Projects/cv_motion'" terminated with exit code: 1.

I have tried some of the fixes I was able to find relating somewhat to this issue, -fno-if-conversion, but I have been unable to solve the problem as of yet.

Ncouch64 avatar Aug 27 '24 16:08 Ncouch64