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

Hello,
i'm trying to install MooseX::Declare and Method::Signatures on windows Strawberry. For both of these modules, one of the prerequisites is Devel::BeginLift, and it won't install.

I tried :
cpan> install Devel::BeginLift which says

Database was generated on Sat, 16 Jun 2012 23:36:59 GMT Running install for module 'Devel::BeginLift' Running make for F/FL/FLORA/Devel-BeginLift-0.001003.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\F\FL\FLORA\Devel-Be +ginLift-0.001003.tar.gz ok Scanning cache C:\strawberry\cpan\build for sizes ...................................................................... +.....-DONE DEL(1/2): C:\strawberry\cpan\build\File-Find-Rule-0.33-xINwXI DEL(2/2): C:\strawberry\cpan\build\File-Find-Rule-0.33-xINwXI.yml CPAN.pm: Building F/FL/FLORA/Devel-BeginLift-0.001003.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Devel::BeginLift Writing MYMETA.yml and MYMETA.json cp lib/Devel/BeginLift.pm blib\lib\Devel\BeginLift.pm C:\strawberry\perl\bin\perl.exe "-Iinc" C:\strawberry\perl\lib\ExtUtil +s\xsubpp -typemap C:\strawberry\perl\lib\ExtUtils\typemap -typemap C:\strawberr +y\perl\site\lib\B\Utils\Install\typemap BeginLift.xs > BeginLift.xsc + && C:\strawberry\perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e mv + -- BeginLift.xsc BeginLift.c gcc -c -IC:\strawberry\perl\site\lib\B\Hooks\OP\Check\Install -IC:\st +rawberry\perl\site\lib\B\Utils\Install -IC:\strawberry\perl\site\lib\ +B\Hooks\OP\Check\EntersubForCV\Install -s -O2 -DWIN32 -DHAVE_DE +S_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_ +SYS -fno-strict-aliasing -mms-bitfields -DPERL_MSVCRT_READFIX -s -O2 + -DVERSION=\"0.001003\" -DXS_VERSION=\"0.001003\" "-IC +:\strawberry\perl\lib\CORE" BeginLift.c Running Mkbootstrap for Devel::BeginLift () C:\strawberry\perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e chmod - +- 644 BeginLift.bs C:\strawberry\perl\bin\perl.exe "-Iinc" -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Devel::BeginLift\", 'DLBASE' => 'BeginLi +ft', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VAR +S' => []);" dlltool --def BeginLift.def --output-exp dll.exp g++ -o blib\arch\auto\Devel\BeginLift\BeginLift.dll -Wl,--base-file -W +l,dll.base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\ +c\lib" BeginLift.o C:\strawberry\perl\lib\CORE\libperl512.a C:\strawberry\perl\site\lib\a +uto\B\Hooks\OP\Check\Check.a C:\strawberry\perl\site\lib\auto\B\Utils +\Utils.a C:\strawberry\perl\site\lib\auto\B\Hooks\OP\Check\EntersubFo +rCV\EntersubForCV.a C:\strawberry\c\i686-w64-mingw32\lib\libmoldname. +a C:\strawberry\c\i686-w64-mingw32\lib\libkernel32.a C:\strawberry\c\ +i686-w64-mingw32\lib\libuser32.a C:\strawberry\c\i686-w64-mingw32\lib +\libgdi32.a C:\strawberry\c\i686-w64-mingw32\lib\libwinspool.a C:\str +awberry\c\i686-w64-mingw32\lib\libcomdlg32.a C:\strawberry\c\i686-w64 +-mingw32\lib\libadvapi32.a C:\strawberry\c\i686-w64-mingw32\lib\libsh +ell32.a C:\strawberry\c\i686-w64-mingw32\lib\libole32.a C:\strawberry +\c\i686-w64-mingw32\lib\liboleaut32.a C:\strawberry\c\i686-w64-mingw3 +2\lib\libnetapi32.a C:\strawberry\c\i686-w64-mingw32\lib\libuuid.a C: +\strawberry\c\i686-w64-mingw32\lib\libws2_32.a C:\strawberry\c\i686-w +64-mingw32\lib\libmpr.a C:\strawberry\c\i686-w64-mingw32\lib\libwinmm +.a C:\strawberry\c\i686-w64-mingw32\lib\libversion.a C:\strawberry\c\ +i686-w64-mingw32\lib\libodbc32.a C:\strawberry\c\i686-w64-mingw32\lib +\libodbccp32.a C:\strawberry\c\i686-w64-mingw32\lib\libcomctl32.a dll.exp BeginLift.o:BeginLift.c:(.text+0x787): undefined reference to `Perl_pa +d_swipe' collect2: ld returned 1 exit status dmake.EXE: Error code 129, while making 'blib\arch\auto\Devel\BeginLi +ft\BeginLift.dll' FLORA/Devel-BeginLift-0.001003.tar.gz C:\strawberry\c\bin\dmake.EXE -- NOT OK 'YAML' not installed, will not store persistent state Running make test Can't te st without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: FLORA/Devel-BeginLift-0.001003.tar.gz : make NO

I tried to install by hand with dmake, and got the same error.
I searched on Google but didn't find a solution. The fact that i don't understand the error probably doesn't help.
It seems that the error is

BeginLift.o:BeginLift.c:(.text+0x787): undefined reference to `Perl_pa +d_swipe'
I didn't find on Google what Perl_pad_swipe is.

Any idea of what i could do from there?

Replies are listed 'Best First'.
Re: Devel::BeginLift make problem (magic--)
by tye (Sage) on Jun 18, 2012 at 19:35 UTC

    Devel::BeginLift says "It does this via some slightly insane perlguts magic."

    You expected something other than pain?

    - tye        

Re: Devel::BeginLift make problem
by Anonymous Monk on Jun 18, 2012 at 04:06 UTC

    When you see this type of error (missing perl symbol), the thing to try is this

    To me that means there is no way that is going to work (at least on win32) without compiling a new perl which explicitly exports pad_swipe -- or copy/pasting pad_swipe code into BeginLift.xs -- this has happened before with Devel/B:: modules :) the cost of being on win32

    The http://matrix.cpantesters.org/?dist=Devel-BeginLift+0.001003 confirms this, there are no win32 PASS grades

    Please report bug upstream to BeginLift author

      In your code there is a "the.patch". I'm not sure what that is, i don't have a patch for this problem.
      And I don't know how to compile a new perl which explicitly exports pad_swipe.
      Thanks for looking though :-)

      I'll go for the bug report and wait. And just not use these for now.

        In your code there is a "the.patch". I'm not sure what that is, i don't have a patch for this problem.

        :D Its the file generated by the ppport.h perl program, obviously :)

        And I don't know how to compile a new perl which explicitly exports pad_swipe.

        Me too :) I could go digging it up, but this is really a problem for the CPAN author to solve -- has to persuade p5p to add that symbol to the export list, or circumvent them by patching his code

        Waiting is wise :)

Re: Devel::BeginLift make problem
by perl-diddler (Chaplain) on Jun 17, 2012 at 20:58 UTC
    When I searched for Perl_pad_swipe and perl, I saw several references to debugging perl. Could your module-compile stuff be set to compile for a debug perl while the perl you are using is not?

      Maybe. I don't know what this "module-compile stuff" is, so i wouldn't know how to check this.

      Thank you for a first idea though :-) Hopefully the right one...