>>> Completed installing opencv-2.0.0-r1 into = /opt/gentoo/var/tmp/portage/media-libs/opencv-2.0.0-r1/image/opt/gentoo/ * QA Notice: Found .so dynamic libraries on Darwin: * opt/gentoo/usr/lib/python2.6/site-packages/cv.so * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/bin/opencv_createsamples * QA Notice: invalid reference to libcv.2.0.dylib in = /opt/gentoo/usr/bin/opencv_createsamples * QA Notice: invalid reference to libhighgui.2.0.dylib in = /opt/gentoo/usr/bin/opencv_createsamples * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/bin/opencv_haartraining * QA Notice: invalid reference to libcv.2.0.dylib in = /opt/gentoo/usr/bin/opencv_haartraining * QA Notice: invalid reference to libhighgui.2.0.dylib in = /opt/gentoo/usr/bin/opencv_haartraining * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/bin/opencv_performance * QA Notice: invalid reference to libcv.2.0.dylib in = /opt/gentoo/usr/bin/opencv_performance * QA Notice: invalid reference to libhighgui.2.0.dylib in = /opt/gentoo/usr/bin/opencv_performance * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/bin/opencv_traincascade * QA Notice: invalid reference to libcv.2.0.dylib in = /opt/gentoo/usr/bin/opencv_traincascade * QA Notice: invalid reference to libhighgui.2.0.dylib in = /opt/gentoo/usr/bin/opencv_traincascade * QA Notice: invalid reference to libml.2.0.dylib in = /opt/gentoo/usr/bin/opencv_traincascade * QA Notice: invalid self-reference install_name libcv.2.0.dylib in = /opt/gentoo/usr/lib/libcv.2.0.0.dylib * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/lib/libcv.2.0.0.dylib * QA Notice: invalid self-reference install_name libcvaux.2.0.dylib in = /opt/gentoo/usr/lib/libcvaux.2.0.0.dylib * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/lib/libcvaux.2.0.0.dylib * QA Notice: invalid reference to libcv.2.0.dylib in = /opt/gentoo/usr/lib/libcvaux.2.0.0.dylib * QA Notice: invalid reference to libhighgui.2.0.dylib in = /opt/gentoo/usr/lib/libcvaux.2.0.0.dylib * QA Notice: invalid reference to libml.2.0.dylib in = /opt/gentoo/usr/lib/libcvaux.2.0.0.dylib * QA Notice: invalid self-reference install_name libcxcore.2.0.dylib in = /opt/gentoo/usr/lib/libcxcore.2.0.0.dylib * QA Notice: invalid self-reference install_name libhighgui.2.0.dylib = in /opt/gentoo/usr/lib/libhighgui.2.0.0.dylib * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/lib/libhighgui.2.0.0.dylib * QA Notice: invalid reference to libcv.2.0.dylib in = /opt/gentoo/usr/lib/libhighgui.2.0.0.dylib * QA Notice: invalid self-reference install_name libml.2.0.dylib in = /opt/gentoo/usr/lib/libml.2.0.0.dylib * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/lib/libml.2.0.0.dylib * QA Notice: invalid self-reference install_name cv.so in = /opt/gentoo/usr/lib/python2.6/site-packages/cv.so * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/lib/python2.6/site-packages/cv.so * QA Notice: invalid reference to libcv.2.0.dylib in = /opt/gentoo/usr/lib/python2.6/site-packages/cv.so * QA Notice: invalid reference to libhighgui.2.0.dylib in = /opt/gentoo/usr/lib/python2.6/site-packages/cv.so * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/lib/python2.6/site-packages/opencv/_cv.bundle * QA Notice: invalid reference to libcv.2.0.dylib in = /opt/gentoo/usr/lib/python2.6/site-packages/opencv/_cv.bundle * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/lib/python2.6/site-packages/opencv/_highgui.bundle * QA Notice: invalid reference to libcv.2.0.dylib in = /opt/gentoo/usr/lib/python2.6/site-packages/opencv/_highgui.bundle * QA Notice: invalid reference to libhighgui.2.0.dylib in = /opt/gentoo/usr/lib/python2.6/site-packages/opencv/_highgui.bundle * QA Notice: invalid reference to libcxcore.2.0.dylib in = /opt/gentoo/usr/lib/python2.6/site-packages/opencv/_ml.bundle * QA Notice: invalid reference to libml.2.0.dylib in = /opt/gentoo/usr/lib/python2.6/site-packages/opencv/_ml.bundle * ERROR: media-libs/opencv-2.0.0-r1 failed: * invalid install_name found, your application or library will crash = at runtime *=20 * Call stack: * misc-functions.sh, line 1435: Called install_qa_check * misc-functions.sh, line 71: Called install_qa_check_macho * misc-functions.sh, line 752: Called die * The specific snippet of code: * hasq allow_broken_install_names ${FEATURES} || \ * die "invalid install_name found, your = application or library will crash at runtime" *=20 * If you need support, post the output of 'emerge --info = =3Dmedia-libs/opencv-2.0.0-r1', * the complete build log and the output of 'emerge -pqv = =3Dmedia-libs/opencv-2.0.0-r1'. * This ebuild is from an overlay named 'local-repo': = '/opt/gentoo/etc/portage/local/' * The complete build log is located at = '/opt/gentoo/var/tmp/portage/media-libs/opencv-2.0.0-r1/temp/build.log'. * The ebuild environment file is located at = '/opt/gentoo/var/tmp/portage/media-libs/opencv-2.0.0-r1/temp/environment'.= * S: = '/opt/gentoo/var/tmp/portage/media-libs/opencv-2.0.0-r1/work/OpenCV-2.0.0'= !!! post install failed; exiting. >>> Failed to emerge media-libs/opencv-2.0.0-r1, Log file: >>> = '/opt/gentoo/var/tmp/portage/media-libs/opencv-2.0.0-r1/temp/build.log' * Messages for package media-libs/opencv-2.0.0-r1: * ERROR: media-libs/opencv-2.0.0-r1 failed: * invalid install_name found, your application or library will crash = at runtime *=20 * Call stack: * misc-functions.sh, line 1435: Called install_qa_check * misc-functions.sh, line 71: Called install_qa_check_macho * misc-functions.sh, line 752: Called die * The specific snippet of code: * hasq allow_broken_install_names ${FEATURES} || \ * die "invalid install_name found, your = application or library will crash at runtime" *=20 * If you need support, post the output of 'emerge --info = =3Dmedia-libs/opencv-2.0.0-r1', * the complete build log and the output of 'emerge -pqv = =3Dmedia-libs/opencv-2.0.0-r1'. * This ebuild is from an overlay named 'local-repo': = '/opt/gentoo/etc/portage/local/' * The complete build log is located at = '/opt/gentoo/var/tmp/portage/media-libs/opencv-2.0.0-r1/temp/build.log'. * The ebuild environment file is located at = '/opt/gentoo/var/tmp/portage/media-libs/opencv-2.0.0-r1/temp/environment'.= * S: = '/opt/gentoo/var/tmp/portage/media-libs/opencv-2.0.0-r1/work/OpenCV-2.0.0'= Reproducible: Always Steps to Reproduce: 1. cd $EPREFIX/etc/portage/local 2. ecopy media-libs/opencv 3. emerge opencv
The build is based on cmake, which fails to set install_names properly. I don't understand enough of cmake to fix it, which means the only fix for now is an install_name_tool hack afterwards.
Created attachment 217881 [details, diff] python fixes patch by Gijs submitted upstream to solve python problems
I patched cmake a bit to default to an install_name for libraries, that should solve most of the invalid reference errors that Portage complains about.
Opencv doesnt' compile on a x86_64 mac osx, since it depends on Carbon... Contacted developers upstream to request usage of Cocoa .
with x86_64 mac osx I mean the x86_64-apple-darwin9 and x86_64-apple-darwin10 prefix
OpenCV is released today, it supports cocoa. I've made a ebuild for 2.1.0, and a patch to get it compiling on osx prefix, see attachments. It emerges, I still get a "invalid install_name found, your application or library will crash at runtime" at the end. This can be solved by disabling the python use flag. Don't know how to solve this (yet).
Created attachment 226767 [details] ebuild for opencv-2.1.0
Created attachment 226769 [details, diff] patch to get opencv-2.1.0 compiling on osx
we need 2.1.0 in gx86, can you request a bump?
(In reply to comment #9) > we need 2.1.0 in gx86, can you request a bump? Don't know how to do that, but isn't 313649 a bump? anyway, I'm getting this same error build fail again now with cmake-2.8.1-r2: * QA Notice: invalid reference to libcxcore.2.1.dylib in /Gentoo/usr/bin/opencv_createsamples * QA Notice: invalid reference to libcv.2.1.dylib in /Gentoo/usr/bin/opencv_createsamples * QA Notice: invalid reference to libhighgui.2.1.dylib in /Gentoo/usr/bin/opencv_createsamples * QA Notice: invalid reference to libtbb.dylib in /Gentoo/usr/bin/opencv_createsamples * QA Notice: invalid reference to libcxcore.2.1.dylib in /Gentoo/usr/bin/opencv_haartraining * QA Notice: invalid reference to libcv.2.1.dylib in /Gentoo/usr/bin/opencv_haartraining * QA Notice: invalid reference to libhighgui.2.1.dylib in /Gentoo/usr/bin/opencv_haartraining * QA Notice: invalid reference to libtbb.dylib in /Gentoo/usr/bin/opencv_haartraining * QA Notice: invalid reference to libcxcore.2.1.dylib in /Gentoo/usr/bin/opencv_performance * QA Notice: invalid reference to libcv.2.1.dylib in /Gentoo/usr/bin/opencv_performance * QA Notice: invalid reference to libhighgui.2.1.dylib in /Gentoo/usr/bin/opencv_performance * QA Notice: invalid reference to libtbb.dylib in /Gentoo/usr/bin/opencv_performance * QA Notice: invalid reference to libcxcore.2.1.dylib in /Gentoo/usr/bin/opencv_traincascade * QA Notice: invalid reference to libcv.2.1.dylib in /Gentoo/usr/bin/opencv_traincascade * QA Notice: invalid reference to libhighgui.2.1.dylib in /Gentoo/usr/bin/opencv_traincascade * QA Notice: invalid reference to libml.2.1.dylib in /Gentoo/usr/bin/opencv_traincascade * QA Notice: invalid reference to libtbb.dylib in /Gentoo/usr/bin/opencv_traincascade * QA Notice: invalid self-reference install_name libcv.2.1.dylib in /Gentoo/usr/lib/libcv.2.1.0.dylib * QA Notice: invalid reference to libtbb.dylib in /Gentoo/usr/lib/libcv.2.1.0.dylib * QA Notice: invalid reference to libcxcore.2.1.dylib in /Gentoo/usr/lib/libcv.2.1.0.dylib * QA Notice: invalid self-reference install_name libcvaux.2.1.dylib in /Gentoo/usr/lib/libcvaux.2.1.0.dylib * QA Notice: invalid reference to libtbb.dylib in /Gentoo/usr/lib/libcvaux.2.1.0.dylib * QA Notice: invalid reference to libcxcore.2.1.dylib in /Gentoo/usr/lib/libcvaux.2.1.0.dylib * QA Notice: invalid reference to libcv.2.1.dylib in /Gentoo/usr/lib/libcvaux.2.1.0.dylib * QA Notice: invalid reference to libhighgui.2.1.dylib in /Gentoo/usr/lib/libcvaux.2.1.0.dylib * QA Notice: invalid reference to libml.2.1.dylib in /Gentoo/usr/lib/libcvaux.2.1.0.dylib * QA Notice: invalid self-reference install_name libcxcore.2.1.dylib in /Gentoo/usr/lib/libcxcore.2.1.0.dylib * QA Notice: invalid reference to libtbb.dylib in /Gentoo/usr/lib/libcxcore.2.1.0.dylib * QA Notice: invalid self-reference install_name libhighgui.2.1.dylib in /Gentoo/usr/lib/libhighgui.2.1.0.dylib * QA Notice: invalid reference to libtbb.dylib in /Gentoo/usr/lib/libhighgui.2.1.0.dylib * QA Notice: invalid reference to libcxcore.2.1.dylib in /Gentoo/usr/lib/libhighgui.2.1.0.dylib * QA Notice: invalid reference to libcv.2.1.dylib in /Gentoo/usr/lib/libhighgui.2.1.0.dylib * QA Notice: invalid self-reference install_name libml.2.1.dylib in /Gentoo/usr/lib/libml.2.1.0.dylib * QA Notice: invalid reference to libtbb.dylib in /Gentoo/usr/lib/libml.2.1.0.dylib * QA Notice: invalid reference to libcxcore.2.1.dylib in /Gentoo/usr/lib/libml.2.1.0.dylib * ERROR: media-libs/opencv-2.1.0 failed: * invalid install_name found, your application or library will crash at runtime
Created attachment 257716 [details, diff] Patch to make cmake-utils properly set variables in OS X This fixes all the build errors and makes everything work great.
@kde is it ok to touch cmake-utils.eclass for Mike's patch?
In CVS, enjoy :)
seems this commit broke compilation for all prefix arches
CMake Error: Error in cmake code at /Volumes/Scratch/gentoo/var/tmp/portage/dev-util/cmake-2.8.3-r1/temp/gentoo_rules.cmake:23: Parse error. Function missing ending ")". Instead found unterminated string with text " FORCE) ENDIF (NOT APPLE) ". CMake Error at Modules/CMakeCInformation.cmake:79 (INCLUDE): include could not find load file: /Volumes/Scratch/gentoo/var/tmp/portage/dev-util/cmake-2.8.3-r1/temp/gentoo_rules.cmake Call Stack (most recent call first): CMakeLists.txt:13 (PROJECT)
There's a stray quote in the file on line 18 (when it sets CMAKE_INSTALL_RPATH): SET(CMAKE_INSTALL_RPATH <prefix>/usr/lib;<prefix>/usr/<target-triple>/lib/gcc;<prefix>/usr/<target-triple>/lib;<prefix>/usr/lib;<prefix>/lib"CACHE STRING "" FORCE) ^ Putting the missing quote at the beginning should make it work.
Fabian, feel free to test and commit the fix that Charles proposed (which makes absolute sense)
I just committed the fix