Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Oct 2013 17:30:39 GMT
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/182837: [PATCH] graphics/openv fails build on CURRENT
Message-ID:  <201310081730.r98HUdP4072142@oldred.freebsd.org>
Resent-Message-ID: <201310081740.r98He0FV049247@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         182837
>Category:       ports
>Synopsis:       [PATCH] graphics/openv fails build on CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 08 17:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Pawel Pekala
>Release:        10.0-CURRENT
>Organization:
>Environment:
FreeBSD blaviken.slowicza.org 10.0-ALPHA5 FreeBSD 10.0-ALPHA5 #0 r256150M: Tue Oct  8 17:10:26 CEST 2013     corn@blaviken.slowicza.org:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Build fails on latest CURRENT, attached patch fixes issue for me.

[ 55%] Building CXX object modules/python/CMakeFiles/opencv_python.dir/src2/cv2.o
cd /usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python && /usr/bin/c++   -DHAVE_CVCONFIG_H -Dopencv_python_EXPORTS -O2 -pipe -fno-strict-aliasing -Wno-error -Wno-c++11-narrowing -std=gnu++11   -O2 -pipe -fno-strict-aliasing -Wno-error -Wno-c++11-narrowing -std=gnu++11   -fPIC -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/eigen2 -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/. -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1 -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/include/opencv -I/usr/local/include/python2.7 -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2 -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/core/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/flann/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/imgproc/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/video/include -I/usr/ports/graphics/opencv/work/Ope
 nCV-2.3.1/modules/highgui/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/ml/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/features2d/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/calib3d/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/objdetect/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/legacy/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/contrib/include -I/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python    -D PYTHON_USE_NUMPY=1 -o CMakeFiles/opencv_python.dir/src2/cv2.o -c /usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/python/src2/cv2.cpp
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 ...
 ^
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;
           ^~~~~~~~~~~~~~~~~~~~

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN /usr/ports/graphics/opencv/files/patch-modules-python-src2-cv2.cv.hpp graphics/opencv/files/patch-modules-python-src2-cv2.cv.hpp
--- /usr/ports/graphics/opencv/files/patch-modules-python-src2-cv2.cv.hpp	1970-01-01 01:00:00.000000000 +0100
+++ graphics/opencv/files/patch-modules-python-src2-cv2.cv.hpp	2013-10-08 00:20:06.000000000 +0200
@@ -0,0 +1,11 @@
+--- modules/python/src2/cv2.cv.hpp.orig	2013-10-07 23:38:46.000000000 +0200
++++ modules/python/src2/cv2.cv.hpp	2013-10-08 00:09:20.000000000 +0200
+@@ -2169,7 +2169,7 @@
+ static int convert_to_CvNextEdgeType(PyObject *o, CvNextEdgeType *dst, const char *name = "no_name")
+ {
+   if (!PyInt_Check(o)) {
+-    *dst = (CvNextEdgeType)NULL;
++    *dst = (CvNextEdgeType)0;
+     return failmsg("Expected number for CvNextEdgeType argument '%s'", name);
+   } else {
+     *dst = (CvNextEdgeType)PyInt_AsLong(o);


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310081730.r98HUdP4072142>