Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 362601

Summary: media-libs/opencv USE=v4l kernel-2.6.38 - ../../lib/libhighgui.so.2.1.0: undefined reference to `cvCreateCameraCapture_V4L(int)'
Product: Gentoo Linux Reporter: DaggyStyle <daggs>
Component: Current packagesAssignee: Andreas K. Hüttel <dilfridge>
Status: RESOLVED FIXED    
Severity: normal CC: attilaolah, kde, lifeissecret, pawel.tomkiel, tansi.si.19
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 359595    

Description DaggyStyle 2011-04-08 13:46:10 UTC
when enabling that flag with kernel-2.6.38, opencv fails compilation when building createsamples bin, that is due to highgui.so is missing cvCreateCameraCapture_V4L which can be found in either OpenCv/modules/highgui/src/cap_v4l.cpp or OpenCv/modules/highgui/src/cap_libv4l.cpp which are added only if v4l flag is enabled and both linux/videodev.h and linux/videodev2.h are found.

disabling the flags causes opencv to compiles well.

Reproducible: Always

Steps to Reproduce:
1. emerge kernel 2.6.38
2. emerge opencv with open v4l flag
Actual Results:  
you get this: 
[ 79%] Built target _highgui                                                                   
Scanning dependencies of target createsamples
[ 79%] Building CXX object apps/haartraining/CMakeFiles/createsamples.dir/createsamples.o       
Linking CXX executable ../../bin/opencv_createsamples                                           
[ 79%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/vs/blobtrackanalysishist.o           
cc1plus: warning: /var/tmp/portage/media-libs/opencv-2.1.0/work/opencv-2.1.0_build/src/cvaux/_cvaux.h.gch/cvaux_Gentoo.gch: not used because `NDEBUG' is defined
../../lib/libhighgui.so.2.1.0: undefined reference to `cvCreateCameraCapture_V4L(int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/opencv_createsamples] Error 1
make[1]: *** [apps/haartraining/CMakeFiles/createsamples.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Expected Results:  
opencv compiles well.

relevant lines are:
OpenCv/CMakeList.txt:430-438
OpenCv/modules/highgui/CMakeList.txt:146-152
Comment 1 Paul Tomkiel 2011-04-12 08:08:21 UTC
Confirming bug on Gentoo, kernel 2.6.38.2 x86
Comment 2 Rafał Mużyło 2011-04-12 14:00:34 UTC
*** Bug 363279 has been marked as a duplicate of this bug. ***
Comment 3 Anton Tarasov 2011-04-12 14:19:28 UTC
This bug was on the kernel 3.6.36-r5
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2011-04-12 21:25:43 UTC
*** Bug 363279 has been marked as a duplicate of this bug. ***
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2011-04-12 21:26:47 UTC
*** Bug 363393 has been marked as a duplicate of this bug. ***
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2011-04-12 21:29:28 UTC
What does the arch team have to do with this?
Comment 7 Anton Tarasov 2011-04-19 12:02:37 UTC
I'm completed building! I've completed "python-update" and removed "gstreamer v41" in use-flags.
Comment 8 Attila Oláh 2011-04-19 14:58:33 UTC
I confirm that disabling the "gstreamer" and "v4l" USE flags helps here. I have managed to build it with USE="deprecated ffmpeg gtk jpeg jpeg2k octave png python sse sse2 sse3 tiff -debug -examples -gstreamer -ieee1394 -ipp -ssse3 -test -v4l -xine".
Comment 9 Tomáš Chvátal (RETIRED) gentoo-dev 2011-04-30 09:54:30 UTC
Fixed in 2.2.0 in kde overlay. Will be moved to main tree soon.