Date: Wed, 28 Jul 2010 18:58:49 +0100 From: David Southwell <david@vizion2000.net> To: freebsd-ports@freebsd.org Cc: Anonymous <swell.k@gmail.com>, avilla@freebsd.org Subject: Re: graphics/opencv build fails on upgrade Message-ID: <201007281858.49454.david@vizion2000.net> In-Reply-To: <86pqya34oj.fsf@gmail.com> References: <201007261057.20370.david@vizion2000.net> <86pqya34oj.fsf@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> David Southwell <david@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007281858.49454.david>