Skip Menu |

This queue is for tickets about the Class-XSAccessor CPAN distribution.

Report information
The Basics
Id: 70567
Status: resolved
Priority: 0/
Queue: Class-XSAccessor

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

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



Subject: Bleadperl breaks due to static/non-static declarations
With current bleadperl I get a fail with these diagnostocs: cc -c -I. -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -Wall -W -DVERSION=\"1.11\" -DXS_VERSION=\"1.11\" -fPIC "-I/home/src/perl/repoperls/installed-perls/perl/v5.15.2-158-ga62da8e/2b65/lib/5.15.2/x86_64-linux-ld/CORE" XSAccessor.c XSAccessor.c:741:13: error: static declaration of ‘XS_Class__XSAccessor_getter_init’ follows non-static declaration XSAccessor.xs:423:6: note: previous declaration of ‘XS_Class__XSAccessor_getter_init’ was here XSAccessor.c:778:13: error: static declaration of ‘XS_Class__XSAccessor_getter’ follows non-static declaration XSAccessor.xs:422:6: note: previous declaration of ‘XS_Class__XSAccessor_getter’ was here XSAccessor.c:814:13: error: static declaration of ‘XS_Class__XSAccessor_lvalue_accessor_init’ follows non-static declaration XSAccessor.xs:427:6: note: previous declaration of ‘XS_Class__XSAccessor_lvalue_accessor_init’ was here XSAccessor.c:861:13: error: static declaration of ‘XS_Class__XSAccessor_lvalue_accessor’ follows non-static declaration XSAccessor.xs:426:6: note: previous declaration of ‘XS_Class__XSAccessor_lvalue_accessor’ was here XSAccessor.c:908:13: error: static declaration of ‘XS_Class__XSAccessor_setter_init’ follows non-static declaration XSAccessor.xs:431:6: note: previous declaration of ‘XS_Class__XSAccessor_setter_init’ was here XSAccessor.c:945:13: error: static declaration of ‘XS_Class__XSAccessor_setter’ follows non-static declaration XSAccessor.xs:430:6: note: previous declaration of ‘XS_Class__XSAccessor_setter’ was here XSAccessor.c:981:13: error: static declaration of ‘XS_Class__XSAccessor_chained_setter_init’ follows non-static declaration XSAccessor.xs:440:6: note: previous declaration of ‘XS_Class__XSAccessor_chained_setter_init’ was here XSAccessor.c:1018:13: error: static declaration of ‘XS_Class__XSAccessor_chained_setter’ follows non-static declaration XSAccessor.xs:439:6: note: previous declaration of ‘XS_Class__XSAccessor_chained_setter’ was here XSAccessor.c:1054:13: error: static declaration of ‘XS_Class__XSAccessor_accessor_init’ follows non-static declaration [...] Let me know if you need more information,
Indeed, this is the same problem seen by Mouse. Class::XSAccessor did not have a problem with the linkage behaviour changing in XS() (which was the blead change that ORIGINALLY broke Mouse), but having XS() be different from what EU::ParseXS generates is a problem (which is the new behaviour that fixes Coro/SDL/etc and makes it easier for Mouse to fix itself). The proper way to address this issue will be to require a newer version of ExtUtils::ParseXS and explicitly specify the desired linkage behaviour, but that will have to wait for a stable EU::ParseXS release with the relevant changes. Thanks for the report! Please also let me know of any other modules failing due to these changes. I'll try to work with the authors to get their modules in shape for the next perl or EU::ParseXS releases. Best regards, Steffen
I just tested a simple change to the module to see if my claims of fixing this easily have any truth to them. The following is the entire change required. I will apply it and make a new release when there's a stable ExtUtils::ParseXS release available with the behavior changes. Best regards, Steffen diff --git a/Makefile.PL b/Makefile.PL index 2e8bbbd..29bad6d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -7,7 +7,6 @@ use ExtUtils::MakeMaker; use Config; our $OPTIMIZE; - if ($Config{gccversion}) { $OPTIMIZE = '-O3 -Wall -W'; } elsif ($Config{osname} eq 'MSWin32') { @@ -31,6 +30,7 @@ WriteMakefile1( }, BUILD_REQUIRES => { 'Test::More' => 0, + 'ExtUtils::ParseXS' => '3.04_01', # for explicitly selecting xsub linkage }, NAME => 'Class::XSAccessor', VERSION_FROM => 'lib/Class/XSAccessor.pm', # finds $VERSION diff --git a/XSAccessor.xs b/XSAccessor.xs index 69077a9..3fc292a 100644 --- a/XSAccessor.xs +++ b/XSAccessor.xs @@ -536,6 +539,7 @@ STATIC MGVTBL cxsa_lvalue_acc_magic_vtable = { MODULE = Class::XSAccessor PACKAGE = Class::XSAccessor PROTOTYPES: DISABLE +EXPORT_XSUB_SYMBOLS: ENABLE BOOT: #ifdef CXA_ENABLE_ENTERSUB_OPTIMIZATION
Should be resolved with the newest versions of Class::XSAccessor and ExtUtils::ParseXS.