AnsweredAssumed Answered

Errors when building opencv_3.0.bb with L3.14.28_1.0

Question asked by Yanfeng Liu on Sep 15, 2015
Latest reply on Sep 23, 2015 by Bio_TICFSL

Hi,

 

Happened to notice that opencv_3.0.bb is available in openembedded layers, I grabbed a copy and kicked off "bitbake opencv" but then got error applying a patch for v2l_cap.cpp:

 

Applying patch 0001-MGS-515-ccc-Opencv-app-can-t-run-on-imx6sx-with-cam.patch

can't find file to patch at input line 22

Perhaps you used the wrong -p or --strip option?

...

|---

| modules/highgui/src/cap_v4l.cpp | 6 ++++--

| 1 file changed, 4 insertions(+), 2 deletions(-)

|

|diff --git a/modules/highgui/src/cap_v4l.cpp b/modules/highgui/src/cap_v4l.cpp

|index c9fca05..8c46b6c 100644

|--- a/modules/highgui/src/cap_v4l.cpp

|+++ b/modules/highgui/src/cap_v4l.cpp

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

No file to patch.  Skipping patch.

2 out of 2 hunks ignored

No file to patch.  Skipping patch.

2 out of 2 hunks ignored

Patch 0001-MGS-515-ccc-Opencv-app-can-t-run-on-imx6sx-with-cam.patch does not apply (enforce with -f)

ERROR: Function failed: patch_do_patch

NOTE: Tasks Summary: Attempted 2294 tasks of which 2291 didn't need to be rerun and 1 failed.

 

Guessing that patch was designed for opencv 2.4 is no longer hold for opencv 3.0.

 

To see if there are other issues, I simply commented the patch referring line in "opencv_%.bbappend" provided from "meta-fsl-arm" layer and restarted the build. This time the do_compile task run but finally got compilation error:

 

./fsl-release-bsp/build-x11/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/opencv/3.0+gitAUTOINC+424c2bddb3-r0/contrib/modules/cvv/src/view/translationsmatchview.cpp:42:116: error: no matching function for call to 'min(unsigned int, long unsigned int)'

  int updateAreaDelay=std::min(std::max(matches.size(),std::max(leftKeyPoints.size(),rightKeyPoints.size()))/10,50lu);

                                                                                                                    ^

 

Looks like I might be missing some compiler options in "opencv_%.bbappend"... or my approach of simply grabbing an new recipe from upstream is not the right way to go?

 

Regards,

yanfeng

Outcomes