build on windows 64-bit platform
![](https://secure.gravatar.com/avatar/af6c39d6943bd4b0e1fde23161e7bb8c.jpg?s=120&d=mm&r=g)
Hi all, The build is still failing on winXP 64-bit, as shown on the buildbot page http://buildbot.scipy.org/Windows%20XP%20x86_64%20MSVC/builds/25/step-shell/... with the error AttributeError: MSVCCompiler instance has no attribute '_MSVCCompiler__root' Could someone familiar with the MSVC compilers please take a look? Thanks Stéfan
![](https://secure.gravatar.com/avatar/2a726b0de1ade0be11fb5bc5a383d71d.jpg?s=120&d=mm&r=g)
Stefan van der Walt wrote:
Hi all,
The build is still failing on winXP 64-bit, as shown on the buildbot page
http://buildbot.scipy.org/Windows%20XP%20x86_64%20MSVC/builds/25/step-shell/...
with the error
AttributeError: MSVCCompiler instance has no attribute '_MSVCCompiler__root'
Could someone familiar with the MSVC compilers please take a look?
I think the problem is in the environment of the buildbot machine `Windows XP x86_64 MSVC`. Basically, I would try setting the following environment variables in this machine: DISTUTILS_USE_SDK and MSSdk Then the build might succeed. For more information, read the code in Python distutils/msvccompiler.py file. Pearu
![](https://secure.gravatar.com/avatar/af6c39d6943bd4b0e1fde23161e7bb8c.jpg?s=120&d=mm&r=g)
On Fri, Jul 27, 2007 at 04:54:45PM +0200, Pearu Peterson wrote:
Stefan van der Walt wrote:
Hi all,
The build is still failing on winXP 64-bit, as shown on the buildbot page
http://buildbot.scipy.org/Windows%20XP%20x86_64%20MSVC/builds/25/step-shell/...
with the error
AttributeError: MSVCCompiler instance has no attribute '_MSVCCompiler__root'
Could someone familiar with the MSVC compilers please take a look?
I think the problem is in the environment of the buildbot machine `Windows XP x86_64 MSVC`. Basically, I would try setting the following environment variables in this machine: DISTUTILS_USE_SDK and MSSdk Then the build might succeed.
For more information, read the code in Python distutils/msvccompiler.py file.
Thanks, Pearu -- I'll take a look. Why the uninformative error message, though? Isn't distutils supposed to automagically detect the MSVC compiler? Regards Stéfan
![](https://secure.gravatar.com/avatar/2a726b0de1ade0be11fb5bc5a383d71d.jpg?s=120&d=mm&r=g)
Stefan van der Walt wrote:
On Fri, Jul 27, 2007 at 04:54:45PM +0200, Pearu Peterson wrote:
Stefan van der Walt wrote:
Hi all,
The build is still failing on winXP 64-bit, as shown on the buildbot page
http://buildbot.scipy.org/Windows%20XP%20x86_64%20MSVC/builds/25/step-shell/...
with the error
AttributeError: MSVCCompiler instance has no attribute '_MSVCCompiler__root'
Could someone familiar with the MSVC compilers please take a look? I think the problem is in the environment of the buildbot machine `Windows XP x86_64 MSVC`. Basically, I would try setting the following environment variables in this machine: DISTUTILS_USE_SDK and MSSdk Then the build might succeed.
For more information, read the code in Python distutils/msvccompiler.py file.
Thanks, Pearu -- I'll take a look. Why the uninformative error message, though? Isn't distutils supposed to automagically detect the MSVC compiler?
I think this is bug in Python distutils/msvccompiler.py. Let me know if defining these variables work, then we can implement a workaround or show more informative messages on failure. Note that one may get such an error only on AMD64 platform, the MSVC compiler uses other code on Intel machines and that works automagically indeed. Pearu
![](https://secure.gravatar.com/avatar/2a726b0de1ade0be11fb5bc5a383d71d.jpg?s=120&d=mm&r=g)
Ok, I have now enabled DISTUTILS_USE_SDK for AMD64 Windows platform and it seems working.. However, the build still fails but now the reason seems to be related to numpy ticket 164: http://projects.scipy.org/scipy/numpy/ticket/164 Pearu I think buildbot is great!
![](https://secure.gravatar.com/avatar/af6c39d6943bd4b0e1fde23161e7bb8c.jpg?s=120&d=mm&r=g)
On Sat, Jul 28, 2007 at 12:54:52AM +0200, Pearu Peterson wrote:
Ok, I have now enabled DISTUTILS_USE_SDK for AMD64 Windows platform and it seems working..
Fantastic, thanks!
However, the build still fails but now the reason seems to be related to numpy ticket 164:
I'll ask Albert whether he would have a look at it again. Cheers Stéfan
![](https://secure.gravatar.com/avatar/fa3279b202e9a85f7d90a0422bca4489.jpg?s=120&d=mm&r=g)
Hello all On Sat, 28 Jul 2007, Stefan van der Walt wrote:
On Sat, Jul 28, 2007 at 12:54:52AM +0200, Pearu Peterson wrote:
Ok, I have now enabled DISTUTILS_USE_SDK for AMD64 Windows platform and it seems working..
Fantastic, thanks!
However, the build still fails but now the reason seems to be related to numpy ticket 164:
I'll ask Albert whether he would have a look at it again.
Let's see. Using this build log: http://buildbot.scipy.org/Windows%20XP%20x86_64%20MSVC/builds/31/step-shell/... numpy\core\src\umathmodule.c.src(73) : warning C4273: 'logf' : inconsistent dll linkage numpy\core\src\umathmodule.c.src(74) : warning C4273: 'sqrtf' : inconsistent dll linkage Judging from the math.h on my 32-bit system, these declarations should look like this: float __cdecl logf(float); float __cdecl sqrtf(float); but they're missing the __cdecl in the NumPy code. Somewhere a macro needs to be defined to __cdecl on Windows (and left empty on other platforms) and including in the NumPy declarations. numpy\core\src\umathmodule.c.src(604) : warning C4013: 'fabsf' undefined; assuming extern returning int numpy\core\src\umathmodule.c.src(604) : warning C4013: 'hypotf' undefined; assuming extern returning int Judging from the patch attached to ticket #164, these functions aren't available for some reason. Maybe check the header to see if there's a way to turn them on using some preprocessor magic. If not, do what the patch does. numpy\core\src\umathmodule.c.src(604) : warning C4244: 'function' : conversion from 'int' to 'float', possible loss of data A cast should suppress this warning. numpy\core\src\umathmodule.c.src(625) : warning C4013: 'rintf' undefined; assuming extern returning int Add this function like the patch does. numpy\core\src\umathmodule.c.src(625) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data numpy\core\src\umathmodule.c.src(626) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data numpy\core\src\umathmodule.c.src(632) : warning C4244: 'initializing' : conversion from 'int' to 'float', possible loss of data numpy\core\src\umathmodule.c.src(641) : warning C4244: 'initializing' : conversion from 'int' to 'float', possible loss of data numpy\core\src\umathmodule.c.src(1107) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data numpy\core\src\umathmodule.c.src(1107) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data numpy\core\src\umathmodule.c.src(1107) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data numpy\core\src\umathmodule.c.src(1107) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data numpy\core\src\umathmodule.c.src(1349) : warning C4244: '=' : conversion from 'npy_longlong' to 'double', possible loss of data numpy\core\src\umathmodule.c.src(1350) : warning C4244: '=' : conversion from 'npy_longlong' to 'double', possible loss of data numpy\core\src\umathmodule.c.src(1349) : warning C4244: '=' : conversion from 'npy_ulonglong' to 'double', possible loss of data numpy\core\src\umathmodule.c.src(1350) : warning C4244: '=' : conversion from 'npy_ulonglong' to 'double', possible loss of data More casts probably. numpy\core\src\umathmodule.c.src(1583) : warning C4146: unary minus operator applied to unsigned type, result still unsigned numpy\core\src\umathmodule.c.src(1583) : warning C4146: unary minus operator applied to unsigned type, result still unsigned numpy\core\src\umathmodule.c.src(1583) : warning C4146: unary minus operator applied to unsigned type, result still unsigned Potential bugs. Look closely at these. numpy\core\src\umathmodule.c.src(1625) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data Cast. numpy\core\src\umathmodule.c.src(2013) : warning C4013: 'frexpf' undefined; assuming extern returning int Add this function. numpy\core\src\umathmodule.c.src(2013) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data Cast probably. numpy\core\src\umathmodule.c.src(2030) : warning C4013: 'ldexpf' undefined; assuming extern returning int Add this function. numpy\core\src\umathmodule.c.src(2030) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data Cast probably. build\src.win32-2.5\numpy\core\__umath_generated.c(15) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(21) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(27) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(30) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(45) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(45) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(51) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(54) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(63) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(72) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(72) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(78) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(114) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(153) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(174) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(177) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(189) : error C2099: initializer is not a constant build\src.win32-2.5\numpy\core\__umath_generated.c(192) : error C2099: initializer is not a constant For whatever reason, these function pointers aren't constant, so I think the initialization should be moved into the InitOperators function if that makes sense to do. numpy\core\src\ufuncobject.c(717) : warning C4244: '=' : conversion from 'Py_ssize_t' to 'int', possible loss of data numpy\core\src\ufuncobject.c(1130) : warning C4244: '=' : conversion from 'Py_ssize_t' to 'int', possible loss of data numpy\core\src\ufuncobject.c(1451) : warning C4244: '=' : conversion from 'npy_intp' to 'int', possible loss of data numpy\core\src\ufuncobject.c(1452) : warning C4244: '=' : conversion from 'npy_intp' to 'int', possible loss of data numpy\core\src\ufuncobject.c(2113) : warning C4244: '=' : conversion from 'npy_intp' to 'int', possible loss of data numpy\core\src\ufuncobject.c(2962) : warning C4244: '=' : conversion from 'Py_ssize_t' to 'int', possible loss of data Potential bugs. Look closely at these. Otherwise cast to suppress the warnings. Hope this helped. Cheers, Albert
![](https://secure.gravatar.com/avatar/fa3279b202e9a85f7d90a0422bca4489.jpg?s=120&d=mm&r=g)
Hello On Sat, 28 Jul 2007, Albert Strasheim wrote:
float __cdecl logf(float); float __cdecl sqrtf(float);
but they're missing the __cdecl in the NumPy code. Somewhere a macro needs to be defined to __cdecl on Windows (and left empty on other platforms) and including in the NumPy declarations.
included
numpy\core\src\umathmodule.c.src(632) : warning C4244: 'initializing' : conversion from 'int' to 'float', possible loss of data numpy\core\src\umathmodule.c.src(641) : warning C4244: 'initializing' : conversion from 'int' to 'float', possible loss of data
More casts probably.
Looks like initializing these values with a float value (e.g., 0.0f and not 0) will fix these. If it's hard to modify the code generate to do this, a cast should be fine. Cheers, Albert
![](https://secure.gravatar.com/avatar/2a726b0de1ade0be11fb5bc5a383d71d.jpg?s=120&d=mm&r=g)
Hi, I finally got numpy to build on Windows XP x86_64 MSVC. The code needed to get it work is within DISTUTILS_USE_SDK defines. However, the tests fail on importing numpy: the package is not found. Could someone with access to this machine take a look at the configuration of installing numpy? Regards, Pearu
participants (3)
-
Albert Strasheim
-
Pearu Peterson
-
Stefan van der Walt