Skip Menu |

This queue is for tickets about the PAR-Packer CPAN distribution.

Report information
The Basics
Id: 69443
Status: resolved
Priority: 0/
Queue: PAR-Packer

People
Owner: RSCHUPP [...] cpan.org
Requestors: mdengfeng [...] gmail.com
Cc:
AdminCc:

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



Subject: parl.exe try to load dll from c:\strawberry\lib first
Date: Wed, 13 Jul 2011 15:40:26 +0800
To: bug-PAR-Packer [...] rt.cpan.org
From: DengFeng Mao <mdengfeng [...] gmail.com>
Hi, PAR::Packer experts Currently, I am working on win2003 x64 with strawberry-perl-5.12.3x64. I have installed PAR-Packer-1.009 with the patch in https://rt.cpan.org/Ticket/Display.html?id=57273. After the module was installed. I can run the parl.exe correctly. ===================================================== C:\strawberry\perl\site\bin>parl.exe Usage: parl.exe [ -Alib.par ] [ -Idir ] [ -Mmodule ] [ src.par ] [ program.pl ] parl.exe [ -B|-b ] [-Ooutfile] src.par ======================================================= Then I copy the parl.exe to c:\ and install strawberry-perl-5.10.4x86 under c:\strawberry. When I try to run the file c:\parl.exe, I got error ===================================================== C:\>parl.exe Can't load 'C:/strawberry/perl/lib/auto/IO/IO.dll' for module IO: load_file:%1 i s not a valid Win32 application at C:/strawberry/perl/lib/XSLoader.pm line 71. at C:/strawberry/perl/lib/IO.pm line 11 Compilation failed in require at C:/strawberry/perl/lib/IO/Handle.pm line 266. BEGIN failed--compilation aborted at C:/strawberry/perl/lib/IO/Handle.pm line 26 6. Compilation failed in require at C:/strawberry/perl/lib/IO/Seekable.pm line 101. BEGIN failed--compilation aborted at C:/strawberry/perl/lib/IO/Seekable.pm line 101. Compilation failed in require at C:/strawberry/perl/lib/IO/File.pm line 133. BEGIN failed--compilation aborted at C:/strawberry/perl/lib/IO/File.pm line 133. Compilation failed in require at -e line 351. ========================================================= The parl.exe try to load some dll from C:/strawberry/perl/lib. But the dll files can't be loaded successful. Then I try to rename c:\strawberry to another name c:\strawberry_old and try to run c:\parl.exe again. This time , the parl.exe can be executed correctly. I restore the c:\strawberry_old to c:\strawberry. Then the issue takes place again. I also tried PAR-Packer-1.009 on strawberryperl-5.10.4x86. The parl.exe can work well no matter what version strawberry perl was installed to c:\strawberry. Could you help to look into this? Any further information needed, let me know Thanks Dengfeng -- --------------------------------------------------------- Market is wrong, But I am right!
On 2011-07-13 03:40:43, mdengfeng@gmail.com wrote: Show quoted text
> After the module was installed. I can run the parl.exe correctly. > Then I copy the parl.exe to c:\ and install strawberry-perl-5.10.4x86
under Show quoted text
> c:\strawberry. When I try to run the file c:\parl.exe, I got error
Looks like parl.exe (which in theory should be totally self-contained) still looks for modules in C:\strawberry\... (i.e. the configuration from where it was built) in preference to the modules packed into parl.exe. If it finds a module and its DLL in C:\strawberry\... it tries to load that - and that won't work because Perl 5.12 and 5.10 have incompatible ABIs. If there's nothing in C:\strawberry\... it falls back to the built-in modules. This behaviour might be caused by the fact that Strawberry Perl 5.12 contains a new version of XSLoader that breaks PAR::Packer's hack to intercept loading of DLLs. The fix for that is already in PAR::Packer's Subversion repository: http://svn.openfoundry.org/par/PAR-Packer/trunk Could you try that, i.e. - re-install Straberry 5.12.3 - check out the above - apply the patch from RT 57273 as before - build it and save parl.exe While you're at it: regarding that patch from RT 57273: - does "dmake test" pass all tests? - after "dmake install", please try to pack a minimal script pp -o hello.exe -e "print qq[hello world\n]" I'm interested in the output of objdump -h hello.exe in particular if it lists a resource section (".rsrc") (objdump.exe is in C:\strawberry\c\bin). Cheers, Roderich
Subject: Re: [rt.cpan.org #69443] parl.exe try to load dll from c:\strawberry\lib first
Date: Wed, 13 Jul 2011 18:36:39 +0800
To: bug-PAR-Packer [...] rt.cpan.org
From: DengFeng Mao <mdengfeng [...] gmail.com>
Good news. This issue has been fixed in http://svn.openfoundry.org/par/PAR-Packer/trunk. When I install this latest version on strawberry-5.12.3x64.the parl.exe can be executed sucessful no mater what perl version was installed in c:\strawberry. But there is still a test fail , Here are the details C:\workspace\PAR-Packer>dmake test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/00-pod.t t/10-parl-generation.t t/20-pp.t t/3 0-current_exec.t t/40-packer_cd_option.t t/90-rt59710.t t/00-pod.t ............... skipped: Set environment variable PERL_TEST_POD=1 to test POD t/10-parl-generation.t ... ok t/20-pp.t ................ 26/34 The system cannot execute the specified program . t/20-pp.t ................ 27/34 C:\workspace\PAR-Packer\blib\script/pp: Cannot open hello.exe for reading: No such file or directory at C:\workspace\PAR-Packer \blib\lib/PAR/Packer.pm line 1170. # Failed test 'pp_gui_tests # amsg572: sub pp_gui_tests cannot system pp --gui --icon hi.ico -o hello.exe he llo.pl:No such file or directory: # ' # at automated_pp_test.pl line 8445. t/20-pp.t ................ 34/34 # Looks like you failed 1 test of 34. t/20-pp.t ................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/34 subtests t/30-current_exec.t ...... # Please wait t/30-current_exec.t ...... ok t/40-packer_cd_option.t .. ok t/90-rt59710.t ........... ok Test Summary Report ------------------- t/20-pp.t (Wstat: 256 Tests: 34 Failed: 1) Failed test: 32 Non-zero exit status: 1 Files=6, Tests=74, 1378 wallclock secs ( 0.06 usr + 0.00 sys = 0.06 CPU) Result: FAIL Failed 1/6 test programs. 1/74 subtests failed. dmake: Error code 255, while making 'test_dynamic' C:\workspace\PAR-Packer>pp -o hello.exe -e "print qq[hello world\n]" C:\workspace\PAR-Packer>hello.exe hello world C:\workspace\PAR-Packer>objdump -h hello.exe hello.exe: file format pei-x86-64 Sections: Idx Name Size VMA LMA File off Algn 0 .text 000048c0 0000000000401000 0000000000401000 00000400 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 0016b130 0000000000406000 0000000000406000 00004e00 2**5 CONTENTS, ALLOC, LOAD, DATA 2 .rdata 00000580 0000000000572000 0000000000572000 00170000 2**4 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .bss 000089f0 0000000000573000 0000000000573000 00000000 2**5 ALLOC 4 .idata 00000c98 000000000057c000 000000000057c000 00170600 2**2 CONTENTS, ALLOC, LOAD, DATA 5 .CRT 00000068 000000000057d000 000000000057d000 00171400 2**3 CONTENTS, ALLOC, LOAD, DATA 6 .tls 00000048 000000000057e000 000000000057e000 00171600 2**5 CONTENTS, ALLOC, LOAD, DATA 7 .rsrc 00001538 000000000057f000 000000000057f000 00171800 2**2 CONTENTS, ALLOC, LOAD, DATA Thank Roderich for the help Dengfeng 2011/7/13 Roderich Schupp via RT <bug-PAR-Packer@rt.cpan.org> Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=69443 > > > On 2011-07-13 03:40:43, mdengfeng@gmail.com wrote:
> > After the module was installed. I can run the parl.exe correctly. > > Then I copy the parl.exe to c:\ and install strawberry-perl-5.10.4x86
> under
> > c:\strawberry. When I try to run the file c:\parl.exe, I got error
> > Looks like parl.exe (which in theory should be totally self-contained) > still looks for modules in C:\strawberry\... (i.e. the configuration > from where it was built) in preference to the modules packed > into parl.exe. > > If it finds a module and its DLL in C:\strawberry\... it tries to load > that - and that won't work because Perl 5.12 and 5.10 have incompatible > ABIs. If there's nothing in C:\strawberry\... it falls back to > the built-in modules. > > This behaviour might be caused by the fact that Strawberry Perl 5.12 > contains a new version of XSLoader that breaks PAR::Packer's hack > to intercept loading of DLLs. > > The fix for that is already in PAR::Packer's Subversion repository: > > http://svn.openfoundry.org/par/PAR-Packer/trunk > > Could you try that, i.e. > - re-install Straberry 5.12.3 > - check out the above > - apply the patch from RT 57273 as before > - build it and save parl.exe > > While you're at it: regarding that patch from RT 57273: > - does "dmake test" pass all tests? > - after "dmake install", please try to pack a minimal script > > pp -o hello.exe -e "print qq[hello world\n]" > > I'm interested in the output of > > objdump -h hello.exe > > in particular if it lists a resource section (".rsrc") > (objdump.exe is in C:\strawberry\c\bin). > > Cheers, Roderich > > > >
-- --------------------------------------------------------- Market is wrong, But I am right!
On 2011-07-13 06:36:56, mdengfeng@gmail.com wrote: Show quoted text
> Good news. > This issue has been fixed in > http://svn.openfoundry.org/par/PAR-Packer/trunk.
So the cause really was the XSLoader problem, thanks for confirming. Show quoted text
> hello.exe: file format pei-x86-64 > 7 .rsrc 00001538 000000000057f000 000000000057f000
And your packed executables do have a .rsrc sections. Show quoted text
> But there is still a test fail , Here are the details
Yeah, must be a separate issue. Some people get this test failure, others don't. I'd say go ahead anyway and file another bug if you encounter a "real" problem. My main concern is that I don't know what test 32 in t/20-pp.t was intended to test :( Anyway, I'll commit the patch from RT 57273 and roll out a release ASAP as the Windows 64 bit build problem is currently the most often reported issue. Cheers, Roderich
Fixed in PAR::Packer 1.010