graphics/opencv: on CURRENT (r255472): c++ issue resulting in: error: use of undeclared identifier 'usleep' usleep(1000); ^ 1 error
Rainer Hurling
rhurlin at gwdg.de
Mon Oct 7 15:04:48 UTC 2013
Maintainer CC'ed
Am 11.09.2013 17:41 (UTC+1) schrieb O. Hartmann:
> Recompiling everything installed due to the iconv-issue and the
> extraction of the GNUish libstdc++ in favor of the new libc++, I run
> permanently into the problem of a compiler (c++) stopp at
> graphics/opencv due to the error shown below.
>
> I'm getting crazy here, since I have successfully compiled opencv on
> two other boxes running the most recent CURRENT with no libstdc++ and
> no converters/libiconv any more.
>
> Doing
>
> portmaster -f graphics/opencv
>
> results in getting everything built, except graphics/opencv!
>
> graphics/opencv seems to be a prerequisite for the build of
> devel/kdevelop-kde4, which also is a stopgap at the moment and is very
> resiliant in getting compiled.
>
> Can someone shed light and hints onto this?
>
> Thanks in advance,
> Oliver
>
>
> [...]
> /usr/local/include/libavformat/avformat.h:1578:26: note:
> 'av_write_header' declared here attribute_deprecated int
> av_write_header(AVFormatContext *s); ^
> 12 warnings generated.
> [ 2%] 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 [ 3%]
> Building CXX object
> modules/highgui/CMakeFiles/opencv_highgui.dir/src/window.o [ 3%]
> 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); ^ 1 error
> generated. *** Error code 1
>
This error can be avoided by using the patch of PR 182443,
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182443 .
After that, another error occured at least on my very recent
10.0-CURRENT clang boxes:
[..SNIP..]
Scanning dependencies of target opencv_python
[ 53%] Building CXX object
modules/python/CMakeFiles/opencv_python.dir/src2/cv2.o
In file included from
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cpp:9:
In file included from
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728:
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning:
"Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
[-W#warnings]
#warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
^
In file included from
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cpp:900:
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cv.hpp:2172:12:
error: C-style cast
from 'nullptr_t' to 'CvNextEdgeType' is not allowed
*dst = (CvNextEdgeType)NULL;
^~~~~~~~~~~~~~~~~~~~
In file included from
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cpp:900:
In file included from
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cv.hpp:3871:
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/generated0.i:2387:1:
warning: cast to
'_object *' from smaller integer type 'int' [-Wint-to-pointer-cast]
CVPY_VALIDATE_DrawChessboardCorners();
^
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cv.hpp:3832:12:
note: expanded from
macro 'CVPY_VALIDATE_DrawChessboardCorners'
return (PyObject*)failmsg("Size is %dx%d, but corner list is length
%d", patternSize.width, ...
^
In file included from
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cpp:900:
In file included from
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cv.hpp:3871:
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/generated0.i:6440:11:
warning: cast to
'_object *' from smaller integer type 'int' [-Wint-to-pointer-cast]
ERRWRAP(cvSnakeImage(image, points.p,points.count, alpha.f, beta.f,
gamma.f, win, criteria, ca...
^
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cv.hpp:3851:14:
note: expanded from
macro 'cvSnakeImage'
return (PyObject*)failmsg("SnakeImage weights invalid"); \
^
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cv.hpp:158:29:
note: expanded from
macro 'ERRWRAP'
#define ERRWRAP(F) ERRWRAPN(F, NULL) // for most functions, exception ->
NULL return
^
/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cv.hpp:149:13:
note: expanded from
macro 'ERRWRAPN'
F; \
^
3 warnings and 1 error generated.
*** Error code 1
Stop.
make[4]: stopped in /usr/ports/graphics/opencv/work/OpenCV-2.3.1
*** Error code 1
I am pretty helpless with this 'C-style cast error'. Any hints are
really appreciated.
Thanks in advance,
Rainer Hurling
More information about the freebsd-ports
mailing list