[Numpy-discussion] Building on WinXP 64-bit, Intel Compilers

Michael Colonno mcolonno@gmail....
Thu Jan 29 09:57:10 CST 2009

   OK, some progress here. I have two questions: 1) Let's forget about the
Intel compiler(s) for the moment and focus on a standard Windows build.
Python 2.6 comes with two classes in distutils: msvccompiler.py and
msvc9compiler.py. In reading through these, it appears msvc9compiler.py is
ideally suited for what I'm trying to do (use VS 2008 tools). Is it possible
to select this via command line flags with config --compiler=xxx? Choosing
"msvc" *seems* to go for msvccompiler.py (I'm just tyring to trace the magic
as things build). 2) when using the standard msvc setup, things do seem to
work re: setting up the build environemnt (see below). Now, the VS compiler
kicks out a syntax error (output copied below). Any thoughts? This looks
like a peculiarity of the VS compiler but I'm not sure. (I tend to prefer
the Intel C compiler because it is more "Linux-like" and seems to be happier
with cross-platform code.)

   ~Mike C.


[copying.... output edited for bevity]

running build_ext
No module named msvccompiler in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
building 'numpy.core.multiarray' extension
compiling C sources
creating build\temp.win-amd64-2.6
creating build\temp.win-amd64-2.6\Release
creating build\temp.win-amd64-2.6\Release\numpy
creating build\temp.win-amd64-2.6\Release\numpy\core
creating build\temp.win-amd64-2.6\Release\numpy\core\src
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c
o /Ox /MD /W3 /GS- /DNDEBUG -Ibuild\src.win-amd64-2.6\numpy\core\src
e\include -Ibuild\src.win-amd64-2.6\numpy\core\include/numpy
-Inumpy\core\src -I
numpy\core\include -IC:\Python26\include -IC:\Python26\PC
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\link.exe
/DLL /n
ologo /INCREMENTAL:NO /LIBPATH:C:\Python26\libs
64 /EXPORT:initmultiarray
rraymodule.obj /OUT:build\lib.win-amd64-2.6\numpy\core\multiarray.pyd
mt.exe -nologo -manifest
building 'numpy.core.umath' extension
compiling C sources
creating build\temp.win-amd64-2.6\Release\build
creating build\temp.win-amd64-2.6\Release\build\src.win-amd64-2.6
creating build\temp.win-amd64-2.6\Release\build\src.win-amd64-2.6\numpy
creating build\temp.win-amd64-2.6\Release\build\src.win-amd64-2.6\numpy\core

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c
o /Ox /MD /W3 /GS- /DNDEBUG -Ibuild\src.win-amd64-2.6\numpy\core\src
e\include -Ibuild\src.win-amd64-2.6\numpy\core\include/numpy
-Inumpy\core\src -I
numpy\core\include -IC:\Python26\include -IC:\Python26\PC
numpy\core\src\umathmodule.c.src(64) : error C2059: syntax error : 'type'
numpy\core\src\umathmodule.c.src(70) : error C2059: syntax error : 'type'
numpy\core\src\ufuncobject.c(1704) : warning C4244: '=' : conversion from
ntp' to 'int', possible loss of data
numpy\core\src\ufuncobject.c(2425) : warning C4244: '=' : conversion from
ntp' to 'int', possible loss of data
error: Command "C:\Program Files (x86)\Microsoft Visual Studio
cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG
\src -Inumpy\core\include -Ibuild\src.win-amd64-2.6\numpy\core\include/numpy
umpy\core\src -Inumpy\core\include -IC:\Python26\include -IC:\Python26\PC
lease\build\src.win-amd64-2.6\numpy\core\src\umathmodule.obj" failed with
exit s
tatus 2


On Wed, Jan 28, 2009 at 4:36 PM, David Cournapeau <cournape@gmail.com>wrote:

> On Thu, Jan 29, 2009 at 1:18 AM, Michael Colonno <mcolonno@gmail.com>
> wrote:
> >    I think this is doable; thankfully the Intel compilers on Windows and
> > Linux are very similar in behavior.
> The problem is that distutils does not abstract this kind of things:
> you have a CCompiler class, and a subclass Unix C Compiler, and then
> Intel Compiler. OTOH, the MS compiler is its own class which inherit
> from CCompiler - all windows specifics are encoded in this class. So I
> am afraid you will need to recreate all this class implementation for
> Intel C Compiler, because contrary to the Linux case, nothing is
> abstracted for windows.
> > As an aside: how were the Windows 32-bit installers created?
> With mingw compiler.
> > Is
> > it possible to recreate this process changing the target arch --> x64?
> If you can build numpy with the Intel compiler, building the installer
> should be a no-brainer.
> cheers,
> David
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20090129/adef796d/attachment-0001.html 

More information about the Numpy-discussion mailing list