Subject: | complex.h's cpow() broken. |
Hi,
I have:
'Win32 strawberryperl 5.12.0.1 #1 Thu May 6 16:09:27 2010 i386'
'Win32 strawberryperl 5.12.2.0 #1 Fri Nov 5 20:21:06 2010 i386'
and
'Win32 strawberryperl 5.12.0.1 #1 Fri May 7 04:27:48 2010 x64'
Math::Complex_C won't build on any of those perls because of a problem
resolving the cpow() function. Here's the demo C code:
#########################
#include <stdio.h>
#include <complex.h>
int main(void) {
double _Complex rop, op, power;
__real__ op = 3.0;
__imag__ op = 0.0;
__real__ power = 2.0;
__imag__ power = 0.0;
rop = cpow(op, power);
printf("%f %f\n", creal(rop), cimag(rop));
return 0;
}
#########################
The error:
c:/_32/strawberry512/c/bin/../lib/gcc/i686-w64-
mingw32/4.4.3/../../../../i686-w64-mingw32/lib/libmingwex.a
(lib32_libmingwex_a-cpow.o): In function `cpow':
/opt/W64_156151-src.32/build-crt/../mingw-w64-crt/complex/cpow.c:39:
undefined reference to `_imp__pow'
collect2: ld returned 1 exit status
This is the same error as kills the Math::Complex_C build on my 32-bit
and 64-bit builds of Strawberry.
I did find the same behaviour with 'gcc version 4.4.4 20100208
(prerelease) (GCC)', but the other builds from the mingw64 project that
I have, all work fine.
I've rated the severity of this bug as "Normal". I wouldn't argue with
anyone who wanted to change that rating (in either direction ;-)
Cheers,
Rob