Skip Menu |

This queue is for tickets about the Math-MPC CPAN distribution.

Report information
The Basics
Id: 58564
Status: resolved
Priority: 0/
Queue: Math-MPC

People
Owner: Nobody in particular
Requestors: garen.p [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Math::MPC doesn't compile in Strawberry Perl 5.12.0.1
Date: Mon, 21 Jun 2010 06:52:30 -0700
To: bug-Math-MPC [...] rt.cpan.org
From: Garen <garen.p [...] gmail.com>
Build failure on Windows XP 32-bit: ... Checking if your kit is complete... Looks good Writing Makefile for Math::MPC cp MPC.pm blib\lib\Math\MPC.pm C:\Perl\strawberry\5.12.0.1\perl\bin\perl.exe C:\Perl\strawberry\5.12.0.1\perl\l ib\ExtUtils\xsubpp  -typemap C:\Perl\strawberry\5.12.0.1\perl\lib\ExtUtils\typem ap -typemap typemap  MPC.xs > MPC.xsc && C:\Perl\strawberry\5.12.0.1\perl\bin\pe rl.exe -MExtUtils::Command -e "mv" -- MPC.xsc MPC.c gcc -c          -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPL ICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -DPERL_MSVC RT_READFIX -s -O2         -DVERSION=\"0.81\"    -DXS_VERSION=\"0.81\"  "-IC:\Per l\strawberry\5.12.0.1\perl\lib\CORE"  -DNEWPERL MPC.c MPC.xs:50: error: expected declaration specifiers or '...' before 'intmax_t' MPC.xs:123: error: expected declaration specifiers or '...' before 'intmax_t' MPC.xs:151: error: expected declaration specifiers or '...' before 'intmax_t' MPC.c: In function 'XS_Math__MPC__mpc_mul_sj': MPC.c:2918: error: 'intmax_t' undeclared (first use in this function) MPC.c:2918: error: (Each undeclared identifier is reported only once MPC.c:2918: error: for each function it appears in.) MPC.c:2918: error: expected ';' before 'i' MPC.c:2923: error: 'i' undeclared (first use in this function) MPC.c:2923: error: too many arguments to function '_mpc_mul_sj' MPC.c: In function 'XS_Math__MPC__mpc_div_sj': MPC.c:2993: error: 'intmax_t' undeclared (first use in this function) MPC.c:2993: error: expected ';' before 'i' MPC.c:2998: error: 'i' undeclared (first use in this function) MPC.c:2998: error: too many arguments to function '_mpc_div_sj' MPC.c: In function 'XS_Math__MPC__mpc_sj_div': MPC.c:3017: error: 'intmax_t' undeclared (first use in this function) MPC.c:3017: error: expected ';' before 'i' MPC.c:3023: error: 'i' undeclared (first use in this function) MPC.c:3023: warning: passing argument 3 of '_mpc_sj_div' makes integer from poin ter without a cast MPC.xs:151: note: expected 'mpc_rnd_t' but argument is of type 'mpc_ptr' MPC.c:3023: error: too many arguments to function '_mpc_sj_div' dmake.EXE:  Error code 129, while making 'MPC.o'   SISYPHUS/Math-MPC-0.81.tar.gz   C:\Perl\strawberry\5.12.0.1\c\bin\dmake.EXE -- NOT OK Running make test   Can't test without successful make Checking if your kit is complete... Looks good Writing Makefile for Math::MPC cp MPC.pm blib\lib\Math\MPC.pm C:\Perl\strawberry\5.12.0.1\perl\bin\perl.exe C:\Perl\strawberry\5.12.0.1\perl\l ib\ExtUtils\xsubpp -typemap C:\Perl\strawberry\5.12.0.1\perl\lib\ExtUtils\typem ap -typemap typemap MPC.xs > MPC.xsc && C:\Perl\strawberry\5.12.0.1\perl\bin\pe rl.exe -MExtUtils::Command -e "mv" -- MPC.xsc MPC.c gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPL ICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -DPERL_MSVC RT_READFIX -s -O2 -DVERSION=\"0.81\" -DXS_VERSION=\"0.81\" "-IC:\Per l\strawberry\5.12.0.1\perl\lib\CORE" -DNEWPERL MPC.c MPC.xs:50: error: expected declaration specifiers or '...' before 'intmax_t' MPC.xs:123: error: expected declaration specifiers or '...' before 'intmax_t' MPC.xs:151: error: expected declaration specifiers or '...' before 'intmax_t' MPC.c: In function 'XS_Math__MPC__mpc_mul_sj': MPC.c:2918: error: 'intmax_t' undeclared (first use in this function) MPC.c:2918: error: (Each undeclared identifier is reported only once MPC.c:2918: error: for each function it appears in.) MPC.c:2918: error: expected ';' before 'i' MPC.c:2923: error: 'i' undeclared (first use in this function) MPC.c:2923: error: too many arguments to function '_mpc_mul_sj' MPC.c: In function 'XS_Math__MPC__mpc_div_sj': MPC.c:2993: error: 'intmax_t' undeclared (first use in this function) MPC.c:2993: error: expected ';' before 'i' MPC.c:2998: error: 'i' undeclared (first use in this function) MPC.c:2998: error: too many arguments to function '_mpc_div_sj' MPC.c: In function 'XS_Math__MPC__mpc_sj_div': MPC.c:3017: error: 'intmax_t' undeclared (first use in this function) MPC.c:3017: error: expected ';' before 'i' MPC.c:3023: error: 'i' undeclared (first use in this function) MPC.c:3023: warning: passing argument 3 of '_mpc_sj_div' makes integer from poin ter without a cast MPC.xs:151: note: expected 'mpc_rnd_t' but argument is of type 'mpc_ptr' MPC.c:3023: error: too many arguments to function '_mpc_sj_div' dmake.EXE: Error code 129, while making 'MPC.o' SISYPHUS/Math-MPC-0.81.tar.gz C:\Perl\strawberry\5.12.0.1\c\bin\dmake.EXE -- NOT OK Running make test Can't test without successful make
On Mon Jun 21 09:52:42 2010, garen.p@gmail.com wrote: Show quoted text
> Build failure on Windows XP 32-bit:
Show quoted text
> MPC.c: In function 'XS_Math__MPC__mpc_div_sj': > MPC.c:2993: error: 'intmax_t' undeclared (first use in this function)
We just need to #include inttypes.h - it then builds ok on Strawberry Perl 5.12.0.1 for me. Near the top of MPC.xs we currently have: #if defined USE_64_BIT_INT || defined USE_LONG_DOUBLE #ifndef _MSC_VER #include <inttypes.h> #include <limits.h> #endif #endif Remove the first and last of those lines: #ifndef _MSC_VER #include <inttypes.h> #include <limits.h> #endif and all should be well. I'll upload Math::MPC-0.82 later today, with that change in it. (Let me know if that doesn't fix the problem, or if there are any other issues.) It's a bit of a puzzle to me that the same problem didn't arise on any of the perls where I actually tested Math::MPC-0.81 before releasing it. I guess they must have somehow included inttypes.h .... Anyway, apologies for any annoyance this has caused you, and thanks very much for the report ! Cheers, Rob
Subject: Re: [rt.cpan.org #58564] Math::MPC doesn't compile in Strawberry Perl 5.12.0.1
Date: Tue, 22 Jun 2010 09:39:17 -0700
To: bug-Math-MPC [...] rt.cpan.org
From: Garen <garen.p [...] gmail.com>
Ah, no worries, thanks for actually responding. :) My guess would be that the reason is that gcc sometimes automagically include's some of the standard headers for you (stdio.h, stdlib.h, stdint.h, ...) for some platforms. Surely convenient, but not when you don't notice it will fail on other platforms (e.g. windows) where it doesn't occur. :) On Mon, Jun 21, 2010 at 5:13 PM, Sisyphus via RT <bug-Math-MPC@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=58564 > > > On Mon Jun 21 09:52:42 2010, garen.p@gmail.com wrote:
>> Build failure on Windows XP 32-bit:
>
>> MPC.c: In function 'XS_Math__MPC__mpc_div_sj': >> MPC.c:2993: error: 'intmax_t' undeclared (first use in this function)
> > We just need to #include inttypes.h - it then builds ok on Strawberry > Perl 5.12.0.1 for me. > > Near the top of MPC.xs we currently have: > > #if defined USE_64_BIT_INT || defined USE_LONG_DOUBLE > #ifndef _MSC_VER > #include <inttypes.h> > #include <limits.h> > #endif > #endif > > Remove the first and last of those lines: > > #ifndef _MSC_VER > #include <inttypes.h> > #include <limits.h> > #endif > > and all should be well. I'll upload Math::MPC-0.82 later today, with > that change in it. (Let me know if that doesn't fix the problem, or if > there are any other issues.) > > It's a bit of a puzzle to me that the same problem didn't arise on any > of the perls where I actually tested Math::MPC-0.81 before releasing > it. I guess they must have somehow included inttypes.h .... > > Anyway, apologies for any annoyance this has caused you, and thanks > very much for the report ! > > Cheers, > Rob > > > >
Actually resolved quite a while back .... but hadn't got around to actually closing it.