Hi Rob,

On 5.10.2013 17:06, sisyph...@optusnet.com.au wrote:
Hi,

It's no big deal, but current Strawberry Perl 32-bit and 64-bit compilers create executables that crash when expq() is called.

Here's the minimalistic demo script:

####################
#include <quadmath.h>

int main (void) {
 __float128 r;

 r = expq(2.0Q);
 r = sqrtq(2.0Q);
 r = fabsq(2.0Q);
 r = sinq(2.0Q);
 r = logq(2.0Q);
 r = cosq(2.0Q);

 return 0;
}

####################

The resultant executable crashes when run, but remove the expq() call and there's no problem. (Link to -lquadmath when building the above program.)

It's not just MinGW64's gcc-4.6.3 compilers that are affected. I find the same with their 64-bit gcc-4.7.0, and 4.8.1 compilers. (I haven't tested any other MinGW64 compilers.)

I've also found that mingw.org's gcc-4.7.0 does *not* suffer this problem; nor does Ubuntu's gcc-4.6.3 ... so I guess I probably should report this to the mingw64 project.

BTW, the perl relevance here is that, because of this bug, Math::Float128 crashes its test suite when expq() gets called. But I don't think that there's a high demand for this module, so I wouldn't be too concerned about that aspect.

I am afraid I cannot do much about expq crash unless there is newer version of gcc and/or mingw-w64 runtime which does not suffer from this.



Also of slight relevance to Strawberry Perl is the fact that c/lib/gcc/[whatever]-w64-mingw32/4.6.3 is not in $Config{libpth}. As a consequence perl does not automatically find -lquadmath when the Math::Float128 Makefile.PL is run, and perl therefore removes the link. (The gcc linker can find -lquadmath without any help at all ... but it won't look for that library if perl has removed the link.)

As for this part you mean using something like this:

libpth='C:\strawberry\c\lib C:\strawberry\c\x86_64-w64-mingw32\lib C:\strawberry\c\lib\gcc\x86_64-w64-mingw32\4.7.3'

right?

--
kmx

Reply via email to