[rt.cpan.org #67311] missing dll

2011-04-27 Thread Roderich Schupp via RT
Wed Apr 27 04:22:40 2011: Request 67311 was acted upon.
Transaction: Correspondence added by RSCHUPP
   Queue: PAR-Packer
 Subject: missing dll
   Broken in: 1.009
Severity: Important
   Owner: RSCHUPP
  Requestors: pnewk...@cdrg.org, y...@pereslavl.ru
  Status: open
 Ticket URL: https://rt.cpan.org/Ticket/Display.html?id=67311 


On 2011-04-26 10:56:10, y...@pereslavl.ru wrote:
 I use pp to create exe from perl about two years.
 I never had C compiler in the PATH and never had problems.
 There always was a warning (You don't have a C compiler on your PATH)
 but an exe-file was successfully created and executed on my computer
 and on computers without any perl or C.

FYI: In general, you need (and always needed) a C compiler
to build PAR::Packer. But failing that perl Makefile.PL tries
to find a pre-built PAR::Packer on CPAN that matches your installation.
In the past you just got lucky that it found one.

 RSvR - please post the output of
 RSvRobjdump -ax myldr\boot.exe | find DLL

   DLL Name: ADVAPI32.DLL
   DLL Name: KERNEL32.dll
   DLL Name: msvcrt.dll
   DLL Name: msvcrt.dll
   DLL Name: libgcc_s_dw2-1.dll

The last line explains what your seeing: boot.exe is linked against
libgcc_s_dw2-1.dll and hence needs it to be present in PATH
to run. Same goes for all pp'ed executables because they basically 
consist of boot.exe concatenated with a PAR file. 

AFAICT there is no need to link boot.exe against libgcc_*.dll.
Looking at your build log, the most likely suspect is this line:

C:\MinGW\bin\g++.exe boot.o ... -o boot.exe

i.e. using g++ as linker (instead of gcc). That will probably include
support for exception handling which pulls in libgcc. 
Now C:\MinGW\bin\g++.exe is just Config{ld} from your Config.pm.

Hmm... I understand why ActiveState wants to link as C++ and that's
correct for linking par.exe (which is a special-purpose Perl
interpreter), but unfortunately not for boot.exe (which is a standalone
executable that has nothing to do with Perl). 
Please try the patch below (on top of the previous patch)
and check if it makes the reference to libgcc*.dll in boot.exe 
go away.

--- myldr/Makefile.PL.orig  2011-04-26 08:40:32.0 +0200
+++ myldr/Makefile.PL   2011-04-27 10:16:26.0 +0200

@@ -320,7 +324,7 @@
 boot$o: \$(MKTMP_STUFF) $my_stuff

 $boot_exe: boot$o
-   \$(LD) boot$o \$(STATIC_LDFLAGS) $res $out$boot_exe_link
+   \$(CC) boot$o \$(STATIC_LDFLAGS) $res $out$boot_exe_link
$mt_cmd
\$(PERLRUN) parlsig.pl $boot_exe $par_exe $dynperl $chunk_size


Cheers, Roderich



GLIBC_2.4 not found

2011-04-27 Thread Sunny
Hi list,

I'm trying to run an executable produced by PAR  Packager, version 1.006
(PAG version 1.000).
But getting following error:
HOST2:/home/# ./my_prog
./my_prog: /lib/libc.so.6: version `GLIBC_2.4' not found (required by
./my_prog)

PAR  Packager machine:
HOST1:/home/# aptitude show libc6
Package: libc6
State: installed
Version: 2.11.2-10
Section: libs
...

Target machine:
HOST2:/home/# aptitude show libc6
Package: libc6
State: installed
Version: 2.3.6.ds1-13etch10
Section: libs
...


I have tried several ways to create a executable, but same getting error.
HOST1:/home/# pp -c -o my_prog my_prog.pl
HOST1:/home/# pp --lib=/lib/libc.so.6 -o my_prog my_prog.pl
HOST1:/home/# pp --link=/lib/libc.so.6 -o my_prog my_prog.pl


Re: GLIBC_2.4 not found

2011-04-27 Thread Roderich Schupp
On Wed, Apr 27, 2011 at 1:41 PM, Sunny no7f...@gmail.com wrote:
 PAR  Packager machine:
 HOST1:/home/# aptitude show libc6
 Package: libc6
 State: installed
 Version: 2.11.2-10

 Target machine:
 HOST2:/home/# aptitude show libc6
 Package: libc6
 Version: 2.3.6.ds1-13etch10
 Section: libs

There's no way to make that work. If you packed an executable on a
machine with a higher
version of glibc (which references symbols tagged with a higher version) and try
to run it on a machine with a lower version it will fail. This
behaviour isn't specific to
PAR::Packer, it holds for any executable that you build by the usual means,
i.e. compiling and linking.
If you want your executable to be compatible across a range of major glibc
versions, you have to build it on the lowest targetted glibc version.

Cheers, Roderich


Re: [rt.cpan.org #67311] missing dll

2011-04-27 Thread Yakov Zaidelman via RT
Wed Apr 27 11:18:12 2011: Request 67311 was acted upon.
Transaction: Correspondence added by y...@pereslavl.ru
   Queue: PAR-Packer
 Subject: Re: [rt.cpan.org #67311] missing dll
   Broken in: 1.009
Severity: Important
   Owner: RSCHUPP
  Requestors: pnewk...@cdrg.org, y...@pereslavl.ru
  Status: open
 Ticket URL: https://rt.cpan.org/Ticket/Display.html?id=67311 


RSvR FYI: In general, you need (and always needed) a C compiler
RSvR to build PAR::Packer. But failing that perl Makefile.PL tries
RSvR to find a pre-built PAR::Packer on CPAN that matches your installation.
RSvR In the past you just got lucky that it found one.

I understand that and use special environment when building modules.
My point was that I have no C in PATH when using pp and exe-files
created with pp.

RSvR Please try the patch below (on top of the previous patch)
RSvR and check if it makes the reference to libgcc*.dll in boot.exe 
RSvR go away.

It really helped. Reference disappeared, exe-file was successfully
created and started without C in PATH.

Great thanks!




[rt.cpan.org #67311] missing dll

2011-04-27 Thread Roderich Schupp via RT
Wed Apr 27 14:30:06 2011: Request 67311 was acted upon.
Transaction: Correspondence added by RSCHUPP
   Queue: PAR-Packer
 Subject: missing dll
   Broken in: 1.009
Severity: Important
   Owner: RSCHUPP
  Requestors: pnewk...@cdrg.org, y...@pereslavl.ru
  Status: open
 Ticket URL: https://rt.cpan.org/Ticket/Display.html?id=67311 


On 2011-04-27 11:18:12, y...@pereslavl.ru wrote:
 It really helped. Reference disappeared, exe-file was successfully
 created and started without C in PATH.

Great! Thanks for testing. I've committed the patch, will be
in the next release of PAR::Packer.

Cheers, Roderich