Lisandro Dalcin | 1 Jun 2009 16:33
Picon
Gravatar

Re: [Cython] Running Cython 0.11.2 tests using MinGW32

On Sat, May 30, 2009 at 12:04 PM, Robert Bradshaw
<robertwb@...> wrote:
> On May 28, 2009, at 3:50 PM, Lisandro Dalcin wrote:
>
>>
>> Anyway, suppose you have installed both MSVC and MinGW, an as you are
>> a serious Cython developer, you want to run the testsuite with both.
>> The easiest way to select GCC would be to pass '--mingw' to
>> runtests.py, right?
>
>
> I hadn't thought of that. Are you saying that you would have a single
> Python install that works both with MSVC and MinGW?
>

Of course!

In my particular case, I have installed stock Python 2.6 (using the
MSI installed from python.org), and I routinely test mpi4py building
it with MSVC Express 2008 and MinGW32, with a couple of different MPI
implementations (DeinoMPI, MPICH2, and very recently Microsoft MPI).
Up to now, all work just fine. Of course, I've been very careful and
my code does not call anything from the C stdlib (which is know to
have issues when building with MinGW, because of possible mismatches
of the C runtime).

OTOH, most of the Cython testsuite pass happily with the stock Python
2.6 and MinGW32. The only offending part are test like 'cdef extern
void foo()', as that end-up with linker errors.

(Continue reading)

Robert Bradshaw | 1 Jun 2009 21:17
Favicon

Re: [Cython] Running Cython 0.11.2 tests using MinGW32

On Jun 1, 2009, at 7:33 AM, Lisandro Dalcin wrote:

> On Sat, May 30, 2009 at 12:04 PM, Robert Bradshaw
> <robertwb@...> wrote:
>> On May 28, 2009, at 3:50 PM, Lisandro Dalcin wrote:
>>
>>>
>>> Anyway, suppose you have installed both MSVC and MinGW, an as you  
>>> are
>>> a serious Cython developer, you want to run the testsuite with both.
>>> The easiest way to select GCC would be to pass '--mingw' to
>>> runtests.py, right?
>>
>>
>> I hadn't thought of that. Are you saying that you would have a single
>> Python install that works both with MSVC and MinGW?
>>
>
> Of course!
>
> In my particular case, I have installed stock Python 2.6 (using the
> MSI installed from python.org), and I routinely test mpi4py building
> it with MSVC Express 2008 and MinGW32, with a couple of different MPI
> implementations (DeinoMPI, MPICH2, and very recently Microsoft MPI).
> Up to now, all work just fine. Of course, I've been very careful and
> my code does not call anything from the C stdlib (which is know to
> have issues when building with MinGW, because of possible mismatches
> of the C runtime).

Ah, I didn't know avoiding the C stdlib was all that one needed to do  
(Continue reading)

Dag Sverre Seljebotn | 1 Jun 2009 21:48
Picon
Picon

Re: [Cython] Running Cython 0.11.2 tests using MinGW32

Robert Bradshaw wrote:
> On Jun 1, 2009, at 7:33 AM, Lisandro Dalcin wrote:
>
>   
>> On Sat, May 30, 2009 at 12:04 PM, Robert Bradshaw
>> <robertwb@...> wrote:
>>     
>>> On May 28, 2009, at 3:50 PM, Lisandro Dalcin wrote:
>>>
>>>       
>>>> Anyway, suppose you have installed both MSVC and MinGW, an as you  
>>>> are
>>>> a serious Cython developer, you want to run the testsuite with both.
>>>> The easiest way to select GCC would be to pass '--mingw' to
>>>> runtests.py, right?
>>>>         
>>> I hadn't thought of that. Are you saying that you would have a single
>>> Python install that works both with MSVC and MinGW?
>>>
>>>       
>> Of course!
>>
>> In my particular case, I have installed stock Python 2.6 (using the
>> MSI installed from python.org), and I routinely test mpi4py building
>> it with MSVC Express 2008 and MinGW32, with a couple of different MPI
>> implementations (DeinoMPI, MPICH2, and very recently Microsoft MPI).
>> Up to now, all work just fine. Of course, I've been very careful and
>> my code does not call anything from the C stdlib (which is know to
>> have issues when building with MinGW, because of possible mismatches
>> of the C runtime).
(Continue reading)

Lisandro Dalcin | 1 Jun 2009 22:08
Picon
Gravatar

Re: [Cython] Running Cython 0.11.2 tests using MinGW32

On Mon, Jun 1, 2009 at 4:48 PM, Dag Sverre Seljebotn
<dagss@...> wrote:
> Robert Bradshaw wrote:
>>
>> Ah, I didn't know avoiding the C stdlib was all that one needed to do
>> here. You can tell I'm not a Windows developer :)
>>

You can tell the same about me :-)

> IIRC, an additional point: I think using the stdlib should work as long
> as you link in the proper MinGW stdlib, and make sure not to exchange
> uses of the stdlib with modules compiled with a different compiler.
>
> It's basically like having two different stdlibs -- file handles from
> one of them won't make sense to the other, buffering output in one of
> them won't be seen by the other, and so on.
>

> Am I right? (This came form a numpy-discuss thread somewhere, they've
> discussed this a couple of times.)
>

Yes, you are right. But I do not know how to ask MinGW use a
particular C runtime. Though I bet there is a way (and likely numpy
folks know it).

--

-- 
Lisandro DalcĂ­n
---------------
(Continue reading)


Gmane