manojghosh has asked for the wisdom of the Perl Monks concerning the following question:

I have a hstandard header file of a standard product <cryptoki.h>. now i want to use the utility h2xs to create a XS module to use the C program files. but when executing it is giving errors :
manoj@manoj-Vostro-230:~/Desktop/example/crypto$ h2xs -n genseckey -A +-O -x -F '-I ../' cryptoki.h Defaulting to backwards compatibility with perl 5.10.1 If you intend this module to be compatible with earlier perl versions, + please specify a minimum perl version with the -b option. Writing genseckey/ppport.h Scanning typemaps... Scanning /usr/share/perl/5.10/ExtUtils/typemap Scanning cryptoki.h for functions... panic: multiple types without intervening comma in CK_RV(* CK_NOTIFY)( CK_SESSION_HANDLE hSession, CK_NOTIFICATION event, CK_VOID_PTR pApplication ) whited-out as CK_RV(* CK_NOTIFY)( + )

Replies are listed 'Best First'.
Re: Problem in Including a header file in PerlXS using h2xs
by Eliya (Vicar) on Apr 19, 2011 at 12:39 UTC

    The panic message originates in the module C::Scan, which is being used under the hood when you specify the -x option to h2xs.

    The module has a number of known "issues" (and is unmaintained — last release 2001), which is why ModPerl::CScan was forked for use within mod_perl.  You could try to install ModPerl::CScan separately and replace all occurrences of "C::Scan" in (a copy of!) h2xs with "ModPerl::CScan", and see if it helps...

Re: Problem in Including a header file in PerlXS using h2xs
by vkon (Curate) on Apr 19, 2011 at 12:20 UTC
    this "panic" word makes me certainly think it is a time to file a bug report, and/or report to perl5-porters@perl.org

    Right now porters are busy with releasing 5.14.0, so answer could be not quick, but surely they better be informed about your finding.
    :)