Date: Tue, 22 Oct 2013 08:06:59 -0400 From: "Jason E. Hale" <jhale@freebsd.org> To: Andriy Gapon <avg@freebsd.org> Cc: multimedia@freebsd.org Subject: Re: graphics/opencv dependency on ffmpeg is broken by multimedia/ffmpeg upgrade Message-ID: <2314566.Zj2vrhLriv@mocha.verizon.net> In-Reply-To: <52666426.5020607@FreeBSD.org> References: <5263F447.40705@FreeBSD.org> <5645227.Ty1j0Gy4S8@mocha.verizon.net> <52666426.5020607@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Tuesday, October 22, 2013 14:40:22 Andriy Gapon wrote:
> >
> > I committed the patch along with a few other changes in r331209. Thanks!
>
> Thank you!
>
> Still the build failed in my environment:
> /usr/obj/ports/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/contrib/s
> rc/spinimages.cpp: In member function 'void
> cv::SpinImageModel::selectRandomSubset(float)':
> /usr/obj/ports/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/contrib/
> src/spinimages.cpp:793:45: error: call of overloaded
> 'iota(std::vector<int>::iterator,
> std::vector<int>::iterator, int)' is ambiguous
> iota(subset.begin(), subset.end(), 0);
>
> /usr/obj/ports/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/contrib/s
> rc/spinimages.cpp:793:45: note: candidates are:
> /usr/obj/ports/usr/ports/graphics/opencv/work/OpenCV-2.3.1/modules/contrib/s
> rc/spinimages.cpp:88:36: note: void {anonymous}::iota(FwIt, FwIt, T) [with
> FwIt =
> __gnu_cxx::__normal_iterator<int*, std::vector<int> >; T = int]
> template<class FwIt, class T> void iota(FwIt first, FwIt last, T value) {
> while(first != last) *first++ = value++; }
>
> /usr/local/lib/gcc48/include/c++/bits/stl_numeric.h:82:5: note: void
> std::iota(_ForwardIterator, _ForwardIterator, _Tp) [with _ForwardIterator =
> __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Tp = int]
> iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
>
> The problem seems to be that Makefile has USE_CXXSTD=gnu++11 and C++11
> already includes std::iota: http://en.cppreference.com/w/cpp/algorithm/iota
> But spinimages.cpp defines another iota with exactly the same signature.
I am working on getting opencv updated to 2.4.6.1, and it looks that function
has been renamed. In the meantime, could you see if the attached patch helps
(includes a few Makefile typo fixes)?
--
Jason E. Hale - jhale@
FreeBSD Ports Committer
KDE/FreeBSD Team
[-- Attachment #2 --]
Index: Makefile
===================================================================
--- Makefile (revision 331209)
+++ Makefile (working copy)
@@ -41,7 +41,7 @@
PORTDOCS= *
-OPTIONS_DEFINE= EIGEN2 FFMPEG GSTREAMER GTK2 JASPER JPEG OPENEXR PNG \
+OPTIONS_DEFINE= EIGEN3 FFMPEG GSTREAMER GTK2 JASPER JPEG OPENEXR PNG \
QT4 TBB TIFF V4L XINE EXAMPLES
OPTIONS_DEFAULT= EIGEN3 JASPER JPEG PNG TIFF V4L
@@ -48,7 +48,7 @@
EIGEN3_DESC= Eigen 3 support
EIGEN3_BUILD_DEPENDS= ${LOCALBASE}/include/eigen3/Eigen/Eigen:${PORTSDIR}/math/eigen3
EIGEN3_CMAKE_ON= -DWITH_EIGEN:BOOL=On
-EIGEN3_CMAKE_OFF= -DDWITH_EIGEN:BOOL=Off
+EIGEN3_CMAKE_OFF= -DWITH_EIGEN:BOOL=Off
FFMPEG_LIB_DEPENDS= libavcodec0.so:${PORTSDIR}/multimedia/ffmpeg0
FFMPEG_CMAKE_ON= -DWITH_FFMPEG:BOOL=On
@@ -143,7 +143,7 @@
CMAKE_ARGS+= -DBUILD_EXAMPLES:BOOL=Off \
-DINSTALL_PYTHON_EXAMPLES:BOOL=Off \
-DBUILD_TESTS:BOOL=Off \
- -DDWITH_EIGEN2:BOOL=Off \
+ -DWITH_EIGEN:BOOL=Off \
-DWITH_FFMPEG:BOOL=Off \
-DWITH_GSTREAMER:BOOL=Off \
-DWITH_GTK:BOOL=Off \
Index: files/patch-modules__contrib__src__spinimages.cpp
===================================================================
--- files/patch-modules__contrib__src__spinimages.cpp (revision 0)
+++ files/patch-modules__contrib__src__spinimages.cpp (working copy)
@@ -0,0 +1,37 @@
+--- ./modules/contrib/src/spinimages.cpp.orig 2013-10-22 07:55:31.000000000 -0400
++++ ./modules/contrib/src/spinimages.cpp 2013-10-22 07:55:51.000000000 -0400
+@@ -85,7 +85,7 @@
+ };
+ size_t colors_mum = sizeof(colors)/sizeof(colors[0]);
+
+-template<class FwIt, class T> void iota(FwIt first, FwIt last, T value) { while(first != last) *first++ = value++; }
++template<class FwIt, class T> void _iota(FwIt first, FwIt last, T value) { while(first != last) *first++ = value++; }
+
+ void computeNormals( const Octree& Octree, const vector<Point3f>& centers, vector<Point3f>& normals,
+ vector<uchar>& mask, float normalRadius, int minNeighbors = 20)
+@@ -790,14 +790,14 @@
+ else if (setSize == vtxSize)
+ {
+ subset.resize(vtxSize);
+- iota(subset.begin(), subset.end(), 0);
++ _iota(subset.begin(), subset.end(), 0);
+ }
+ else
+ {
+ RNG& rnd = theRNG();
+
+ vector<size_t> left(vtxSize);
+- iota(left.begin(), left.end(), (size_t)0);
++ _iota(left.begin(), left.end(), (size_t)0);
+
+ subset.resize(setSize);
+ for(size_t i = 0; i < setSize; ++i)
+@@ -870,7 +870,7 @@
+ {
+ mesh.computeNormals(normalRadius, minNeighbors);
+ subset.resize(mesh.vtx.size());
+- iota(subset.begin(), subset.end(), 0);
++ _iota(subset.begin(), subset.end(), 0);
+ }
+ else
+ mesh.computeNormals(subset, normalRadius, minNeighbors);
Property changes on: files/patch-modules__contrib__src__spinimages.cpp
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2314566.Zj2vrhLriv>
