Bug 1031312 - OpenCV cmake configuration broken
Summary: OpenCV cmake configuration broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: opencv
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-16 18:57 UTC by nucleo
Modified: 2013-12-14 03:22 UTC (History)
8 users (show)

Fixed In Version: frei0r-plugins-1.4-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-14 03:22:19 UTC


Attachments (Terms of Use)

Description nucleo 2013-11-16 18:57:50 UTC
Description of problem:
digiKam build failed.

Version-Release number of selected component (if applicable):
opencv-2.4.7-1.fc21

Actual results:
-- First try at finding OpenCV...
CMake Error at /usr/lib/cmake/OpenCV/OpenCVModules.cmake:108 (message):
  The imported target "opencv_core" references the file
     "/usr/lib/lib/libopencv_core.so.2.4.7"
  but this file does not exist.  Possible reasons include:
  * The file was deleted, renamed, or moved to another location.
  * An install or uninstall procedure did not complete successfully.
  * The installation package was faulty and contained
     "/usr/lib/cmake/OpenCV/OpenCVModules.cmake"
  but not all the files it references.
Call Stack (most recent call first):
  /usr/lib/cmake/OpenCV/OpenCVConfig.cmake:44 (include)
  extra/libkface/CMakeLists.txt:61 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/builddir/build/BUILD/digikam-3.5.0/i686-redhat-linux-gnu/CMakeFiles/CMakeOutput.log".
See also "/builddir/build/BUILD/digikam-3.5.0/i686-redhat-linux-gnu/CMakeFiles/CMakeError.log".
RPM build errors:

Comment 1 nucleo 2013-11-16 21:06:35 UTC
Builds fine with opencv-2.4.6.1-1.fc20

-- First try at finding OpenCV...
-- Great, found OpenCV on the first try.
-- OpenCV Root directory is: /usr/lib/cmake/OpenCV
-- OpenCV: Found version 2.4.6.1 (required: 2.4.5)

Comment 2 Nicolas Chauvet (kwizart) 2013-11-17 12:05:52 UTC
The file OpenCVModules-releasewithdebinfo.cmake looks correct to me on x86_64:

OpenCVModules-releasewithdebinfo.cmake:  IMPORTED_LOCATION_RELEASEWITHDEBINFO "${_IMPORT_PREFIX}/lib64/libopencv_core.so.2.4.7"

Unless _IMPORT_PREFIX is set to something else than /usr...
I'm not as at all comfortable with cmake mess, I've only tested freir0-plugins and vlc which doesn't rely on cmake.

Comment 3 nucleo 2013-11-17 12:11:11 UTC
Problem in libdir added twice /usr/lib/lib/libopencv_core.so.2.4.7.
Maybe _IMPORT_PREFIX also have /lib?

Comment 4 Rex Dieter 2013-11-17 14:03:51 UTC
Building on x86_64 f20 gives similar but different error,

CMake Error at /lib64/cmake/OpenCV/OpenCVModules.cmake:108 (message):
  The imported target "opencv_core" references the file

     "/lib64/lib64/libopencv_core.so.2.4.7"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/lib64/cmake/OpenCV/OpenCVModules.cmake"


I suspect this has something to do with UsrMove and faulty relative path calculations.

Comment 5 Rex Dieter 2013-11-17 14:07:02 UTC
orion, any insight/clues to the cmake bogosity going on here?

Comment 6 Rex Dieter 2013-11-17 15:00:36 UTC
After downgrading to opencv-2.4.6.1-1.fc20.x86_64 , I see the build still fail.

Checking koji, the last successful digikam build used
cmake-2.8.11.2-3.fc20 (and opencv-2.4.6.1-1.fc20)

and now is failing with:
cmake-2.8.12.1-1.fc20 (and opencv-2.4.6.1-1.fc20 or opencv-2.4.7-1.fc20)

Seems something went bad between cmake-2.8.11.2-3 and cmake-2.8.12.1-1, reassigning to cmake (for now).

Comment 7 nucleo 2013-11-17 22:07:12 UTC
Last successful build digikam-3.5.0-1.fc21 used cmake-2.8.12-1.fc21 and opencv-2.4.6.1-2.fc21
http://koji.fedoraproject.org/koji/buildinfo?buildID=470314

