[SciPy-user] gcc error Using weave.blitz()

Joshua Menke josh at cs.byu.edu
Mon Dec 29 14:23:18 CST 2003


I'm having problems getting weave.blitz() to work. I'm running RedHat 9 
with gcc 3.2.  I've gotten the latest scipy and weave from cvs.

The error seems to manifest whenever I try to pass in a variable from 
Python to the inline code.

For example this works fine:

from weave import line
code = 'printf("test\n");
inline(code)

But this doesn't:
a = 1
code = 'a=2'
inline(code,['a'])

It returns the following (not sure what the "file changed" thing is either):

file changed
/home/josh/.python22_compiled/sc_83a88ab12cf3296e031df84985733d331.cpp: In
   function `PyObject* compiled_func(PyObject*, PyObject*)':
/home/josh/.python22_compiled/sc_83a88ab12cf3296e031df84985733d331.cpp:650: 
parse
   error before `}' token
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/weave/inline_tools.py", line 
335, in inline
    auto_downcast = auto_downcast,
  File "/usr/lib/python2.2/site-packages/weave/inline_tools.py", line 
439, in compile_function
    verbose=verbose, **kw)
  File "/usr/lib/python2.2/site-packages/weave/ext_tools.py", line 340, 
in compile
    verbose = verbose, **kw)
  File "/usr/lib/python2.2/site-packages/weave/build_tools.py", line 
272, in build_extension
    setup(name = module_name, ext_modules = [ext],verbose=verb)
  File "/usr/lib/python2.2/site-packages/scipy_distutils/core.py", line 
42, in setup
    return old_setup(**new_attr)
  File "/usr/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

Any help would be great.

thanks,

Josh

-- 
Joshua Menke
NNML Lab
BYU CS Dept.
josh at cs.byu.edu



More information about the SciPy-user mailing list