Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 298121 - prefix fix for cmake-utils.eclass
Summary: prefix fix for cmake-utils.eclass
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 350523
  Show dependency tree
 
Reported: 2009-12-23 17:04 UTC by Gijs Molenaar
Modified: 2011-01-13 19:17 UTC (History)
2 users (show)

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


Attachments
python fixes (cmake.patch,1.54 KB, patch)
2010-01-29 20:52 UTC, Fabian Groffen
Details | Diff
ebuild for opencv-2.1.0 (opencv-2.1.0.ebuild,2.21 KB, text/plain)
2010-04-06 20:58 UTC, Gijs Molenaar
Details
patch to get opencv-2.1.0 compiling on osx (opencv-2.1.0-osx.patch,1.40 KB, patch)
2010-04-06 20:58 UTC, Gijs Molenaar
Details | Diff
Patch to make cmake-utils properly set variables in OS X (cmake-utils.eclass.patch,1.05 KB, patch)
2010-12-21 22:44 UTC, Mike Lewis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gijs Molenaar 2009-12-23 17:04:35 UTC
>>> 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
Comment 1 Fabian Groffen gentoo-dev 2010-01-24 11:53:27 UTC
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.
Comment 2 Fabian Groffen gentoo-dev 2010-01-29 20:52:33 UTC
Created attachment 217881 [details, diff]
python fixes

patch by Gijs submitted upstream to solve python problems
Comment 3 Fabian Groffen gentoo-dev 2010-01-31 20:39:46 UTC
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.
Comment 4 Gijs Molenaar 2010-02-11 12:47:38 UTC
Opencv doesnt' compile on a x86_64 mac osx, since it depends on Carbon... Contacted developers upstream to request usage of Cocoa .
Comment 5 Gijs Molenaar 2010-02-11 12:51:17 UTC
with x86_64 mac osx I mean the x86_64-apple-darwin9  and x86_64-apple-darwin10 prefix
Comment 6 Gijs Molenaar 2010-04-06 20:56:58 UTC
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).
Comment 7 Gijs Molenaar 2010-04-06 20:58:09 UTC
Created attachment 226767 [details]
ebuild for opencv-2.1.0
Comment 8 Gijs Molenaar 2010-04-06 20:58:44 UTC
Created attachment 226769 [details, diff]
patch to get opencv-2.1.0 compiling on osx
Comment 9 Fabian Groffen gentoo-dev 2010-04-26 18:27:49 UTC
we need 2.1.0 in gx86, can you request a bump?
Comment 10 Gijs Molenaar 2010-06-20 13:56:40 UTC
(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
Comment 11 Mike Lewis 2010-12-21 22:44:27 UTC
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.
Comment 12 Fabian Groffen gentoo-dev 2010-12-24 08:36:34 UTC
@kde is it ok to touch cmake-utils.eclass for Mike's patch?
Comment 13 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2010-12-30 14:23:11 UTC
In CVS, enjoy :)
Comment 14 Fabian Groffen gentoo-dev 2011-01-05 09:28:03 UTC
seems this commit broke compilation for all prefix arches
Comment 15 Fabian Groffen gentoo-dev 2011-01-05 09:36:20 UTC
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)

Comment 16 Charles Davis 2011-01-09 23:15:35 UTC
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.
Comment 17 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2011-01-11 01:41:37 UTC
Fabian, feel free to test and commit the fix that Charles proposed (which makes absolute sense)
Comment 18 Fabian Groffen gentoo-dev 2011-01-13 19:17:55 UTC
I just committed the fix