- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Converting/executing a PERL script in binaries
Operating System - HP-UX
1755254
Members
5549
Online
108831
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2003 11:15 PM
тАО07-01-2003 11:15 PM
Converting/executing a PERL script in binaries
HI,
I'm wanting to execute my PERL script in a binary/executable form. I wrote a C wrapper to do so. However, when executing the binary code produced by the wrapper, it produced the warning message as:
1073741825 version 1 is not available
ELEMENTS: 1073741826 1 udp 756 program 1073741826 version 1 is not available
1073741826
1
udp
756
program
1073741826 version 1 is not available
ELEMENTS: 1073741827 1 udp 813 program 1073741827 version 1 is not available
1073741827
1
udp
813
program
1073741827 version 1 is not available
Sending mail now ...
The flags you gave make no sense since you're not sending mail.
However, when executing just the script itself, the script did not produce the warning "The flags you gave make no sense since you're not sending mail. ". The output is shown below:
pgadm1@penang[13]% file-61.pl names
/pgadm1/usr1/adm/cleaw/script/test/WEIRDER opened successfully
$names[0]=cleaw
$list= cleaw@pinang.png.intel.com
HERE ...
ELEMENTS: 1073741824 1 udp 661 program 1073741824 version 1 is not available
ELEMENTS: 1073741825 1 udp 899 program 1073741825 version 1 is not available
ELEMENTS: 1073741826 1 udp 756 program 1073741826 version 1 is not available
ELEMENTS: 1073741827 1 udp 813 program 1073741827 version 1 is not available
Sending mail now ...
SUBJECT: RPCPING OUTPUT
HOST :pgadm1
IP :172.30.209.15
OS :aix
PROG NO VER PROTO PORT SERVICE RESPONSE
1073741824 1 udp 661 program 1073741824 version 1 is not available
1073741825 1 udp 899 program 1073741825 version 1 is not available
1073741826 1 udp 756 program 1073741826 version 1 is not available
1073741827 1 udp 813 program 1073741827 version 1 is not available
I was wondering if someone could show me how I could convert a PERL script into a binary code? Or if the way that I've wrote my wrapper is wrong, kindly correct me.
Are there any perl functions or modules which converts a PERL script into a binary code?
Attached also are both my perl script(file-6.pl). Below is wrapper code written in C.
Could someone kindly help me out?
Thanks
#include
#include
#include
#include
#include
int main(int argc, char**argv){
char**a = (char**)malloc(10);
a[0] = (char*)malloc(50);
a[1] = (char*)malloc(50);
a[2] = NULL;
strcpy(a[0], "/pgadm1/adm/cleaw/script/test/names");
execv("/pgadm1/adm/cleaw/script/test/file-6.pl",a);
perror("execv");
exit(1);
}
I'm wanting to execute my PERL script in a binary/executable form. I wrote a C wrapper to do so. However, when executing the binary code produced by the wrapper, it produced the warning message as:
1073741825 version 1 is not available
ELEMENTS: 1073741826 1 udp 756 program 1073741826 version 1 is not available
1073741826
1
udp
756
program
1073741826 version 1 is not available
ELEMENTS: 1073741827 1 udp 813 program 1073741827 version 1 is not available
1073741827
1
udp
813
program
1073741827 version 1 is not available
Sending mail now ...
The flags you gave make no sense since you're not sending mail.
However, when executing just the script itself, the script did not produce the warning "The flags you gave make no sense since you're not sending mail. ". The output is shown below:
pgadm1@penang[13]% file-61.pl names
/pgadm1/usr1/adm/cleaw/script/test/WEIRDER opened successfully
$names[0]=cleaw
$list= cleaw@pinang.png.intel.com
HERE ...
ELEMENTS: 1073741824 1 udp 661 program 1073741824 version 1 is not available
ELEMENTS: 1073741825 1 udp 899 program 1073741825 version 1 is not available
ELEMENTS: 1073741826 1 udp 756 program 1073741826 version 1 is not available
ELEMENTS: 1073741827 1 udp 813 program 1073741827 version 1 is not available
Sending mail now ...
SUBJECT: RPCPING OUTPUT
HOST :pgadm1
IP :172.30.209.15
OS :aix
PROG NO VER PROTO PORT SERVICE RESPONSE
1073741824 1 udp 661 program 1073741824 version 1 is not available
1073741825 1 udp 899 program 1073741825 version 1 is not available
1073741826 1 udp 756 program 1073741826 version 1 is not available
1073741827 1 udp 813 program 1073741827 version 1 is not available
I was wondering if someone could show me how I could convert a PERL script into a binary code? Or if the way that I've wrote my wrapper is wrong, kindly correct me.
Are there any perl functions or modules which converts a PERL script into a binary code?
Attached also are both my perl script(file-6.pl). Below is wrapper code written in C.
Could someone kindly help me out?
Thanks
#include
#include
#include
#include
#include
int main(int argc, char**argv){
char**a = (char**)malloc(10);
a[0] = (char*)malloc(50);
a[1] = (char*)malloc(50);
a[2] = NULL;
strcpy(a[0], "/pgadm1/adm/cleaw/script/test/names");
execv("/pgadm1/adm/cleaw/script/test/file-6.pl",a);
perror("execv");
exit(1);
}
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2003 12:20 PM
тАО07-03-2003 12:20 PM
Re: Converting/executing a PERL script in binaries
Hi,
Have you taken a look at perlcc?
I was trying it but failed at link time.
Because ld was unable to find some lib...
But maybe you can try further with your code...
I'd also recommend removing the explicit casts
from your malloc() calls, it's not necessary
since malloc returns a void *. But fortunately
you've included stdlib.h.
Hope it helps you a bit....
Manuel
Have you taken a look at perlcc?
I was trying it but failed at link time.
Because ld was unable to find some lib...
But maybe you can try further with your code...
I'd also recommend removing the explicit casts
from your malloc() calls, it's not necessary
since malloc returns a void *. But fortunately
you've included stdlib.h.
Hope it helps you a bit....
Manuel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2003 12:54 PM
тАО07-03-2003 12:54 PM
Re: Converting/executing a PERL script in binaries
Ther first thing that I notice is that your Perl is expecting to read command line arguments but you haven't supplied them. I don't know what you are trying to accomplish since you still have to use the Perl source -- this really isn't a standalone executable.
A rather good Perl to native convertor is
Perl2exe available rather cheaply from www.indigostar.com.
A rather good Perl to native convertor is
Perl2exe available rather cheaply from www.indigostar.com.
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP