nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

Undefined subroutine &attributes::reftype >= 5.15.3 (XSLoader::load_file problem) #260

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
pcc -O3 -e'sub FETCH_SCALAR_ATTRIBUTES {''} sub MODIFY_SCALAR_ATTRIBUTES {''}; 
my $a :x=1; print $a'

Undefined subroutine &attributes::reftype called at 
/usr/local/lib/perl5/5.18.1/darwin-debug/attributes.pm line 57.

That's the simpliest attribute example. Note: works fine with our.

Original issue reported on code.google.com by reini.urban on 16 Dec 2013 at 3:50

GoogleCodeExporter commented 9 years ago
works up to 5.15.2, starts failing with 5.15.3

Original comment by reini.urban on 16 Dec 2013 at 6:31

GoogleCodeExporter commented 9 years ago

Original comment by reini.urban on 16 Dec 2013 at 6:31

GoogleCodeExporter commented 9 years ago
bisected to commit 9d254dcaf7d61fc8866c7e664d796dde791a59f5
Author: Stevan Little <stevan.little@iinteractive.com>
Date:   Mon Sep 19 17:14:52 2011 -0400

    bump version to 5.15.3 using Porting/bump-perl-version

but I have no idea why it started failing with this.
with --staticxs this commit passes

Original comment by reini.urban on 16 Dec 2013 at 10:10

GoogleCodeExporter commented 9 years ago
Now I know why: 
B::C starts using the internal XSLoader::load_file function starting with 5.15.3
# 5.15.3 workaround [perl #101336], without .bs support
# XSLoader::load_file($module, $modlibname, ...)

--staticxs bypasses this function.

Original comment by reini.urban on 18 Dec 2013 at 10:24

GoogleCodeExporter commented 9 years ago
bisected with t/test-c-bisect.sh 44 perl5.16.3-nt to

commit c4d49b2a30dde3fc50a00a21eed62afea3ef8e9f
Author: Reini Urban <rurban@cpanel.net>
Date:   Wed Mar 6 14:20:07 2013 -0600

    C major change: skip redefinition of internal XS CVs

    Internal XS xsubs are already booted in the perl_parse step.
    When we encounter them we set new GPs for those, which was a problem on Windows
    where we cannot declare and boot the said XS functions (not exported).
    We rather keep the old GV, GP and CV.

Original comment by reini.urban on 19 Dec 2013 at 3:40

GoogleCodeExporter commented 9 years ago
test 42 fails on all perls with 
  Undefined subroutine &attributes::reftype called at attributes.pm
but 5.12 and 5.14.

Original comment by reini.urban on 19 Dec 2013 at 8:58

GoogleCodeExporter commented 9 years ago
Fixed with 1.42_66
commit 787fae8afca2dc41732e35d5b542dda6d437d101
Author: Reini Urban <rurban@cpanel.net>
Date:   Thu Dec 19 16:27:03 2013 -0600

    C 1.42_66: fix XSLoader::load_file

    use proper dlext string append. fixes most 5.16,5.18 XS tests
    add more DynaLoader::dl_debug output (set PERL_DL_DEBUG=1)
    Simplify xs stub definitions to one-liners with SvREFCNT_inc_simple_NN()
    remove DynaLoader from static_in_core list, needs to be booted explicitly.
    support user-defined static_ext modules (add themm to static_in_core)

Original comment by reini.urban on 20 Dec 2013 at 6:09