[SciPy-user] weave inline install problem
Hartley, Ed
e.hartley at lancaster.ac.uk
Wed Mar 5 12:41:44 EST 2003
Hi
I'm new to SciPY but not to Python and my question relates speciaifcally to
weave.
I've installed SciPy from CVS under linux
I've built it with gcc 2.96 using a local 2.95 for the special function
libraries.
The SciPY tests passed the weave compile tests failed but ran by defaulting to
using python.
I'm now working through the weave tutorials and I've hit a problem which I'm
assuming is installation related in some way.
This works
>>> import weave
>>> a = 1
>>> weave.inline('printf("%d\\n",a);',['a'])
1
So I am assuming that the compiler call is OK however this fails
>>> from weave import inline
>>> a = 'string'
>>> code = """
... int l = len(a);
... return_val = Py::new_reference_to(Py::Int(l));
... """
>>> inline(code,['a'])
In the transcript shown below there's an indication from the line containing
parse error before `::'
that the Py:: construct is not processed correctly so I'm assuming that the
problem is installation related in some way
any suggestions on how to resolve this would be gratefully received.
Thanks
Ed Hartley
/home/widrith/.python22_compiled/sc_976f170a1f9617a7bab47e6e6aa92d200.cpp: In
function `PyObject
*compiled_func (PyObject *, PyObject *)':
/home/widrith/.python22_compiled/sc_976f170a1f9617a7bab47e6e6aa92d200.cpp:649:
`len' undeclared (first
use this function)
/home/widrith/.python22_compiled/sc_976f170a1f9617a7bab47e6e6aa92d200.cpp:649:
(Each undeclared
identifier is reported only once for each function it appears in.)
/home/widrith/.python22_compiled/sc_976f170a1f9617a7bab47e6e6aa92d200.cpp:650:
`Py' undeclared (first
use this function)
/home/widrith/.python22_compiled/sc_976f170a1f9617a7bab47e6e6aa92d200.cpp:650:
parse error before `::'
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.2/site-packages/weave/inline_tools.py", line 335,
in inline
auto_downcast = auto_downcast,
File "/usr/local/lib/python2.2/site-packages/weave/inline_tools.py", line 439,
in compile_function
verbose=verbose, **kw)
File "/usr/local/lib/python2.2/site-packages/weave/ext_tools.py", line 332, in
compile
verbose = verbose, **kw)
File "/usr/local/lib/python2.2/site-packages/weave/build_tools.py", line 237,
in build_extension
setup(name = module_name, ext_modules = [ext],verbose=verb)
File "/usr/local/lib/python2.2/distutils/core.py", line 157, in setup
raise SystemExit, "error: " + str(msg)
weave.build_tools.CompileError: error: command 'gcc' failed with exit status 1
More information about the SciPy-User
mailing list