Closed JDonner closed 12 years ago
These errors are a clear indication that you are not building from the released sources:
acora/_nfa2dfa.c: In function ‘__pyx_f_5acora_8_nfa2dfa__visit_all’:
acora/_nfa2dfa.c:2025:43: error: ‘struct __pyx_obj_5acora_6_acora__NfaState’ has no member named ‘None’
acora/_nfa2dfa.c: In function ‘__pyx_f_5acora_8_nfa2dfa_nfa2dfa’:
acora/_nfa2dfa.c:2423:45: error: ‘struct __pyx_obj_5acora_6_acora__NfaState’ has no member named ‘None’
Maybe you have Cython installed and accidentally rebuilt the C code files?
Yes, that's right. In my attempts at building I would remove the 'build' dir but not the .c files. Though, cython regenerates the .c file unintentionally (to me) if I have the cython home directory in my PYTHONPATH.
$ echo $PYTHONPATH
/home/jd/software/Cython-0.15.1:/home/jd/software/python2.7.2/site-packages:
cython can be in the PATH but as long as the cython-home is not in PYTHONPATH it's fine. Is that behavior intended? Should I repost this to the cython-users list, given that the script's detection of whether to 'cython' may be the same for other scripts?
But anyway I've got it working now, thanks for the help!
# Partial run where cythoning happens from apparently normal build; see 2nd-to-last line.
$ python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/acora
copying acora/nfa2dfa.py -> build/lib.linux-x86_64-2.7/acora
copying acora/__init__.py -> build/lib.linux-x86_64-2.7/acora
copying acora/_nfa2dfa.py -> build/lib.linux-x86_64-2.7/acora
running build_ext
skipping 'acora/_acora.c' Cython extension (up-to-date)
building 'acora._acora' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/acora
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c acora/_acora.c -o build/temp.linux-x86_64-2.7/acora/_acora.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.7/acora/_acora.o -o build/lib.linux-x86_64-2.7/acora/_acora.so
cythoning acora/_nfa2dfa.py to acora/_nfa2dfa.c
building 'acora._nfa2dfa' extension
...
You can edit comments even after posting them (or at least, I can).
But you're right. Just because Cython is importable doesn't mean it should be used - certainly not to build a release. I was relying on Cython to detect that the sources were unchanged, but I now see that the acora/_nfa2dfa.py
file in the release archive has a slightly newer timestamp than the generated .c file - my mistake, I guess. That's the problem then.
I'm not planning a new release any time soon (there were no changes since the last release), but I guess I should consider one when Cython 0.16 is out, just to get this resolved and to have the new archive based on a clean and up-to-date Cython version.
Ok cool. Yes, I can edit it, if I mouse over the right place :) I've deleted my 'oops' comment. Is it up to me to close this, since I opened it? I'll do that.
I have the same problem. How can i fix it? Thanks
@ehooo: see the comments above.
I've tried to build python acora 1.7 with python 3, as follows:
Any hint? Is it environmental? As shown above, PYTHONPATH is unset.