tags 653799 patch
thanks

Hi,

2012/1/9 Andreas Tille <andr...@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
diff --git a/debian/rules b/debian/rules
index 3a77152..47c7c15 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,7 +8,7 @@
 #export DH_VERBOSE=1
 
 override_dh_auto_configure:
-	dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH=/usr/lib/sitplus -DCMAKE_EXE_LINKER_FLAGS=-lboost_system
+	dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH=/usr/lib/sitplus -DCMAKE_EXE_LINKER_FLAGS=-lboost_system -DOpenCV_DIR=/usr/share/OpenCV/
 
 override_dh_auto_install:
 	dh_auto_install

Reply via email to