Operating System - HP-UX
1748197 Members
2659 Online
108759 Solutions
New Discussion юеВ

HELP - Perl PAR issue on HP-UX (PA-RISC)

 
Leo Chen
New Member

HELP - Perl PAR issue on HP-UX (PA-RISC)

Hi,

I created a binary file with Perl PAR tool, it run successfully if the version of Perl on the target the machine is as same as the build machine on which i created the binary file.

But when Perl on the target machine is 5.8.8 and 5.8.3 on the build machine, the binary file run failed. The error message is:
# ./test
/usr/lib/dld.sl: Can't open shared library: /opt/perl_32/lib/5.8.3/PA-RISC1.1-thread-multi/CORE/libperl.sl
/usr/lib/dld.sl: No such file or directory
Abort(coredump)

Both target and build machine info are:
# uname -ar
HP-UX xxxxx B.11.23 U 9000/800 1561151547 unlimited-user license

The test script file is:
# cat test.pl
print "hello world!\n";

The build step is:
# pp -o test test.pl
# ./test
hello world!

The pp version is:
# pp -V
PAR Packager, version 0.978 (PAR version 0.977)
Copyright 2002-2008 by Audrey Tang

Appreciate if any can help with this.

Many Thanks.
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: HELP - Perl PAR issue on HP-UX (PA-RISC)

/opt/perl_32/lib/5.8.3/PA-RISC1.1-thread-multi/CORE/libperl.sl

Well, have you copied this shlib (with this exact path) over to the other system?
Leo Chen
New Member

Re: HELP - Perl PAR issue on HP-UX (PA-RISC)

Thanks Dennis.

But I want to create a independent standalone binary file, i have checked the temporary directory which has extracted files of the binary file, it contained the libperl.sl shared library.

Could PAR create independent standalone binary file? I do not want to copy the shared library file with exact path.
Dennis Handly
Acclaimed Contributor

Re: HELP - Perl PAR issue on HP-UX (PA-RISC)

>But I want to create a independent standalone binary file, i have checked the temporary directory which has extracted files of the binary file, it contained the libperl.sl shared library.
>Could PAR create independent standalone binary file?

You need a libperl.a in order to out it all in an executable. Perhaps in /opt/perl/lib/*/*/CORE/libperl.*

>I do not want to copy the shared library file with exact path.

You have flexibility to put that shlib where your executable is. Then you can use export SHLIB_PATH=path-of-shlib.

You might also be able to do this by linking with $ORIGIN, so you don't need SHLIB_PATH.