From: David Southwell on
Hi
opencv build failure

See ***failure*** below

NOTE early in compile a syntax error is reported

see ***syntax_error*** below

Thanks in advance for suggestions on how to fix this one.

David
_________________________________
***failure***
___________________________________
[ 84%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/cvfindface.o
[ 84%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/cvba.o
[ 84%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/cvbgfg_acmmm2003.o
[ 84%] Building CXX object
src/cvaux/CMakeFiles/cvaux.dir/cvadaptiveskindetector.o
[ 84%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/cvcorrimages.o
[ 84%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/cvsubdiv2.o
[ 84%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/cvhmm.o
[ 85%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/cvoneway.o
[ 85%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/cvmat.o
[ 85%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/cvfacetemplate.o
[ 85%] Building CXX object src/cvaux/CMakeFiles/cvaux.dir/cvaux.o
Linking CXX shared library ../../lib/libcvaux.so
[ 85%] Built target cvaux
1 error
*** Error code 2
1 error
*** Error code 1

Stop in /usr/ports/graphics/opencv.
*** Error code 1

Stop in /usr/ports/graphics/opencv.

__________________________________
***syntax_error***
___________________________________
[ 72%] Building CXX object src/highgui/CMakeFiles/highgui.dir/grfmt_imageio.o
[ 72%] Building CXX object src/highgui/CMakeFiles/highgui.dir/grfmt_pxm.o
Linking CXX shared library ../../lib/libhighgui.so
[ 73%] Built target highgui
[ 73%] Generating generated0.i
File
"/usr/ports/graphics/opencv/work/OpenCV-2.0.0/interfaces/python/gen.py", line
167
print "Tuple with kwargs is not allowed, function", name
^
SyntaxError: invalid syntax
*** Error code 1
1 error
*** Error code 2
Scanning dependencies of target cvhaartraining
[ 73%] Building CXX object
apps/haartraining/CMakeFiles/cvhaartraining.dir/cvboost.o
[ 73%] Building CXX object
apps/haartraining/CMakeFiles/cvhaartraining.dir/cvcommon.o
[ 74%] Building CXX object
apps/haartraining/CMakeFiles/cvhaartraining.dir/cvhaarclassifier.o
Scanning dependencies of target cvaux
[ 74%] Building CXX object
src/cvaux/CMakeFiles/cvaux.dir/vs/blobtrackanalysistrackdist.o
[ 74%] Building CXX object
src/cvaux/CMakeFiles/cvaux.dir/vs/blobtrackanalysishist.o


Photographic Artist
Permanent Installations & Design
Creative Imagery and Advanced Digital Techniques
High Dynamic Range Photography & Official Portraiture
Combined darkroom & digital creations
& Systems Adminstrator for the vizion2000.net network
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Anonymous on
David Southwell <david(a)vizion2000.net> writes:

> [ 72%] Building CXX object src/highgui/CMakeFiles/highgui.dir/grfmt_imageio.o
> [ 72%] Building CXX object src/highgui/CMakeFiles/highgui.dir/grfmt_pxm.o
> Linking CXX shared library ../../lib/libhighgui.so
> [ 73%] Built target highgui
> [ 73%] Generating generated0.i
> File
> "/usr/ports/graphics/opencv/work/OpenCV-2.0.0/interfaces/python/gen.py", line
> 167
> print "Tuple with kwargs is not allowed, function", name
> ^
> SyntaxError: invalid syntax

Looks like a typical error when code intended for python2.x is run on python3.x.
It's easy to fix, just enclose `print' arguments in braces.
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: David Southwell on
> David Southwell <david(a)vizion2000.net> writes:
> > [ 72%] Building CXX object
> > src/highgui/CMakeFiles/highgui.dir/grfmt_imageio.o [ 72%] Building CXX
> > object src/highgui/CMakeFiles/highgui.dir/grfmt_pxm.o Linking CXX shared
> > library ../../lib/libhighgui.so
> > [ 73%] Built target highgui
> > [ 73%] Generating generated0.i
> >
> > File
> >
> > "/usr/ports/graphics/opencv/work/OpenCV-2.0.0/interfaces/python/gen.py",
> > line 167
> >
> > print "Tuple with kwargs is not allowed, function", name
> >
> > ^
> >
> > SyntaxError: invalid syntax
>
> Looks like a typical error when code intended for python2.x is run on
> python3.x. It's easy to fix, just enclose `print' arguments in braces.
> _______________________________________________

Thanks v. much I applied but I still got a failure got a failure ***failure***
towards the end of the file where I had obviously not modified correctly.

See below the relevant section of gen.py after my amendments
***amended_file***.

___________________________________________
***failure***
____________________________________
73%] Built target highgui
[ 73%] Generating generated0.i
File
"/usr/ports/graphics/opencv/work/OpenCV-2.0.0/interfaces/python/gen.py", line
295
print (>>gen_c[1], entry % (nm))
^
SyntaxError: invalid syntax
*** Error code 1
1 error
*** Error code 2
[ 74%] Built target cvhaartraining
[ 85%] Built target cvaux
1 error
*** Error code 2
1 error
*** Error code 1

Stop in /usr/ports/graphics/opencv.
*** Error code 1

Stop in /usr/ports/graphics/opencv.
______________________________________________

***amended_file***.
_____________________________________________

if has_optional(args):
entry = '{"%%s", (PyCFunction)pycv%s, METH_KEYWORDS, "%s"},' %
(cname(nm), ds)
else:
entry = '{"%%s", pycv%s, METH_VARARGS, "%s"},' % (cname(nm), ds)
print (>>gen_c[1], entry % (nm))
if nm.startswith('CV_'):
print (>>gen_c[1], entry % (nm[3:]))
for l in gen(nm,args,ty):
print (>>gen_c[0], l)

for l in open("%s/defs" % sys.argv[1]):
print (>>gen_c[2], "PUBLISH(%s);" % l.split()[1])

for f in gen_c:
f.close()


Photographic Artist
Permanent Installations & Design
Creative Imagery and Advanced Digital Techniques
High Dynamic Range Photography & Official Portraiture
Combined darkroom & digital creations
& Systems Adminstrator for the vizion2000.net network
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"