Build qt5 and opencv image failed on imx8qm

Hello,
I’m trying to build an image for imx8qm v1.0b with qt and opencv. I follow this guide: How to set up Qt Creator to cross compile for embedded Linux | Toradex Developer Center

Build without opencv works well. I manage to do a cross compilation in simple Qt program on the target device.

Now, to add opencv, I follow those quides: https://developer.toradex.com/knowledge-base/opencv-(linux) and here https://www.toradex.com/de/blog/starting-with -opencv-on-imx6-processors

If I compile by adding the statement CXXFLAGS + =" -Wa, -mimplicit-it = thumb " in a opencv_3.4.3.bbappend or at the end of opencv_3.4.3.bb, it does not work. I have the following error:

Initialising tasks: 100% |#######################################| Time: 0:00:09
Sstate summary: Wanted 397 Found 373 Missed 24 Current 2189 (93% match, 99% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: opencv-3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0 do_configure: Function failed: do_configure (log file is located at /home/fredo/Documents/toradex/oe-core/build/tmp/work/aarch64-tdx-linux/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/temp/log.do_configure.1615)
ERROR: Logfile of failure stored in: /home/fredo/Documents/toradex/oe-core/build/tmp/work/aarch64-tdx-linux/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/temp/log.do_configure.1615

|     Assembler messages:
|     Error: unrecognized option -mimplicit-it=thumb
|     ninja: build stopped: subcommand failed.

| ERROR: Function failed: do_configure (log file is located at /home/fredo/Documents/toradex/oe-core/build/tmp/work/aarch64-tdx-linux/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/temp/log.do_configure.1615)
ERROR: Task (/home/fredo/Documents/toradex/oe-core/build/../layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv_3.4.3.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 7938 tasks of which 7937 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory

Summary: 1 task failed:
  /home/fredo/Documents/toradex/oe-core/build/../layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv_3.4.3.bb:do_configure
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Now, if I remove this statement CXXFLAGS + =" -Wa, -mimplicit-it = thumb ", the compilation goes to the end but after building the sdk and install it, opencv does not seem to be install in : /opt/tdx-xwayland/2.6.3/sysroots/aarch64-tdx-linux/

I attach the various configuation and log files. Do you have any idea of what is going wrong ?

Thanks,
Paloutic

local.conf
bblayers.conf
opencv_3.4.3.bb
opencv_3.4.3.bbappend
log.do_configure.1615
CMakeError.log

Hi

Aarch64 does not support thumb. So any assembler/compiler flags releated to thumb do not apply for i.MX8 and CXXFLAGS + =" -Wa, -mimplicit-it = thumb " must not be specified.

Could you double-check that, when you built the SDK for image recipe that opencv actually was in ‘IMAGE_INSTALL’? At least for me, when building with IMAGE_INSTALL_append = " opencv" in local.conf I get opencv packages installed into the SDK target rootfs.

You did build the SDK with bitbake <whatever your image recipe name is> -c populate_sdk?

Max