[SciPy-dev] Scipy weave error with mingw-3.4.5

Christopher Galvan cgalvan@enthought....
Fri Jun 29 10:32:36 CDT 2007


Hello,

I was trying to run an example I found of compiling C code into a python 
module.  I have attached the .py file I ran.  The resulting error was 
given when I was using MinGW-3.4.5, but the process ran fine on 
MinGW-3.2.3.  Is there some kind of compatibility issue that I am 
missing?  Any help would be greatly appreciated.

C:\eric_class\exercises\exercise8>python exercise8.py
<weave: compiling>
c:\docume~1\chrisg~1\locals~1\temp\Chris 
Galvan\python25_intermediate\compiler_8
94ad5ed761bb51736c6d2b7872dc212\Release\python25\lib\site-packages\scipy-0.5.3.d
ev2400-py2.5-win32.egg\scipy\weave\scxx\weave_imp.o:weave_imp.cpp:(.text+0xac5):
 undefined reference to `std::string::_Rep::_S_empty_rep_storage'
c:\docume~1\chrisg~1\locals~1\temp\Chris 
Galvan\python25_intermediate\compiler_8
94ad5ed761bb51736c6d2b7872dc212\Release\python25\lib\site-packages\scipy-0.5.3.d
ev2400-py2.5-win32.egg\scipy\weave\scxx\weave_imp.o:weave_imp.cpp:(.text+0xb94):
 undefined reference to `std::string::_Rep::_S_empty_rep_storage'
c:\docume~1\chrisg~1\locals~1\temp\Chris 
Galvan\python25_intermediate\compiler_8
94ad5ed761bb51736c6d2b7872dc212\Release\python25\lib\site-packages\scipy-0.5.3.d
ev2400-py2.5-win32.egg\scipy\weave\scxx\weave_imp.o:weave_imp.cpp:(.text+0xbdc):
 undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'
c:\docume~1\chrisg~1\locals~1\temp\Chris 
Galvan\python25_intermediate\compiler_8
94ad5ed761bb51736c6d2b7872dc212\Release\python25\lib\site-packages\scipy-0.5.3.d
ev2400-py2.5-win32.egg\scipy\weave\scxx\weave_imp.o:weave_imp.cpp:(.text+0xc17):
 undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'
collect2: ld returned 1 exit status
Traceback (most recent call last):
  File "exercise8.py", line 21, in <module>
    weave.blitz("result = a+b*(c-d)")
  File 
"c:\python25\lib\site-packages\scipy-0.5.3.dev2400-py2.5-win32.egg\scipy\
weave\blitz_tools.py", line 63, in blitz
    **kw)
  File 
"c:\python25\lib\site-packages\scipy-0.5.3.dev2400-py2.5-win32.egg\scipy\
weave\inline_tools.py", line 447, in compile_function
    verbose=verbose, **kw)
  File 
"c:\python25\lib\site-packages\scipy-0.5.3.dev2400-py2.5-win32.egg\scipy\
weave\ext_tools.py", line 365, in compile
    verbose = verbose, **kw)
  File 
"c:\python25\lib\site-packages\scipy-0.5.3.dev2400-py2.5-win32.egg\scipy\
weave\build_tools.py", line 269, in build_extension
    setup(name = module_name, ext_modules = [ext],verbose=verb)
  File 
"c:\python25\lib\site-packages\numpy-1.0.2.dev3484-py2.5-win32.egg\numpy\
distutils\core.py", line 174, in setup
    return old_setup(**new_attr)
  File "C:\Python25\lib\distutils\core.py", line 168, in setup
    raise SystemExit, "error: " + str(msg)
distutils.errors.CompileError: error: Command "g++ -mno-cygwin -shared 
"c:\docum
e~1\chrisg~1\locals~1\temp\Chris 
Galvan\python25_intermediate\compiler_894ad5ed7
61bb51736c6d2b7872dc212\Release\docume~1\chrisg~1\locals~1\temp\chris 
galvan\pyt
hon25_compiled\sc_421d46af877a66479b224b3cb3ed5b051.o" 
"c:\docume~1\chrisg~1\loc
als~1\temp\Chris 
Galvan\python25_intermediate\compiler_894ad5ed761bb51736c6d2b78
72dc212\Release\python25\lib\site-packages\scipy-0.5.3.dev2400-py2.5-win32.egg\s
cipy\weave\scxx\weave_imp.o" -Lc:\python25\libs -Lc:\python25\PCBuild 
-lpython25
 -lmsvcr71 -o "c:\docume~1\chrisg~1\locals~1\temp\Chris 
Galvan\python25_compiled
\sc_421d46af877a66479b224b3cb3ed5b051.pyd"" failed with exit status 1



-- Chris Galvan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: exercise8.py
Url: http://projects.scipy.org/pipermail/scipy-dev/attachments/20070629/f40d4128/attachment.pl 


More information about the Scipy-dev mailing list