Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 465830 - =media-libs/opencv-2.4.4a+ - Fails to compile on modern kernels where V4L1 no longer exists
Summary: =media-libs/opencv-2.4.4a+ - Fails to compile on modern kernels where V4L1 no...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2013-04-13 21:16 UTC by Gary Stein
Modified: 2013-05-03 10:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch File to fix compiling opencv with v4l (opencv-2.4.4-v4l.patch,479 bytes, text/plain)
2013-04-13 21:16 UTC, Gary Stein
Details
Slighly modified ebuild to add patch to list (opencv-2.4.4a.ebuild,5.08 KB, text/plain)
2013-04-13 21:17 UTC, Gary Stein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Stein 2013-04-13 21:16:40 UTC
Created attachment 345502 [details]
Patch File to fix compiling opencv with v4l

Somewhere in the 3.6+ they removed V4L support in the kernel headers. so linux/videodev.h is now gone.

The system will fail with a bunch of errors like:
/var/tmp/portage/media-libs/opencv-2.4.4a/work/opencv-2.4.4/modules/highgui/src/cap_libv4l.cpp:1485:21: error: 'CvCaptureCAM_V4L' has no member named 'capability'

Since opencv still can use libv4l2, they have added a compatibility include called libv4l1-videodev.h that is installed.

I have attached a small one line patch that worked for me
Comment 1 Gary Stein 2013-04-13 21:17:15 UTC
Created attachment 345504 [details]
Slighly modified ebuild to add patch to list
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2013-05-03 10:40:16 UTC
I cannot reproduce this with gentoo-sources-3.8.10, linux-headers-3.8 and opencv-2.4.5. 

If you still have problems with opencv-2.4.5, please re-open and attach emerge --info output and build log.