[SciPy-dev] Problem with weave and blitz and gcc 4.3 (SciPy 0.7.0)

Lars Bittrich lars.bittrich@googlemail....
Thu Feb 12 03:15:15 CST 2009


Hi all,

on Ubuntu intrepid using gcc 4.3 I have problems using weave together with 
blitz converters. There is already an old ticket:

http://www.scipy.org/scipy/scipy/ticket/739

Here is a minimal example to reproduce the problem (even with SciPy 0.7.0):


from scipy.weave import inline, converters
from numpy import array

a = array([1])
code = "return_val = a(0);"
print inline(code, ['a'], type_converters=converters.blitz)


For the complete error output look at the ticket. The essential part is:

/usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/funcs.h:530: 
error: 'labs' is not a member of 'std'
...
/usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/mathfunc.h:45: 
error: 'labs' is not a member of 'std'

As a workaround I should use gcc 4.2 but the also in the ticket mentioned 
patch from debian:

http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=blitz%2B%2B.patch;att=1;bug=455661

seems much easier to apply. It is only two includes (both #include <cstdlib>). 
The patch workes well and all tests scipy.weave.test('full') are ok. Is there 
any reason why the patch is not applied in SciPy? 

I have even tested the patch with Ubuntu hardy (SciPy 0.6.0) and gcc 4.2. 
There at least the number of errors and failures does not change with or 
without the patch.


Best regards,
   Lars


More information about the Scipy-dev mailing list