New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot compile with Cython 0.17 (using clang on Mac OS 10.8) but ok with Cython 0.16 #102
Comments
Yes, I ran into the same issue on my Linux laptop when I upgraded to Cython 0.17 on Monday. Cython 0.16 continues to work. It looked like the Cython-to-C translator was choking on new-style cdef classes (i.e. derived from object). I decided to put off dealing with it until my big refactoring branch is further along. At some point we may have to contact the Cython devs. |
The same is true for Ubuntu (and explains why I couldn't get it to compile)... I was trying yo compile RMG-Py and couldn't, only obtaining a a cython error... This is the "reply" when compiling on Ubuntu: detlevcm@detlevcm-virtual-machine: Error compiling Cython file:... ################################################################################ class Vertex(object): ^rmgpy/molecule/graph.py:43:0: Compiler crash in AnalyseDeclarationsTransform ModuleNode.body = StatListNode(graph.py:38:0) Compiler crash traceback from this point on: |
Yes, that is the same error I am seeing. According to this post on cython-users the issue is with the "binding" option, which as of 0.17 is turned on by default for pure Python files. Apparently using |
I tested things with the recently-released Cython 0.17.1, but the issue still persists. The problem is with the |
FYI I still can't get a complete compilation of RMG-Py with Cython 0.17.1, even after making the above change. The new issue involves the C code generated from the rmgpy.quantity module. The new error message suggests malformed C code is being generated by Cython:
I think it might be related to this issue, which suggests something wrong with numpy + pure Python mode. We would have to make rmgpy.quantity into a .pyx file in order to work around this, which is probably okay but not the greatest solution. Also, if you've recently upgraded to numpy 1.7, you'll probably start seeing this warning during the compilation (on Cython 0.16 as well as 0.17):
This doesn't seem to be a problem yet, but it appears for every module that has a |
Good news: Cython 0.19 was released last week, and it appears to have fixed the issue involving the malformed |
Excellent. I support this change. |
I have made the necessary changes in e64ec1b. After you pull this change you can safely upgrade to Cython 0.19. |
We couldn't get RMG-Py to compile on a new Mac running MacOS X 10.8 with clang as the c compiler (as used by numpy, and a homebrew-installed python), but it was working fine on an older mac with the same operating system version, compiler etc. Turns out I hadn't updated Cython on the older computer and it was still on Cython 0.16. Once we downgraded the new computer from Cython 0.17 to Cython 0.16, it worked fine.
Is this a known problem with cython?
Is it unique to clang and/or MacOS?
Should we update the requirements.txt file to specify
cython==0.16
?Anyway, for anyone running into this problem in the mean time, try:
The text was updated successfully, but these errors were encountered: