I have run into an issue attempting to build the CPAN module Newt-1.08. The Newt.xs/Newt.c module fails compilation. A project I have been trying to port uses Newt.

The system is running Redhat EL6, the compiler is gcc 4.4.7. Here is the relevant error message:

gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack +-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack +-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION= +\"1.08\" -DXS_VERSION=\"1.08\" -fPIC "-I/usr/lib64/perl5/CORE" Newt +.c Newt.xs: In function âconstantâ: Newt.xs:99: warning: âreturnâ with no value, in function returning non +-void Newt.xs:658: warning: label ânot_thereâ defined but not used Newt.c: In function âXS_Newt_va_endâ: Newt.c:765: error: cast specifies array type Newt.c: In function âXS_Newt_newtFormRunâ: Newt.xs:1041: warning: unused variable âsvâ Newt.c: In function âXS_Newt_newtButtonBarvâ: Newt.c:3442: error: cast specifies array type Newt.c: In function âXS_Newt_newtWinMessagevâ: Newt.c:3528: error: cast specifies array type make: *** [Newt.o] Error 1

The portion of the Newt.c program relevant to the first error at line 765 is (actual error is set off with dashes):

XS(XS_Newt_va_end); /* prototype to pass -Wmissing-prototypes */ XS(XS_Newt_va_end) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) croak_xs_usage(cv, "arg0"); { __gnuc_va_list arg0; -------------------------- if (sv_derived_from(ST(0), "__gnuc_va_list")) { IV tmp = SvIV((SV*)SvRV(ST(0))); arg0 = INT2PTR(__gnuc_va_list,tmp); -------------------------- } else Perl_croak(aTHX_ "%s: %s is not of type %s", "Newt::va_end", "arg0", "__gnuc_va_list"); va_end(arg0); } XSRETURN_EMPTY; }

So how did this compile in the first place? I am just not seeing what I'm doing wrong.


In reply to Issue with CPAN module not building by zbuser

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.