graphics/opencv build fails on upgrade
David Southwell
david at vizion2000.net
Wed Jul 28 17:59:10 UTC 2010
> David Southwell <david at 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
More information about the freebsd-ports
mailing list