[Numpy-discussion] Is there a known problem compiling numpy with VC7?

Tim Hochberg tim.hochberg at cox.net
Fri Feb 3 19:29:05 CST 2006


Hi I recently installed the Visual Studio .NET 2003 (AKA VC7) compiler 
and I took a stab at compiling numpy. I've tried previously with the 
free, toolkit version of VC7 with little success, but I was hoping this 
would be a piece of cake. No joy!

It's quite possible that my compiler setup is gummed up by the previous 
existence of the toolkit compiler. A bunch of paths were set to this and 
that and there may be some residue that is messing things up. However I 
successfully compiled numarray 1.5 and a couple of my own extensions so 
things *seem* OK. So before I go hunting, I thought I'd ask and see if 
there were some known issues with compiling numpy 0.9.4 with VC7.

The symptoms I'm seeing are, first, that it can't run configure. It 
can't find python24.lib. An abbreviated traceback is shown at the 
bottom. I kludged my way past this by replacing line 33 of 
numpy/core/setup.py with the two lines:

            python_lib = sysconfig.EXEC_PREFIX + '/libs'
            result = 
config_cmd.try_run(tc,include_dirs=[python_include],library_dirs=[python_lib])

That got me a little farther, but I quickly ran into trouble compiling 
multiarray module:

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c 
/nologo /Ox /MD /W3 /GX /DNDEBU
G -Ibuild\src\numpy\core\src -Inumpy\core\include -Ibuild\src\numpy\core 
-Inumpy\core\src -Inumpy\li
b\..\core\include -IC:\Python24\include -IC:\Python24\PC 
/Tcnumpy\core\src\multiarraymodule.c /Fobui
ld\temp.win32-2.4\Release\numpy\core\src\multiarraymodule.obj
multiarraymodule.c
build\src\numpy\core\src\arraytypes.inc(5305) : error C2036: 'void *' : 
unknown size
build\src\numpy\core\src\arraytypes.inc(5885) : error C2036: 'void *' : 
unknown size
build\src\numpy\core\src\arraytypes.inc(6465) : error C2036: 'void *' : 
unknown size
 ...a bunch of warnings...
c:\Documents and 
Settings\End-user\Desktop\numpy\numpy-0.9.4\numpy\core\src\arrayobject.c(4049) 
: er
ror C2036: 'void *' : unknown size
 ...some more warnings...
error: Command ""C:\Program Files\Microsoft Visual Studio .NET 
2003\Vc7\bin\cl.exe" /c /nologo /Ox /
MD /W3 /GX /DNDEBUG -Ibuild\src\numpy\core\src -Inumpy\core\include 
-Ibuild\src\numpy\core -Inumpy\c
ore\src -Inumpy\lib\..\core\include -IC:\Python24\include 
-IC:\Python24\PC /Tcnumpy\core\src\multiar
raymodule.c 
/Fobuild\temp.win32-2.4\Release\numpy\core\src\multiarraymodule.obj" 
failed with exit st
atus 2

Anyway, like I said, my compiler could be broken, but if there is a 
known issue with VC7 or this rings a bell with anyone please let me 
know. I certainly wouldn't mind a hint.

-tim





Traceback from configure failure:

-----------------------------------------------------------------------------------------------------------------------

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c 
/nologo /Ox /MD /W3 /GX /DNDEBU
G -IC:\Python24\include -Inumpy\core\src -Inumpy\lib\..\core\include 
-IC:\Python24\include -IC:\Pyth
on24\PC /Tc_configtest.c /Fo_configtest.obj
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe 
/nologo /INCREMENTAL:NO _configt
est.obj /OUT:_configtest.exe
LINK : fatal error LNK1104: cannot open file 'python24.lib'
failure.
removing: _configtest.c _configtest.obj
Traceback (most recent call last):
  File "C:\Documents and 
Settings\End-user\Desktop\numpy\numpy-0.9.4\setup.py", line 73, in ?
    setup_package()
  File "C:\Documents and 
Settings\End-user\Desktop\numpy\numpy-0.9.4\setup.py", line 66, in setup_pa
ckage
    setup( **config.todict() )
  File "C:\Documents and 
Settings\End-user\Desktop\numpy\numpy-0.9.4\numpy\distutils\core.py", line
93, in setup
    return old_setup(**new_attr)
  File "C:\Python24\lib\distutils\core.py", line 149, in setup
    dist.run_commands()
  File "C:\Python24\lib\distutils\dist.py", line 946, in run_commands
    self.run_command(cmd)
  File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
    cmd_obj.run()
  File "C:\Python24\lib\distutils\command\build.py", line 112, in run
    self.run_command(cmd_name)
  File "C:\Python24\lib\distutils\cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
    cmd_obj.run()
  File "C:\Documents and 
Settings\End-user\Desktop\numpy\numpy-0.9.4\numpy\distutils\command\build_s
rc.py", line 86, in run
    self.build_sources()
  File "C:\Documents and 
Settings\End-user\Desktop\numpy\numpy-0.9.4\numpy\distutils\command\build_s
rc.py", line 99, in build_sources
    self.build_extension_sources(ext)
  File "C:\Documents and 
Settings\End-user\Desktop\numpy\numpy-0.9.4\numpy\distutils\command\build_s
rc.py", line 143, in build_extension_sources
    sources = self.generate_sources(sources, ext)
  File "C:\Documents and 
Settings\End-user\Desktop\numpy\numpy-0.9.4\numpy\distutils\command\build_s
rc.py", line 199, in generate_sources
    source = func(extension, build_dir)
  File "numpy\core\setup.py", line 35, in generate_config_h
    raise "ERROR: Failed to test configuration"
ERROR: Failed to test configuration

-----------------------------------------------------------------------------------------------------------------------





More information about the Numpy-discussion mailing list