Issue with a perl binary which is created from sunos (processor) x86 and tried to run at sunos procesor (sparc )

Posted by balaji1g on 2013-08-01 21:21

We created a binary from below configured machine using PDK9.2

OS: SunOS(solaris)
os version:5.10
system : Generic_137138-09 i86pc i386 i86pc
64-bit amd64 applications
32-bit i386 applications

The command we used to create a binary from the above machine using,
perlapp --norunlib --target solaris-sparc-32 --exe sample-solaris-sparc-32 --perl /opt/ActivePerl-5.10/bin/perl-static sample.pl

Our plan is that to execute the binary in solaris-sparc-32
Target machine configuration:
OS: SunOS(solaris)
os version:5.10
64-bit sparcv9 applications
32-bit sparc applications

We created that binary(solaris-i386-32) and executed in the target(solaris-sparc-32 ).

Binary execution in target system: ./sample

Received the error message: Invalid argument

Please help.

Few more questions are,
1. If a binary created in one processor , will it work in another type of processor?
2. is there problem with 32 bit or 64 bin? is there any compatiability software? OR PD9.2 will do that compatiability?

In our case it is nor working as expected ?

grahams
ActiveState Staff
Fri, 2013-08-02 11:50

is a response from a Perl interpreter. It likely means there's a syntax error in the script you are wrapping, but its not possible to tell without a lot more detail. That is likely to be too lengthy a discussion for the forums, and you should open a support ticket instead.

Your other questions:
1). Yes, but you are not clear on what PerlApp is doing. PerlApp does not create binaries. It assembles existing binaries into wrapped packages that act like binaries. You can only create a package for a different processor if there is an already existing pool of binary objects that PerlApp can use to find what it needs. In most cases, PerlApp will use the ActiveState PPM servers as the source of binary objects. There are some other options, but PPM is the easiest to use, as long as the modules you need are available from PPM.

2). Potentially, there can be problems with 32-bit vs 64-bit. This is handled by your operating system. If your operating system has good compatibility features, you can run a 32-bit file on a 64-bit system. You will never be able to run a 64-bit file on a 32-bit system. Keep in mind that some operating systems place limits on what the "compatible" mode libraries are able to do.