ports/182443: graphics/opencv:

O. Hartmann ohartman at zedat.fu-berlin.de
Fri Sep 27 12:50:01 UTC 2013


>Number:         182443
>Category:       ports
>Synopsis:       graphics/opencv:
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 27 12:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     O. Hartmann
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
FU Berlin
>Environment:
FreeBSD 10.0-ALPHA2 #0 r255817: Mon Sep 23 18:35:39 CEST 2013 amd64
>Description:
The port graphics/opencv fails on CURRENT with the following error message:

[...]
12 warnings generated.
[  1%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/loadsave.o
[  2%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/precomp.o
[  2%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/utils.o
[  2%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window.o
[  2%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.o
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/highgui/src/window_QT.cpp:316:5: error: use of undeclared identifier 'usleep'
                                usleep(1000);

>How-To-Repeat:
Install graphics/opencv on 10.0-CURRENT.
>Fix:
After patching and after the error occurs, patch manually the file

modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp

via

--- work/OpenCV-2.3.1/modules/highgui/src/window_QT.cpp.orig    2013-09-27 14:38:36.000000000 +0200
+++ work/OpenCV-2.3.1/modules/highgui/src/window_QT.cpp 2013-09-27 14:39:21.000000000 +0200
@@ -46,6 +46,8 @@
 #ifdef _WIN32
 #include <windows.h>
 #define usleep Sleep
+#else
+#include <unistd.h>
 #endif
 
 #ifndef M_PI


This patch was suggested by T. Nackos via eMail. I tried to patch via a patchfile, but since the C++ sourcefile is obviously created dynamically, it fails.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list