[Cython] Possible Freeze-related regression from 0.14 to 0.14.1

2011-02-16 Thread Matthew Fox
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


Re: [Cython] Possible Freeze-related regression from 0.14 to 0.14.1

2011-02-16 Thread Matthew Fox
Of course I would forget to attach the test case. Let's try again.

> -Original Message-
> From: Matthew Fox
> Sent: February-16-11 11:22 AM
> To: 'cython-devel@python.org'
> Subject: Possible Freeze-related regression from 0.14 to 0.14.1
> 
> 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



freezebug.tar.gz
Description: freezebug.tar.gz
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] Fwd: Re: Cython builds on various Debian platforms

2011-02-16 Thread Lisandro Dalcin
On 16 February 2011 03:11, Stefan Behnel  wrote:
> [forwarding to the list, from Yaroslav Halchenko]
>
> On Tue, 15 Feb 2011, Stefan Behnel wrote:
>>
>> Cool. That looks good. As you mentioned, it doesn't include the test
>> runs yet, but it would be really great if you could get those
>> running.
>
> ok - added testing during build, so now need to assure that everything
> passes and all necessary dependencies are there.  So, there is that
> failing one I have mentioned before:
>
> ,---
> | ==
> | FAIL: test_embed (__main__.EmbedTest)
> | --
> | Traceback (most recent call last):
> |   File "runtests.py", line 886, in test_embed
> |     "make PYTHON='%s' LIBDIR1='%s' test > make.output" % (sys.executable,
> libdir)) == 0)
> | AssertionError
> `---
>
> what could be done about it or should it be excluded?
>

I've pushed some fixes. Now this testcase should run from ancient
Python 2.3 to head Python 3.2, both for static and sharedlib builds
(but not in Windows).

-- 
Lisandro Dalcin
---
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel