Bug 194065

Summary: lang/cython: Fallout from upgrade from 0.20 => 0.21
Product: Ports & Packages Reporter: John Marino <marino>
Component: Individual Port(s)Assignee: David Naylor <dbn>
Status: Closed FIXED    
Severity: Affects Some People CC: dbn, vmagerya, wen
Priority: --- Flags: marino: maintainer-feedback? (vmagerya)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
py-tables.diff none

Description John Marino freebsd_committer freebsd_triage 2014-10-01 09:54:47 UTC
These ports dependent on cython no long build after the recent update (confirmed on DragonFly 3.9 and FreeBSD 10):

devel/py-tables
x11-toolkits/


=======================<phase: configure      >============================
===>  Configuring for py27-tables-3.0.0_4
* Using Python 2.7.8 (default, Sep 29 2014, 23:47:51) 
* Found numpy 1.8.1 package installed.
* Found numexpr 2.2.2 package installed.
.. ERROR:: You need Cython 0.13 or greater to compile PyTables!
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/py-tables
===>  Cleaning for py27-tables-3.0.0_4






cythoning kivy/graphics/shader.pyx to kivy/graphics/shader.c
 
 Error compiling Cython file:
 ------------------------------------------------------------
 ...
             vertex_format.last_shader = self
             for i in xrange(vertex_format.vattr_count):
                 attr = &vertex_format.vattr[i]
                 if attr.per_vertex == 0:
                     continue
                 attr.index = glGetAttribLocation(self.program, <char *><bytes>attr.name)
                                                               ^
 ------------------------------------------------------------
 
 kivy/graphics/shader.pyx:448:63: Casting temporary Python object to non-numeric non-Python type
building 'kivy.graphics.shader' extension
cc -DNDEBUG -pipe -O2 -fno-strict-aliasing -fPIC -I/usr/local/include -I/usr/local/include/python2.7 -c kivy/graphics/shader.c -o build/temp.dragonfly-3.9-DEVELOPMENT-x86_64-2.7/kivy/graphics/shader.o
kivy/graphics/shader.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 error: command 'cc' failed with exit status 1
*** Error code 1
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-10-01 09:54:47 UTC
Maintainer CC'd
Comment 2 John Marino freebsd_committer freebsd_triage 2014-10-01 09:56:23 UTC
CC'ing maintainers of ports broken by cython update.
Comment 3 Vitaly Magerya 2014-10-01 10:29:51 UTC
Created attachment 147881 [details]
py-tables.diff

Here's a *completely untested* patch to fix devel/py-tables.
(wen@ should look into this one).
Comment 4 Vitaly Magerya 2014-10-01 10:40:53 UTC
For x11-toolkits/py-kivy, I think it's safe to change this line:

    attr.index = glGetAttribLocation(self.program, <char *><bytes>attr.name)

... into this:

    attr.index = glGetAttribLocation(self.program, <char *>attr.name)

... because attr.name is already <bytes> (or so it seems).
If that doesn't work, this should work instead:

    tmp = <bytes>attr.name
    attr.index = glGetAttribLocation(self.program, <char *>tmp)

In any case, testing is needed (and I can't perform it at the moment), so I'm leaving it for dbn@ to figure out.
Comment 5 Wen Heping freebsd_committer freebsd_triage 2014-10-01 14:44:22 UTC
I updated py-tables to 3.1.1 and fix the build with cython-0.21 just now.

wen
Comment 6 David Naylor freebsd_committer freebsd_triage 2014-10-01 21:38:12 UTC
Over to me as the only one left to action this report
Comment 7 David Naylor freebsd_committer freebsd_triage 2014-10-01 21:54:13 UTC
There is a commit for Kivy that fixes this issue.  Please see https://github.com/kivy/kivy/commit/827bd6c7b7d04ec72cb3bdbf0ffcd90630d90008#diff-8716b56df5850ab414d6396e91fc20a4

I will add a patch to kivy to fix this issue tomorrow.
Comment 8 commit-hook freebsd_committer freebsd_triage 2014-10-04 08:19:26 UTC
A commit references this bug:

Author: dbn
Date: Sat Oct  4 08:19:01 UTC 2014
New revision: 369949
URL: https://svnweb.freebsd.org/changeset/ports/369949

Log:
  Fix x11-toolkits/py-kivy due to cython update.

  Cython changes its temporary variable handling and now fails on the file:
    kivy/graphics/sahder/pyx

  This has already been fixed upstream so just backport that fix.

  Also, update the USE_PYTHON et al variables.

  PR:		194065
  Reported by:	John Marino (marino@FreeBSD.org)
  Obtained from:	https://github.com/kivy/kivy/commit/b2bc566

Changes:
  head/x11-toolkits/py-kivy/Makefile
  head/x11-toolkits/py-kivy/files/patch-kivy__grahics__shader.pyx
Comment 9 David Naylor freebsd_committer freebsd_triage 2014-10-04 08:20:03 UTC
Fixed, thank you for the report.
Comment 10 commit-hook freebsd_committer freebsd_triage 2014-10-04 22:47:35 UTC
A commit references this bug:

Author: antoine
Date: Sat Oct  4 22:47:25 UTC 2014
New revision: 370010
URL: https://svnweb.freebsd.org/changeset/ports/370010

Log:
  MFH: r369949

  Fix x11-toolkits/py-kivy due to cython update.

  Cython changes its temporary variable handling and now fails on the file:
    kivy/graphics/sahder/pyx

  This has already been fixed upstream so just backport that fix.

  Also, update the USE_PYTHON et al variables.

  PR:		194065
  Reported by:	John Marino (marino@FreeBSD.org)
  Obtained from:	https://github.com/kivy/kivy/commit/b2bc566

Changes:
_U  branches/2014Q4/
  branches/2014Q4/x11-toolkits/py-kivy/Makefile
  branches/2014Q4/x11-toolkits/py-kivy/files/patch-kivy__grahics__shader.pyx