develooper Front page | perl.inline | Postings from June 2010

Re: Issue with installing Inline::Java

From:
Sisyphus
Date:
June 18, 2010 20:21
Subject:
Re: Issue with installing Inline::Java
Message ID:
ACDDC03F251D4450A278F97C1BE6CA2C@desktop2

----- Original Message ----- 
From: "selva ganapathy" <ganapathy_selva@yahoo.com>
To: <inline@perl.org>
Sent: Sunday, June 13, 2010 11:18 PM
Subject: Issue with installing Inline::Java

We have got as far as:

#################################
C:\Perl\site\lib\Inline-Java-0.52>dmake

[snip - copying lots of files]

cp PerlNatives.pm ..\..\blib\lib\Inline\Java\PerlNatives.pm
cp PerlNatives.pod ..\..\blib\lib\Inline\Java\PerlNatives.pod
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp  -typemap 
C:\Perl\lib\ExtUtils\
typemap  PerlNatives.xs > PerlNatives.xsc && 
C:\Perl\bin\perl.exe -MExtUtils::Command -e mv PerlNatives.xsc PerlNatives.c
C:/Perl/site/bin/gcc.exe -c  "-IC:\Program Files\Java\jdk1.6.0_20\include" 
"-IC:\Program 
Files\Java\jdk1.6.0_20\include\win32"  -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT 
 -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC  
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX 
 -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields -O2          -DVERSION=\"0.
52\"    -DXS_VERSION=\"0.52\"  "-IC:\Perl\lib\CORE"   PerlNatives.c
PerlNatives.c:271: error: syntax error before "void"
PerlNatives.c:272: error: syntax error before "const"
PerlNatives.c:274: error: syntax error before "void"
PerlNatives.c:275: error: syntax error before "const"
PerlNatives.c: In function `S_croak_xs_usage':
PerlNatives.c:277: error: syntax error before '*' token
PerlNatives.c:279: error: `cv' undeclared (first use in this function)
PerlNatives.c:279: error: (Each undeclared identifier is reported only once
PerlNatives.c:279: error: for each function it appears in.)
PerlNatives.c:279: error: `params' undeclared (first use in this function)
PerlNatives.c:281: error: `gv' undeclared (first use in this function)
PerlNatives.c:282: warning: initialization makes pointer from integer 
without a
cast
PerlNatives.c:283: error: syntax error before '*' token
PerlNatives.c:284: error: `stash' undeclared (first use in this function)
PerlNatives.c:287: error: `aTHX_' undeclared (first use in this function)
PerlNatives.c:287: error: syntax error before string constant
PerlNatives.c:287: error: syntax error before ')' token
PerlNatives.c:292: error: syntax error before string constant
dmake.exe:  Error code 129, while making 'PerlNatives.o'
dmake.exe:  Error code 255, while making 'subdirs'
dmake.exe:  Error code 255, while making 'subdirs'

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

The problem is this piece of code in ExtUtils::ParseXS:

#################################
/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
{
.................
################################

That code gets copied verbatim into PerlNatives.c but, according to the 
MinGW port of gcc-3.4.5, it contains the above syntax errors. It seems that 
'STATIC void' is a syntax error - which can be fixed by removing the 
'STATIC' in both places in ParseXS.pm. But I haven't yet found a solution to 
the syntax errors in "S_croak_xs_usage(pTHX_ const CV *const cv, const char 
*const params)". (These are the "syntax error before "const"" errors.)

Anyone here know what's needed ?

Cheers,
Rob




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About