Comment 8 nucleo 2013-11-17 22:21:13 UTC
Changes after cmake-2.8.12-1.fc21

* Wed Nov 06 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12.1-1 
- Update to 2.8.12.1 

* Wed Oct 23 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12-3 
- Remove UseQt4 automatic dependency adding 

* Thu Oct 10 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12-2 
- Autoload cmake-mode in emacs (bug #1017779)

Comment 9 Rex Dieter 2013-11-18 17:17:49 UTC
I think the opencv cmake path munging is a source of possible problems:

#Cmake mess
mkdir -p  $RPM_BUILD_ROOT%{_libdir}/cmake/OpenCV
mv $RPM_BUILD_ROOT%{_datadir}/OpenCV/*.cmake \
  $RPM_BUILD_ROOT%{_libdir}/cmake/OpenCV


moving these .cmake files (back) to /usr/share/OpenCV/ or %_libdir/OpenCV/  and things work again.

Comment 10 Honza Horak 2013-11-18 17:31:41 UTC
(In reply to Rex Dieter from comment #9)
> moving these .cmake files (back) to /usr/share/OpenCV/ or %_libdir/OpenCV/ 
> and things work again.

We shouldn't use /usr/share since that would make opencv-devel multilib unclean, i.e. it wouldn't be possible to install 32bit and 64bit arch on one machine. So, in case %_libdir/OpenCV/ works, we should take this one.

Comment 11 Orion Poplawski 2013-11-18 17:46:31 UTC
Yeah, don't ever move files in %install with cmake builds - you'll break things.  Get cmake to install them in the desired location.

Comment 12 Rex Dieter 2013-11-18 18:23:26 UTC
Looks like these end up on OPENCV_CONFIG_INSTALL_PATH , which gets set with this ... interesting... logic:

  math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}")
  if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX)
    set(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/cmake/opencv)
  else()
    set(OPENCV_CONFIG_INSTALL_PATH share/OpenCV)
  endif()

(where we know the former kinda doesn't work)

Comment 13 Rex Dieter 2013-11-18 20:31:42 UTC
http://pkgs.fedoraproject.org/cgit/opencv.git/commit/?id=85dcc3a0ce55e5781fc670381996af2b43b38e8d

%changelog
* Mon Nov 18 2013 Rex Dieter <rdieter@fedoraproject.org> 2.4.7-2
- OpenCV cmake configuration broken (#1031312)

let's give this a try,
http://koji.fedoraproject.org/koji/taskinfo?taskID=6195036

Comment 14 nucleo 2013-11-18 21:56:56 UTC
(In reply to Rex Dieter from comment #13)
> http://koji.fedoraproject.org/koji/taskinfo?taskID=6195036

It builds now.

-- First try at finding OpenCV...
-- Great, found OpenCV on the first try.
-- OpenCV Root directory is: /usr/lib/OpenCV
-- OpenCV: Found version 2.4.7 (required: 2.4.5)

Comment 15 nucleo 2013-11-19 12:41:45 UTC
New opencv build also needed for F20 update
https://admin.fedoraproject.org/updates/FEDORA-2013-21444

Comment 16 Fedora Update System 2013-11-19 20:03:53 UTC
frei0r-plugins-1.4-1.fc20, opencv-2.4.7-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2013-21444/opencv-2.4.7-2.fc20,frei0r-plugins-1.4-1.fc20

Comment 17 Fedora Update System 2013-11-24 04:01:48 UTC
Package frei0r-plugins-1.4-1.fc20, opencv-2.4.7-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing frei0r-plugins-1.4-1.fc20 opencv-2.4.7-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-21444/opencv-2.4.7-2.fc20,frei0r-plugins-1.4-1.fc20
then log in and leave karma (feedback).

Comment 18 Christopher Meng 2013-11-24 04:09:41 UTC
Can someone re add +1 to the update? We don't have too much time before f20 freeze.

Thanks.

Comment 19 Fedora Update System 2013-12-14 03:22:19 UTC
frei0r-plugins-1.4-1.fc20, opencv-2.4.7-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.