Thu May 13 07:45:53 2010: Request 57272 was acted upon.
Transaction: Correspondence added by RSCHUPP
       Queue: PAR-Packer
     Subject: Error building on Strawberry 5.12.0.1 32-bit (can't find 
script/parl.exe)
   Broken in: (no value)
    Severity: Important
       Owner: RSCHUPP
  Requestors: [email protected]
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=57272 >


On Tue May 11 04:55:08 2010, RSCHUPP wrote:
> Can you try the attached patch (totally untested, since

Darn, shouldn't post untested patches :(
Fixed version attached that passes all tests on Strawberry 5.12.0.

Cheers, Roderich
--- lib/PAR/Packer.pm.orig	2010-05-11 09:35:23.000000000 +0200
+++ lib/PAR/Packer.pm	2010-05-11 10:50:24.000000000 +0200
@@ -337,6 +337,20 @@
         $self->_check_perl(@$in) if (@$in);
         $self->_sanity_check();
     }
+
+    # On Windows try to detect a Perl that may be linked against some 
+    # libgcc_*.dll (e.g. Strawberry Perl >= 5.12). In this case, 
+    # chances are that parl(dyn)?.exe also will need this DLL to run. 
+    # Hence make sure it gets packed in.
+    if ($^O eq 'MSWin32'
+        && defined $Config{gccversion}  # gcc version 4.x or above was used
+        && $Config{gccversion} =~ m{\A(\d+)}ms && $1 >= 4) {
+        # check for a libgcc_*.dll in the same directory
+        # as the perl executable itself
+        my ($libgcc) = glob(File::Spec->catfile(File::Basename::dirname($^X),
+                                                "libgcc_*$Config{dlext}"));
+        push @{ $opt->{l} }, $libgcc if $libgcc;
+    }
 }
 
 sub _verify_opts {

Reply via email to