[MMTK] Loading minimizer crashes python

Michiel Jan Laurens de Hoon mdehoon at ims.u-tokyo.ac.jp
Tue Aug 12 13:22:37 EDT 2003


You need a gcc-style library for this to work. Previously I wrote down 
how to do that for Python's dll, see 
http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/python/index.html, 
under "Compiling extensions for Python on Windows using Cygwin" on the 
left. You will need to do the same for netcdf.dll. I just tried this on 
my Windows-machine and it solved the problem. If you run into problems 
creating the gcc-style library for netcdf.dll, let me know, then I can 
just send you a copy of mine. Btw I ran this from Cygwin's command 
prompt (but using Windows' Python instead of Cygwin's Python) instead of 
the DOS command prompt, that should not make a difference but you never 
know.

--Michiel.

Robin Maytum wrote:
> So I then tried building seting the compiler to mingw32
> 
> c:\scientificpython>python setup.py build --compiler=mingw32
> 
> But this then produces an error with dllwrap :-
> 
> ....
> running build_ext
> building 'Scientific_netcdf' extension
> c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IInclude -Inetcdf\include -Ic:\
> python22\include -c Src/Scientific_netcdf.c -o build\temp.win32-2.2\Release\scie
> ntific_netcdf.o
> Src/Scientific_netcdf.c:571: warning: static declaration for `netcdf_file_init'
> follows non-static
> Src/Scientific_netcdf.c:1076: warning: static declaration for `netcdf_variable_n
> ew' follows non-static
> Src/Scientific_netcdf.c: In function `PyNetCDFVariable_WriteArray':
> Src/Scientific_netcdf.c:1536: warning: `lastloop' might be used uninitialized in
>  this function
> writing build\temp.win32-2.2\Release\Scientific_netcdf.def
> c:\mingw\bin\dllwrap.exe -mno-cygwin -mdll -static --entry _DllMain at 12 --output-
> lib build\temp.win32-2.2\Release\libScientific_netcdf.a --def build\temp.win32-2
> .2\Release\Scientific_netcdf.def -s build\temp.win32-2.2\Release\scientific_netc
> df.o -Lnetcdf\lib -Lc:\python22\libs -lnetcdf -lpython22 -o build\lib.win32-2.2\
> Scientific\win32\Scientific_netcdf.pyd
> build\temp.win32-2.2\Release\scientific_netcdf.o(.text+0x2e1):Scientific_netcdf.
> c: undefined reference to `_imp__ncerr'
> build\temp.win32-2.2\Release\scientific_netcdf.o(.text+0x3c72):Scientific_netcdf
> .c: undefined reference to `_imp__ncopts'
> dllwrap: gcc exited with status 1
> error: command 'dllwrap' failed with exit status 1
> 

-- 
Michiel de Hoon, Assistant Professor
University of Tokyo, Institute of Medical Science
Human Genome Center
4-6-1 Shirokane-dai, Minato-ku
Tokyo 108-8639
Japan
http://bonsai.ims.u-tokyo.ac.jp/~mdehoon




More information about the mmtk mailing list