There is 2.0.0 version of OpenCV out. But Portage tree still contains only 1.0.0, which doesn't compile without some additional patches. Reproducible: Always Steps to Reproduce:
Created attachment 207262 [details] Unfinished. It's unfinished. I will finish this later on, tomorrow perhaps. The cmake is now preferred build-system (by upstream) so we should use it too.
I think USE flag for jasper must be called 'jpeg2k', not 'jasper'. At least it is for opencv-1.0.0.
Also, please add 'examples' use flag or such: ... $(cmake-utils_use_build examples EXAMPLES)
You can have a look here, somebody already made an ebuild for OpenCV-2.0. http://www.mavrinac.com/index.cgi?page=gentoo. It is building correctly (included with ieee1394 useflag enbabled). A few things are still missing though (MMX/SSEx and other use flags, stripping optimizations flags when building the debug version...)
*** Bug 289301 has been marked as a duplicate of this bug. ***
Semen and C., yes I know, I didn't have time yesterday... and I agree.
Created attachment 207305 [details] Alternate ebuild I updated my ebuild to include some better USE flag usage from S. Suominen's ebuild - should be the best of both worlds now. Builds and works on my amd64 system. Note the -j1; I had problems previously (things building out of order) without it. Also, I did not include anything for a debug version (incl. stripping optimizations, per C. Paccolat), perhaps this should be considered? Sorry for the dupe at #289301, I typoed my search.
Thanks Aaron again. It's in portage.
Compilation fails for me with: make -j5 -j1 Scanning dependencies of target opencv_lapack [ 0%] Building C object 3rdparty/lapack/CMakeFiles/opencv_lapack.dir/dstein.o cc1: error: unrecognized command line option "-fopenmp" make[2]: *** [3rdparty/lapack/CMakeFiles/opencv_lapack.dir/dstein.o] Error 1 make[1]: *** [3rdparty/lapack/CMakeFiles/opencv_lapack.dir/all] Error 2 make: *** [all] Error 2 * ERROR: media-libs/opencv-2.0.0 failed: * Make failed! * * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3006: Called cmake-utils_src_compile * environment, line 803: Called cmake-utils_src_make * environment, line 884: Called die * The specific snippet of code: * emake "$@" || die "Make failed!"; * * If you need support, post the output of 'emerge --info =media-libs/opencv-2.0.0', * the complete build log and the output of 'emerge -pqv =media-libs/opencv-2.0.0'. * This ebuild is from an overlay: '/usr/local/portage-overlays/my/' * The complete build log is located at '/var/tmp/portage/media-libs/opencv-2.0.0/temp/build.log'. I'm still running on gcc-4.1.2. This lacks openmp.
I had exactly the same problem. I have fixed it with USE="-openmp". (In reply to comment #9) > Compilation fails for me with: > make -j5 -j1 > Scanning dependencies of target opencv_lapack > [ 0%] Building C object 3rdparty/lapack/CMakeFiles/opencv_lapack.dir/dstein.o > cc1: error: unrecognized command line option "-fopenmp" > make[2]: *** [3rdparty/lapack/CMakeFiles/opencv_lapack.dir/dstein.o] Error 1 > make[1]: *** [3rdparty/lapack/CMakeFiles/opencv_lapack.dir/all] Error 2 > make: *** [all] Error 2 > * ERROR: media-libs/opencv-2.0.0 failed: > * Make failed! > * > * Call stack: > * ebuild.sh, line 49: Called src_compile > * environment, line 3006: Called cmake-utils_src_compile > * environment, line 803: Called cmake-utils_src_make > * environment, line 884: Called die > * The specific snippet of code: > * emake "$@" || die "Make failed!"; > * > * If you need support, post the output of 'emerge --info > =media-libs/opencv-2.0.0', > * the complete build log and the output of 'emerge -pqv > =media-libs/opencv-2.0.0'. > * This ebuild is from an overlay: '/usr/local/portage-overlays/my/' > * The complete build log is located at > '/var/tmp/portage/media-libs/opencv-2.0.0/temp/build.log'. > > I'm still running on gcc-4.1.2. This lacks openmp. >