Subject: | Compilation error with perl 5.21.x |
Compilation fails with bleadperl:
Building Sub-Filter
cc -I/usr/perl5.21.11p/lib/5.21.11/amd64-freebsd/CORE -DVERSION="0.004" -DXS_VERSION="0.004" -DPIC -fPIC -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -O -o lib/Sub/Filter.o lib/Sub/Filter.c
lib/Sub/Filter.xs:192:10: warning: incompatible pointer types assigning to 'PADNAMELIST *' (aka 'struct padnamelist *') from 'AV *' (aka 'struct av *') [-Wincompatible-pointer-types]
padname = newAV();
^ ~~~~~~~
lib/Sub/Filter.xs:196:2: error: assignment to cast is illegal, lvalue casts are not supported
PadlistNAMES(padlist) = padname;
^~~~~~~~~~~~~~~~~~~~~ ~
/usr/perl5.21.11p/lib/5.21.11/amd64-freebsd/CORE/pad.h:298:27: note: expanded from macro 'PadlistNAMES'
#define PadlistNAMES(pl) ((PADNAMELIST *)*PadlistARRAY(pl))
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/Sub/Filter.xs:246:3: error: use of undeclared identifier 'PL_sv_objcount'; did you mean 'PL_sv_count'?
PL_sv_objcount++;
^~~~~~~~~~~~~~
PL_sv_count
/usr/perl5.21.11p/lib/5.21.11/amd64-freebsd/CORE/intrpvar.h:117:1: note: 'PL_sv_count' declared here
PERLVAR(I, sv_count, IV) /* how many SV* are currently allocated */
^
/usr/perl5.21.11p/lib/5.21.11/amd64-freebsd/CORE/perl.h:5522:43: note: expanded from macro 'PERLVAR'
#define PERLVAR(prefix,var,type) EXT type PL_##var;
^
<scratch space>:124:1: note: expanded from here
PL_sv_count
^
1 warning and 2 errors generated.
error building lib/Sub/Filter.o from 'lib/Sub/Filter.c' at /usr/perl5.21.11p/lib/5.21.11/ExtUtils/CBuilder/Base.pm line 173.