AnsweredAssumed Answered

opencv_3.4.bb build failed when using PACKAGECONFIG python2 or python3

Question asked by zohan Lin on Jan 7, 2020
Latest reply on Feb 3, 2020 by gusarambula

Dear all,

 

I use Yocto 4.9.88(rock 2.4) BSP and bitbake opencv without modifying any files, the mission is complete.

 

Now I want to use opencv called by python, so I add two PACKAGECONFIG  python2 & python3 in opencv_3.4.bb

and remove PACKAGECONFIG_remove_imx   = "eigen python3" in opencv_3.4.bbappend.

The build is failed this time.

The error message is as below

| [ 8%] Built target IlmImf
| make[1]: Leaving directory '/ACS_Disk2/MS5776/20191226/imx-yocto-bsp/imx-linux-rocko/MS5776_V107/tmp/work/cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/opencv/3.4+gitAUTOINC+6d4f66472e_81ca8dab86_a62e20676a_34e4206aef_fccf7cd6a4-r0/build'
| Makefile:165: recipe for target 'all' failed
| make: *** [all] Error 2
| WARNING: exit code 2 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /ACS_Disk2/MS5776/20191226/imx-yocto-bsp/imx-linux-rocko/MS5776_V107/tmp/work/cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/opencv/3.4+gitAUTOINC+6d4f66472e_81ca8dab86_a62e20676a_34e4206aef_fccf7cd6a4-r0/temp/log.do_compile.7712)
ERROR: Task (/ACS_Disk2/MS5776/20191226/imx-yocto-bsp/imx-linux-rocko/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-graphics/opencv/opencv_3.4.bb:do_compile) failed with exit code '1' 

 

 

 

Could anyone tell me what happened? And how do I fix it?

 

 

updated in 2020/01/30

-------------------------------------------------------------------------------------------------

I used "bitbake -D opencv" and found the error message :

make[2]: *** No rule to make target 'modules/dnn/attr_value.pb.cc', needed by 'modules/python_bindings_generator/pyopencv_generated_include.h' 

 

And I tried to follow the steps from No rule to make target 'modules/dnn/attr_value.pb.cc' · Issue #10474 · opencv/opencv · GitHub 

But I have not found a way to build opencv_dnn first in Yocto BSP yet. 

Outcomes