[Numpy-discussion] Installation info

Hanni Ali hanni.ali@gmail....
Tue Jun 3 03:21:11 CDT 2008


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.

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.

Hanni




2008/6/2 Hanni Ali <hanni.ali@gmail.com>:

> Excellenm, thanks for clearing all that up.
>
> How about numpy with 2.6, any issues?
>
> Hanni
>
> 2008/6/2 David Cournapeau <david@ar.media.kyoto-u.ac.jp>:
>
>  Hanni Ali wrote:
>> >
>> > Yes I had used the internal versions in the mean time, but I do want
>> > to try to use the intel fortran compiler in all likelyhood.
>>
>> Yes, people can try to build as they want, that's the beauty of open
>> source :) But for official distribution, I don't want to depend on non
>> free software (outside windows, obviously). I need a process to build
>> numpy in a reproducible and in a hassle way (well, as much as possible,
>> at least).
>>
>> >
>> > Python 2.6 is compiled with vs 2008 is is important that numpy is also
>> > compiled with the same compiler or not. The fact that a fortran
>> > compiler is necessary makes me think no?
>>
>> This has nothing to do with fortran per se, but with the fact that MS
>> keeps breaking the standard C runtime. Hopefully, with python 3, this
>> may not be an issue anymore (python on windows won't use the standard C
>> API, but windows API instead, because MS guarantees ABI in this case, at
>> least that's what I understood).
>>
>> The fortran compiler has to be the same to build everything, but python
>> does not use any fortran, so you can choose whatever you want as long as
>> you use it for everything (BLAS, LAPACK and numpy).
>>
>> >
>> > It looks like I'm going to look at 2.6 now due to dependencies on
>> > pywin32 as well.
>> >
>> > Also is it important that BLAS/LAPACK are compiled with the same
>> > compiler as python or not?
>>
>> BLAS/LAPACK is built with fortran, and python with C compiler, so no :)
>> What may be important is the C++ compiler to build (more exactly to
>> link) python if you build python by yourself, but I don't know how this
>> works on windows. I just build softwares for windows, I don't use it.
>>
>> 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/20080603/8738ed7b/attachment-0001.html 


More information about the Numpy-discussion mailing list