My project using Cython-freeze compiles properly with Cython 0.14.0 but fails 
with 0.14.1. I run Python 2.5 on Debian Lenny and the cython_freeze from github 
(October 29, 2009). The attached simple test case (1 plain .pyx and .pxd, 1 
.pyx with main(), and a makefile) demonstrates the issue- it works under 0.14.0 
and fails under 0.14.1.

The issue appears to be that Cython 0.14.0 declares an "int 
__pyx_module_is_main_mainster = 0" in mainster.c, while 0.14.1 declares it as 
static: "static int __pyx_module_is_main_ mainster = 0". When linking the 
object files, this results in the error from GCC: 

gcc -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions 
-L/usr/lib/python2.5/config  executable.o mainster.o foo.o  -lpython2.5 -lm 
-lpthread -ldl  -lutil  -o executable
executable.o: In function `main':
[...]/executable.c:54: undefined reference to `__pyx_module_is_main_mainster'
collect2: ld returned 1 exit status
make: *** [executable] Error 1

If I remove "static" from the declaration in mainster.c, I can recompile it and 
link the object files as I could do with Cython 0.14.0.

Let me know if you need more details or if it's not a bug at all and there's a 
workaround. My workaround for now will be to use 0.14.0.

Thanks,
Matt Fox



Phone: 604-824-2770 x305
Toll free: 800-360-2319
Email: matt...@kerkhofftech.ca
Web: http://www.kerkhofftech.ca 

_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to