Since the last email I've rebuilt a fresh VM and reinstalled par and 
par-packer.  I setup the same testy script and applied your patches. Everything 
seems to work just fine this time with the testy script.

On the target machine, I copied the testy package and when I run it I get the 
following error:
Dynamic linker : ./testy : could not open 
/usr/lib/perl5/5.8/i586-pc-sco3.2v5.0/CORE/libperl.so

I'm assuming this means I need to include libperl.so along with my package.  
What's the best way to do this?  Can I use the -a argument for pp?  I'd like to 
get this inside the deployment package if that's possible.

Thanks for all your help! You’re the best! Let me know if you still want me to 
run the diagnostic script and get you those files you were interested in. As 
far as I can tell all is working fine and it was either the patch or a fresh VM 
that did the trick.  I should have ran testy before I applied the patches; I 
tried to patch -R but I'm not sure it worked right because testy worked just 
fine after trying to remove the patches.


-Mike


-----Original Message-----
From: Roderich Schupp [mailto:[email protected]] 
Sent: Saturday, February 12, 2011 10:41 AM
To: Michael Miller
Cc: [email protected]
Subject: Re: Trouble putting together a stand alone

On Fri, Feb 11, 2011 at 5:48 PM, Michael Miller <[email protected]> wrote:
> I'm still having trouble and need some more advice. I created a simple 
> testy.pl script with the following in it:
>
> use Digest::SHA;
> print "Hello world";
>
> When I run "perl testy.pl" I get "Hello world" printed to the console.  So it 
> works fine.
>
> Then I try:
>
> pp -o testy testy.pl

Can you run

$ unzip -l testy | grep Digest

This should print something like (the last line is crucial)

     3599  2011-02-12 16:15   lib/Digest/SHA.pm
     1160  2011-02-12 16:15   lib/Digest/base.pm
    52560  2011-02-06 16:39   lib/auto/Digest/SHA/SHA.so


>  I was able to get 1.008 to compile on my box after altering the following 
> line of perl in file2c.pl inside the myldr directory of the PAR-Packer 
> project from SVN :
>
> print $out "const char ${c_var}${suffix}[] = "; to print $out "const 
> char ${c_var}${suffix} [] = "; (there's a space between ${suffix} and 
> the [])
>
> Without the space my gcc compiler on my SCO VM failed to compile with the 
> following error:
> make[1]: Entering directory `/LDM/packages/PAR-Packer-1.008/myldr'
> perl ./file2c.pl -s ../script/par.pl -l my_par_pl.c load_my_par_pl 
> Global symbol "@suffix" requires explicit package name at ./file2c.pl line 76.
> Execution of ./file2c.pl aborted due to compilation errors.

Err, that error is not from gcc, but from Perl. Apparently a bug in your 
bronze-age Perl (5.8.0) - all Perl versions I could easily try out (5.8.8, 
5.10.1, 5.12.3) correctly stop variable interpolation of "...${suffix}..." at 
the closing brace. But the inserted blank shouldn't hurt the generated C source.

> Also note that Digest::SHA is installed and up to date.  From cpan I ran 
> "install Digest::SHA" and I got a message that Digest::SHA is up to date 
> (5.50).

OK, let's try if your problem is really the same as 
http://markmail.org/thread/ec4x27uqd6ujtnjq

First apply the following patch to PAR, then build and install it:

--- PAR/lib/PAR/SetupTemp.pm~   2010-07-28 21:17:15.978076303 +0200
+++ PAR/lib/PAR/SetupTemp.pm    2011-02-12 17:05:02.016431954 +0100
@@ -48,7 +48,7 @@
           my $ctx = _get_digester();

           # Workaround for bug in Digest::SHA 5.38 and 5.39
-          my $sha_version = eval { $Digest::SHA::VERSION } || 0;
+          my $sha_version = 0;
           if ($sha_version eq '5.38' or $sha_version eq '5.39') {
               $ctx->addfile($PAR::SetupProgname::Progname, "b") if ($ctx);

Then apply the following patch to PAR::Packer, then build and install it:

--- PAR-Packer/script/par.pl~   2011-02-09 18:09:39.281196177 +0100
+++ PAR-Packer/script/par.pl    2011-02-12 17:03:49.990387919 +0100
@@ -619,7 +619,7 @@
             || eval { require Digest::MD5; Digest::MD5->new };

         # Workaround for bug in Digest::SHA 5.38 and 5.39
-        my $sha_version = eval { $Digest::SHA::VERSION } || 0;
+        my $sha_version = 0;
         if ($sha_version eq '5.38' or $sha_version eq '5.39') {
             $ctx->addfile($out, "b") if ($ctx);
         }
@@ -805,7 +805,7 @@
                     || eval { require Digest::MD5; Digest::MD5->new };

                 # Workaround for bug in Digest::SHA 5.38 and 5.39
-                my $sha_version = eval { $Digest::SHA::VERSION } || 0;
+                my $sha_version = 0;
                 if ($sha_version eq '5.38' or $sha_version eq '5.39') {
                     $ctx->addfile($progname, "b") if ($ctx);
                 }

Finally, re-pack testy.pl and try testy.

Only if that doesn't work: there's a diagnostic script, 
contrib/extract_embedded/extract-embedded.pl, in the PAR::Packer sources.
Can you run it on testy like this:

$ mkdir testy.embedded
$ perl .../contrib/extract_embedded/extract-embedded.pl testy  testy.embedded

I'm interested in the files

testy.embedded/XSLoader.pm
testy.embedded/DynaLoader.pm
testy.embedded/auto/DynaLoader/*.al


Cheers, Roderich

#####################################################################################
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies.
#####################################################################################

Reply via email to