[Numpy-discussion] Installation info

Robert Kern robert.kern@gmail....
Tue Jun 3 13:48:35 CDT 2008


On Tue, Jun 3, 2008 at 3:21 AM, Hanni Ali <hanni.ali@gmail.com> wrote:
> Hi David,
>
> I compiled numpy with MSVC 9.0 (vs 2008), I am just using the inbuilt LA
> libs to minimise complexity.
>
> Although I have hacked it such that I can compile and all but one of the
> regression tests passed:
>
> ======================================================================
> ERROR: Tests reading from a text file.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "C:\Python26\lib\site-packages\numpy\ma\tests\test_mrecords.py", line
> 363
> , in test_fromtextfile
>     fname = 'tmp%s' % datetime.now().strftime("%y%m%d%H%M%S%s")
> ValueError: Invalid format string
> ----------------------------------------------------------------------
> Ran 1267 tests in 1.141s
> FAILED (errors=1)
> <unittest._TextTestResult run=1267 errors=1 failures=0>
>
> This appears to be a problem with the strftime function in test_mrecords.py
>
> The error seems to be created by the millisecond formatting argument %s,
> removing this caused the test to pass.

Well, this should be using tempfile anyways.

> So I think it's all ok really, however in order to get numpy to compile I
> have commented out a small part which was causing compilation to fail:
>
> numpy\core\src\umathmodule.c.src(64) : error C2059: syntax error : 'type'
> numpy\core\src\umathmodule.c.src(70) : error C2059: syntax error : 'type'
>
> This relates to this section of code:
>
> #ifndef HAVE_FREXPF
> static float frexpf(float x, int * i)
> {
>     return (float)frexp((double)(x), i);
> }
> #endif
> #ifndef HAVE_LDEXPF
> static float ldexpf(float x, int i)
> {
>     return (float)ldexp((double)(x), i);
> }
> #endif
>
> The compiler directives HAVE_FREXPF and HAVE_LDEXPF do not appear to be
> recognised by msvc 9 would you agree with that assessment?
>
> And a redefinition of a function present in the stdc library is occurring.
>
> What do you think? By just commenting out this piece of code numpy compiles
> and appears to function.

The presence of these functions should have been detected by the
configuration process of numpy. HAVE_FREXPF and HAVE_LDEXPF would have
been #define'd if we had detected them correctly. It is possible that
our configuration process for this does not work correctly with VS
2008. From a clean checkout, can you please do the build again and
copy-and-paste everything printed to the terminal?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco


More information about the Numpy-discussion mailing list