[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Problems with exceptions and threads, run tim

From: Volker Grabsch
Subject: Re: [Mingw-cross-env-list] Problems with exceptions and threads, run time library selection issue
Date: Fri, 22 Apr 2011 14:51:08 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hello Kay,

Sorry for this late answer which is probably not very helpful.
Anyway, I'm trying to help as much as I can.

To all other mingw-cross-env users: Please read this mail
and check whether the proposed changes would affect your
projects! I'd like to read more opinions on that topic.

Kay Hayen schrieb:
>          --disable-shared \
> +        --disable-sjlj-exceptions \
>          --without-x \
> Previously I read that DW2 exceptions were now the default. Was this
> reverted somehow? And why?

I fully agree to include this line, as SJLJ exceptions are
not meant to be enabled at all in mingw-cross-env. I just
committed that improvement in your name. Thanks!


> +    # Patch to not use msvcrt.dll, but msvcr90.dll
> +    sed -i $(1)/gcc/config/i386/t-mingw-w32 -e 's/msvcrt/msvcr90/'
> +    sed -i $(1)/gcc/config/i386/t-mingw-w32 -e 's/moldname/moldname90/'
> +    sed -i $(1)/gcc/config/i386/t-mingw32 -e 's/msvcrt/msvcr90/'
> +    sed -i $(1)/gcc/config/i386/t-mingw32 -e 's/moldname/moldname90/'
> +    sed -i $(1)/gcc/config/i386/mingw32.h -e 's/msvcrt/msvcr90/'
> +    sed -i $(1)/gcc/config/i386/mingw32.h -e 's/moldname/moldname90/'
> +

I'm not sure about those lines. To my understanding, GCC should
not produce anything that depends on the msvcr90 runtime, so I don't
know how you got that double-dependency on msvcrt+msvcr90 in the
first place.

To me, it seems to be more "right" to hunt down this msvcr90
dependency and to ensure that only msvcrt is used. However, feel
free to complain if I'm talking nonsense here.

> Now obviously I am confused:
> 4.5.0 + DW2 exceptions -> segfault, likely due to duplicate run
> times, or due to some thread problems with 4.5 ?
> 4.5.0 + SLJL exceptions -> wrong thread catches.
> 4.6.0 + SJLJ exceptions + one runtime -> wrong thread catches
> 4.6.0 + DW2 exceptions + one runtime -> works

I think that this particular issue is outside the scope of
mingw-cross-env and should be discussed directly on the
MinGW-Users list. [1]  It would be great if you could bring
up your issue there (without the SJLJ stuff as this is solved
by now). I'm curious what those guys will answer to you.

> And what are the chances of making the runtime to be used for
> created binaries configurable? For compiling Python extensions or
> Python embedding programs, there is really no other way than to use
> that specific run time I believe.

I'm not sure whether GCC is meant to be (runtime-)configurable in
that regard. Also, to my understanding it should not matter if a DLL
uses a different C runtime than the calling application (Python).

(However, C++ is a totally different situation. Here, not only
 the runtime but also the compiler and compiler version have to
 be the same. This is why foreign language binding are usually
 based on C rather than on C++ interfaces.)

Again, feel free to correct me if I'm wrong.

Regarding mingw-cross-env, I'd accept a patch that permanently
switches the used runtime from msvcrt to msvcr90, as this should
still support all Windows versions currently supported by MS.

However, I'd first like to see a discussion on MinGW-Users about
that topic, as the MinGW experts are there, not here.

To all other mingw-cross-env users: Please complain if there
are reasons not to do that!


[1] https://lists.sourceforge.net/lists/listinfo/mingw-users

Volker Grabsch

reply via email to

[Prev in Thread] Current Thread [Next in Thread]