[SciPy-dev] weave -- inline C/C++ in Python, an implementation

Fernando Pérez fperez at pizero.colorado.edu
Fri Jan 4 17:43:13 CST 2002


Hi Eric,

Failure report with weave. Platform:

[~]> python
Python 2.1.1 (#1, Aug 30 2001, 17:36:05)
[GCC 2.96 20000731 (Mandrake Linux 8.1 2.96-0.61mdk)] on linux-i386

I installed it with the standard routine (setup.py install) with apparently no
problems. When running weave.test(), I get:

[snipped early part which seems ok]

No test suite found for  weave.sequence_spec
..
Expression: result[1:-1,1:-1] = (b[1:-1,1:-1] + b[2:,1:-1] + b[:-2,1:-1]+
b[1:-1,2:] + b[1:-1,:-2]) / 5.
Run: (10, 10) f
EEE....EEEE....EEE....EE....EEEE....EEE......EEEEEE..........................EEEwarning:
specified build_dir '_bad_path_' does not exist or is or is not writable.
Trying default locations
...warning: specified build_dir '..' does not exist or is or is not writable.
Trying default locations
.warning: specified build_dir '_bad_path_' does not exist or is or is not
writable. Trying default locations
...warning: specified build_dir '..' does not exist or is or is not writable.
Trying default locations
...............................................................................................
======================================================================
ERROR: result[1:-1,1:-1] = (b[1:-1,1:-1] + b[2:,1:-1] + b[:-2,1:-1]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.1/site-packages/weave/tests/test_blitz_tools.py",
line 148, in check_5point_avg_2d
    self.generic_2d(expr)
  File "/usr/lib/python2.1/site-packages/weave/tests/test_blitz_tools.py",
line 124, in generic_2d
    standard,compiled = self.generic_test(expr,arg_dict,type,size)
  File "/usr/lib/python2.1/site-packages/weave/tests/test_blitz_tools.py",
line 81, in generic_test     blitz_tools.blitz(expr,arg_dict,{},verbose=0)
  File "/usr/lib/python2.1/site-packages/weave/blitz_tools.py", line 93, in
blitz
    type_factories = blitz_type_factories)
  File "/usr/lib/python2.1/site-packages/weave/inline_tools.py", line 407, in
compile_function
    exec 'import ' + module_name
  File "<string>", line 1, in ?
ImportError:
/usr/local/home/fperez/tmp/test_files/sc_5599df30197fe981824ad8ec934a784e3.so:
undefined symbol: cerr
======================================================================
ERROR: check_int_return (test_scalar_spec.test_unix_int_specification)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.1/site-packages/weave/tests/test_scalar_spec.py",
line 110, in check_int_return
    exec 'from ' + mod_name + ' import test'
  File "<string>", line 1, in ?
ImportError:
/usr/local/home/fperez/tmp/test_files/sc_504aaf25fe1bf17daaf243c7c8f713d93.so:
undefined symbol: cerr


[snipped lots more of similar error messages, all failing because cerr isn't
available]. I tested my c++ libraries and cerr is perfectly accessible for me
with g++ with a simple #include <iostream.h>, so I don't think my gcc/g++
setup is the problem.

At the end after all the snipped stuff I get:

======================================================================
ERROR: check_call_function (test_common_spec.test_callable_specification)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.1/site-packages/weave/tests/test_common_spec.py",
line 56, in check_call_function
    actual = inline_tools.inline(code,['func','search_str','sub_str'])
  File "/usr/lib/python2.1/site-packages/weave/inline_tools.py", line 316, in
inline
    auto_downcast = auto_downcast,
  File "/usr/lib/python2.1/site-packages/weave/inline_tools.py", line 407, in
compile_function
    exec 'import ' + module_name
  File "<string>", line 1, in ?
ImportError:
/usr/local/home/fperez/tmp/test_files/sc_263056b76227e75db905e6c70b5397fd1.so:
undefined symbol: cerr
----------------------------------------------------------------------
Ran 184 tests in 260.053s
 
FAILED (errors=28)
<unittest.TextTestRunner instance at 0x831bac4>


I hope this helps you, ask me if you want more details.

Very much looking forward to weave being fully functional.

Cheers,

f.




More information about the Scipy-dev mailing list