[Debian-med-packaging] Bug#653799: FTBFS: CMake Error at cmake_modules/FindOpenCV.cmake:77 (file): file STRINGS file "/usr/include/opencv/cvver.h" cannot be read.

Nobuhiro Iwamatsu iwamatsu at debian.org
Wed Feb 1 19:06:12 UTC 2012


tags 653799 patch
thanks

Hi,

2012/1/9 Andreas Tille <andreas at an3as.eu>:
> Hi,
>
> On Fri, Dec 30, 2011 at 07:08:09PM -0600, Steve M. Robbins wrote:
>> Source: sitplus
>> Version: 1.0.1-2
>> Severity: serious
>> Justification: fails to build from source
>>
>> Package failed to build in a clean sid chroot:
>>
>> -- checking for one of the modules 'glib-2.0'
>> -- Found GLib2: glib-2.0 /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include
>> -- Looking for include files HAVE_GLIB_GREGEX_H
>> -- Looking for include files HAVE_GLIB_GREGEX_H - found
>
> The old build log continued like this:
>
> -- OpenCV_FOUND. true
> -- OpenCV_LIBS. /usr/lib/libcxcore.so;/usr/lib/libcv.so;/usr/lib/libml.so;/usr/lib/libhighgui.so;/usr/lib/libcvaux.so
> -- OpenCV_INCLUDE_DIR. /usr/include/opencv
>
>
>> CMake Error at cmake_modules/FindOpenCV.cmake:77 (file):
>>   file STRINGS file "/usr/include/opencv/cvver.h" cannot be read.
>> Call Stack (most recent call first):
>>   src/creavision/CMakeLists.txt:57 (FIND_PACKAGE)
>>
>>
>> CMake Error at cmake_modules/FindOpenCV.cmake:78 (string):
>>   string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
>>   command.
>
> I noticed that the new version of libcv-dev in unstable is lacking the
> header file in question.  So I'm CCing the maintainer as well as
> debian-mentors in case I can get any other help how to fix this problem.
>

I checked this bug.
Because "/usr" is set to OpenCV_DIR,
/usr/share/OpenCV/OpenCVConfig.cmake file has not been read.
Moreover, when there is no /usr/OpenCVConfig.cmake, another checking
is executed, but only old opencv
corresponds.
The problem in which the check of OpenCV fails is solved by specifying
OpenCV_DIR.
I attach a patch.

But if you will apply this patch,  it becomes an error in other portions.

-----
[ 55%] Building CXX object
src/mod_camera/tests/CMakeFiles/test_mod_camera_gui.dir/test_mod_camera_gui.cpp.o
Linking CXX executable ../../../bin/test_mod_camera_gui
../../../bin/libmod_camera.so: undefined reference to `cvLoadImage'
../../../bin/libmod_camera.so: undefined reference to `cvConvertImage'
../../../bin/libmod_camera.so: undefined reference to `cvReleaseImage'
../../../bin/libmod_camera.so: undefined reference to `cvReleaseImageHeader'
../../../bin/libmod_camera.so: undefined reference to `cvSetZero'
../../../bin/libmod_camera.so: undefined reference to `cvLine'
../../../bin/libmod_camera.so: undefined reference to `cvGetRawData'
../../../bin/libmod_camera.so: undefined reference to `cvGetErrStatus'
../../../bin/libmod_camera.so: undefined reference to `cvSaveImage'
../../../bin/libmod_camera.so: undefined reference to `cvCopy'
../../../bin/libmod_camera.so: undefined reference to `cvFlip'
../../../bin/libmod_camera.so: undefined reference to `cvNamedWindow'
../../../bin/libmod_camera.so: undefined reference to `cvCircle'
../../../bin/libmod_camera.so: undefined reference to `cvShowImage'
../../../bin/libmod_camera.so: undefined reference to `cvRectangle'
../../../bin/libmod_camera.so: undefined reference to `cvResize'
../../../bin/libmod_camera.so: undefined reference to `cvCreateData'
../../../bin/libmod_camera.so: undefined reference to `cvCreateImageHeader'
collect2: ld returned 1 exit status
-----

Best regards,
  Nobuhiro

-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sitplus-1.0.1.patch
Type: text/x-patch
Size: 514 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20120202/f6e8c2fe/attachment-0001.bin>


More information about the Debian-med-packaging mailing list