Compilation with Visual Studio 2003

Hi, I want to add some support to ACML, but currently, I can't even compile numpy (Visual Studio and g77), the current SVN fails with : 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 D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Ibuild\src.win32-2.5\numpy\core\src-Inumpy\core\include -Ibuild\src.win32-2.5\numpy\core -Inumpy\core\src -Inumpy\core\include -ID:\Pyth on25\include -ID:\Python25\PC /Tcnumpy\core\src\multiarraymodule.c /Fobuild\temp .win32-2.5\Release\numpy\core\src\multiarraymodule.obj multiarraymodule.c d:\Travail\numpy\numpy\core\src\arrayobject.c(662) : warning C4244: '=' : conver sion de 'npy_longlong' en 'long', perte possible de données numpy\core\src\multiarraymodule.c(7592) : error C2065: 'NPY_ALLOW_THREADS' : ide ntificateur non déclaré error: Command "D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.ex e /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Ibuild\src.win32-2.5\numpy\core\src-Inum py\core\include -Ibuild\src.win32-2.5\numpy\core -Inumpy\core\src -Inumpy\core\i nclude -ID:\Python25\include -ID:\Python25\PC /Tcnumpy\core\src\multiarraymodule .c /Fobuild\temp.win32-2.5\Release\numpy\core\src\multiarraymodule.obj" failed w ith exit status 2 Is there something I forgot to add in the site.cfg ? Matthieu -- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher

On Nov 11, 2007 2:33 AM, Matthieu Brucher <matthieu.brucher@gmail.com> wrote:
Hi,
I want to add some support to ACML, but currently, I can't even compile numpy (Visual Studio and g77), the current SVN fails with : 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 D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Ibuild\src.win32-2.5\numpy\core\src -Inumpy\core\include -Ibuild\src.win32-2.5\numpy\core -Inumpy\core\src -Inumpy\core\include -ID:\Pyth on25\include -ID:\Python25\PC /Tcnumpy\core\src\multiarraymodule.c /Fobuild\temp .win32-2.5\Release\numpy\core\src\multiarraymodule.obj multiarraymodule.c d:\Travail\numpy\numpy\core\src\arrayobject.c(662) : warning C4244: '=' : conver sion de 'npy_longlong' en 'long', perte possible de données numpy\core\src\multiarraymodule.c(7592) : error C2065: 'NPY_ALLOW_THREADS' : ide ntificateur non déclaré error: Command "D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.ex e /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Ibuild\src.win32- 2.5\numpy\core\src -Inum py\core\include -Ibuild\src.win32-2.5\numpy\core -Inumpy\core\src -Inumpy\core\i nclude -ID:\Python25\include -ID:\Python25\PC /Tcnumpy\core\src\multiarraymodule .c /Fobuild\temp.win32-2.5\Release\numpy\core\src\multiarraymodule.obj " failed w ith exit status 2
Is there something I forgot to add in the site.cfg ?
No, it looks like NPY_ALLOW_THREADS is not defined: this pre processor symbol is defined in config.h, which is auto generated by the setup.py from numpy.core. Can you paste its content (should be somewhere in your build directory). David

No, it looks like NPY_ALLOW_THREADS is not defined: this pre processor symbol is defined in config.h, which is auto generated by the setup.py from numpy.core. Can you paste its content (should be somewhere in your build directory).
David
Here it is : /* #define SIZEOF_SHORT 2 */ /* #define SIZEOF_INT 4 */ /* #define SIZEOF_LONG 4 */ /* #define SIZEOF_FLOAT 4 */ /* #define SIZEOF_DOUBLE 8 */ #define SIZEOF_LONG_DOUBLE 8 #define SIZEOF_PY_INTPTR_T 4 /* #define SIZEOF_LONG_LONG 8 */ #define SIZEOF_PY_LONG_LONG 8 /* #define CHAR_BIT 8 */ Matthieu -- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher

Strange, I tested again and it worked this time... Matthieu 2007/11/11, Matthieu Brucher <matthieu.brucher@gmail.com>:
No, it looks like NPY_ALLOW_THREADS is not defined: this pre processor
symbol is defined in config.h, which is auto generated by the setup.py from numpy.core. Can you paste its content (should be somewhere in your build directory).
David
Here it is :
/* #define SIZEOF_SHORT 2 */ /* #define SIZEOF_INT 4 */ /* #define SIZEOF_LONG 4 */ /* #define SIZEOF_FLOAT 4 */ /* #define SIZEOF_DOUBLE 8 */ #define SIZEOF_LONG_DOUBLE 8 #define SIZEOF_PY_INTPTR_T 4 /* #define SIZEOF_LONG_LONG 8 */ #define SIZEOF_PY_LONG_LONG 8 /* #define CHAR_BIT 8 */
Matthieu -- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher
-- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher

Matthieu Brucher wrote:
Strange, I tested again and it worked this time...
I sometimes noticed this kind of behaviour too, when I cancelled the build at some point. Maybe the build does not update the config.h if you cancelled just at the middle of its generation, or something like that. David
participants (3)
-
David Cournapeau
-
David Cournapeau
-
Matthieu Brucher