



Hi all
I have a strange problem with a compiled Perlscript on Solaris 9. After the script is finished it just hangs.
Script looks like this:
#!perl -w
use strict;
use Getopt::Std;
use Date::Manip;
use Mail::Sender;
use Config::General;
use Data::Dumper;
.... Does some stuff (and this behaves as expected)....
print "exiting...\n";
exit 0;
what happens is: It prints "exiting..." and then the prompt just hangs.
Here's the output of perlapp and perl -v:
------ Start Output ------
root@svrefa003:/opt/pdk/bin:./perlapp -v -f -script /home/haecs/checkpoint_debug1.pl -exe /home/haecs/checkpoint
PerlApp 7.0.0 build 277058 (perl 5.8.8)
Copyright (C) 1998-2007 ActiveState Software Inc. All rights reserved.
Standard license S80C11E2F5 for Christian Mueller
libperl.so at '/opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/CORE/libperl.so' is not compatible with the PDK.
Using '/opt/pdk/lib/libperl.so' instead.
Using Perl 5.8.7 located at:
*** /opt/ActivePerl-5.8/bin/perl-static
Including modules:
+++ /opt/ActivePerl-5.8/lib/5.8.7/AutoLoader.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/Carp.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/Carp/Heavy.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/Config.pm
+++ /opt/ActivePerl-5.8/lib/site_perl/5.8.7/Config/General.pm
+++ /opt/ActivePerl-5.8/lib/site_perl/5.8.7/Config/General/Extended.pm
+++ /opt/ActivePerl-5.8/lib/site_perl/5.8.7/Config/General/Interpolated.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/Config_dynamic.pl
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/Cwd.pm
+++ /opt/ActivePerl-5.8/lib/site_perl/5.8.7/Date/Manip.pm
+++ DynaLoader.pm (internal)
+++ /opt/ActivePerl-5.8/lib/5.8.7/English.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/Errno.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/Exporter.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/Exporter/Heavy.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/Fcntl.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/File/Glob.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/File/Spec.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/File/Spec/Functions.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/File/Spec/Unix.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/FileHandle.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/Getopt/Std.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/IO.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/IO/File.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/IO/Handle.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/IO/Seekable.pm
+++ List/Util.pm (internal)
Mac/FileSpec/Unixish.pm:
warn: Can't locate Mac/FileSpec/Unixish.pm
refby: /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/DynaLoader.pm line 63
+++ /opt/ActivePerl-5.8/lib/5.8.7/PerlIO.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/PerlIO/scalar.pm
+++ Scalar/Util.pm (internal)
+++ /opt/ActivePerl-5.8/lib/5.8.7/SelectSaver.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/Symbol.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/Text/ParseWords.pm
+++ XSLoader.pm (internal)
+++ /opt/ActivePerl-5.8/lib/5.8.7/attributes.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/auto/Cwd/Cwd.so
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/auto/DynaLoader/autosplit.ix
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/auto/DynaLoader/dl_expandspec.al
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/auto/DynaLoader/dl_find_symbol_anywhere.al
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/auto/DynaLoader/dl_findfile.al
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/auto/Fcntl/Fcntl.so
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/auto/File/Glob/Glob.so
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/auto/IO/IO.so
+++ auto/List/Util/Util.so (internal)
+++ /opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/auto/PerlIO/scalar/scalar.so
+++ /opt/ActivePerl-5.8/lib/5.8.7/base.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/integer.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/strict.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/vars.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/warnings.pm
+++ /opt/ActivePerl-5.8/lib/5.8.7/warnings/register.pm
+++ libperl.so (/opt/pdk/lib/libperl.so)
Please run `perlapp --help DIAGNOSTICS` for more information
about the generated error and warning messages.
Created '/home/haecs/checkpoint'
root@svrefa003:/opt/pdk/bin:perl -v
This is perl, v5.8.7 built for sun4-solaris-thread-multi
(with 13 registered patches, see perl -V for more detail)
Copyright 1987-2005, Larry Wall
Binary build 815 [211909] provided by ActiveState http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Nov 2 2005 02:41:13
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
------ End Output ------
Has anyone experienced a similar problem or has any idea how to correct it?
Thanx in advance.
Bernard
I think you get the hangs because the PDK is compiling with a different version of libperl.so than your executable uses at runtime.
Here is the telltale:
libperl.so at '/opt/ActivePerl-5.8/lib/5.8.7/sun4-solaris-thread-multi/CORE/libperl.so' is not compatible with the PDK.
Using '/opt/pdk/lib/libperl.so' instead.
The explanation for what is going on comes out of the Release Notes:
The PDK now uses a dynamically linked libperl.so on Unix instead of including statically linked libperl.a in each generated executable. This allowed implementation of the --xclude option for Unix, and --dependent and --xclude applications are much smaller now.
Only libperl.so from ActivePerl 819 and later is fully compatible with the new mechanism. PerlApp will use its own bundled libperl.so for older versions of ActivePerl. It also bundles a special libperl.so to use with Perl 5.6.
Updating to a newer version of ActivePerl would fix the issue. Or you could set PerlApp's --use option to force the executable to use the same libperl.so that it was compiled with, and the odd behavior will probably go away.
Should you consider copying the PDK libperl.so elsewhere, be careful to place it where it won't interfere with the 815 version of libperl.so, or the compatibility problems could go the other way.