Skip to content
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

scipy.weave.converters.blitz fails with g++4.3 (Trac #739) #1266

Closed
Tracked by #7
scipy-gitbot opened this issue Apr 25, 2013 · 10 comments
Closed
Tracked by #7

scipy.weave.converters.blitz fails with g++4.3 (Trac #739) #1266

scipy-gitbot opened this issue Apr 25, 2013 · 10 comments
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected Migrated from Trac

Comments

@scipy-gitbot
Copy link

Original ticket http://projects.scipy.org/scipy/ticket/739 on 2008-09-18 by trac user jwolter, assigned to unknown.

A script using converters.blitz in an scipy.weave.inline statement stopped working lately.

#!python
from scipy.weave import inline, converters
...
inline(code,
        ['hs', 'lumBlur', 'lumImg',
         'img'],
        type_converters = converters.blitz,
        support_code = support,
        libraries = ['m'],
        verbose=0
      )

Suddenly I got the following error:

...
In file included from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/applics.h:400,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/vecexpr.h:32,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/vecpick.cc:16,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/vecpick.h:293,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/vector.h:449,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/tinyvec.h:430,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/array-impl.h:44,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/array.h:32,
                 from /home/jw/.python25_compiled/sc_ef45038834ace16052d05de4cc06f8523.cpp:11:
/usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/mathfunc.h: In static member function 'static long int blitz::_bz_abs<long int>::apply(long int)':
/usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/mathfunc.h:45: error: 'labs' is not a member of 'std'
In file included from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/array/funcs.h:29,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/array/newet.h:29,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/array/et.h:27,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/array-impl.h:2515,
                 from /usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/array.h:32,
                 from /home/jw/.python25_compiled/sc_ef45038834ace16052d05de4cc06f8523.cpp:11:
/usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/funcs.h: In static member function 'static int blitz::Fn_abs<int>::apply(int)':
/usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/funcs.h:509: error: call of overloaded 'abs(int&)' is ambiguous
/usr/include/c++/4.3/cmath:99: note: candidates are: double std::abs(double)
/usr/include/c++/4.3/cmath:103: note:                 float std::abs(float)
/usr/include/c++/4.3/cmath:107: note:                 long double std::abs(long double)
/usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/funcs.h: In static member function 'static long int blitz::Fn_abs<long int>::apply(long int)':
/usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/funcs.h:530: error: 'labs' is not a member of 'std'
/home/jw/.python25_compiled/sc_ef45038834ace16052d05de4cc06f8523.cpp: In function 'char* find_type(PyObject*)':
...

In the Debian BTS I found a small patch which is supposed to solve this issue:

Maybe this patch should also be applied to the scipy-blitz sources.

I'm using scipy 0.6.0 (Debian package 0.6.0-12) and g++4.3.1.

Regards,
Johannes Wolter

@scipy-gitbot
Copy link
Author

@fperez wrote on 2008-11-18

As noted here:

http://projects.scipy.org/pipermail/scipy-user/2008-November/018739.html

the issue can be worked around by using g++ 4.2. Just noting the workaround here until a proper fix is committed.

@scipy-gitbot
Copy link
Author

@stefanv wrote on 2009-02-13

I applied the Blitz patch given above at

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

to trunk, so we shouldn't have this problem in 0.7.1.

@scipy-gitbot
Copy link
Author

Milestone changed to 0.7.1 by @stefanv on 2009-02-13

@scipy-gitbot
Copy link
Author

trac user ysr wrote on 2010-04-28

I am still having this problem in scipy 0.7.2 (installed from the sourceforge stable install) on a Ubuntu 9.10 box with gcc 4.4.1

@scipy-gitbot
Copy link
Author

Milestone changed to 0.8.0 by trac user ysr on 2010-04-28

@scipy-gitbot
Copy link
Author

Attachment added by @charris on 2010-10-07: weave-739.patch

@scipy-gitbot
Copy link
Author

@charris wrote on 2010-10-07

Ubuntu 10.04 has released a patch for this. There are two more includes of than presently in svn. Patch attached.

@scipy-gitbot
Copy link
Author

@rgommers wrote on 2011-06-12

Any reason not to commit your patch?

@scipy-gitbot
Copy link
Author

Milestone changed to Unscheduled by @rgommers on 2011-06-12

@person142
Copy link
Member

Closing since weave is no longer a part of SciPy. This issue is now tracked at scipy/weave#7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected Migrated from Trac
Projects
None yet
Development

No branches or pull requests

2 participants