1751712 Members
5866 Online
108781 Solutions
New Discussion юеВ

Re: perlcc

 
SOLVED
Go to solution
Daryll L. Krivanos
New Member

perlcc

Greetings,

I have been using the "perlcc" utility to create executable copies of some of my perl scripts.

I had been using a HP-UX 10.20 machine quite succesfully until this machine was retired.

I am now having problems.

I can get the script to compile but the executable aborts and core dumps. (Although I'm not very experienced with "adb" it does seem to point to a segmentation violation)

I've stripped the script down to its' simplest form (basically a "hello world" script) and the executable will still not run.


I am running HP-UX B11.11 U on a RP5470 with Perl5 B.5.6.1.C and gcc 4.0.2 gcc


Has anyone else had similar problems or experiences with perlcc?


8 REPLIES 8
Arunvijai_4
Honored Contributor

Re: perlcc

Hello,

What does # file says ? Are you running the executables in the same server or 10.20 ?

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Peter Godron
Honored Contributor

Re: perlcc

Daryl,
have you tried to compile a simple C code. If that works at least you are ok with the gcc compiler.
Daryll L. Krivanos
New Member

Re: perlcc

Arunvijai:
I am running on the same machine (although the 10.20 executable would run on an 11i machine)

When I do a strings on the core file, the first hint of trouble looks like this:

Enter Option and press < enter > :
ERROR -> Unknown Option : '
panic: MUTEX_DESTROY
pccxgz4l.c
DynaLoader::boot_DynaLoader
DynaLoader::dl_unload_file
DynaLoader::dl_librefs
PERL_DL_NONLAZY
DynaLoader::dl_resolve_using
Usage: DynaLoader::dl_load_file(filename, flags=0)
Can't make loaded symbols global on this platform while loading %s
Usage: DynaLoader::dl_find_symbol(libhandle, symbolname)
Symbol not found
Usage: DynaLoader::dl_undef_symbols()
Usage: DynaLoader::dl_install_xsub(perl_name, symref, filename="$Package")
DynaLoader
Usage: DynaLoader::dl_error()

Peter:
Thanks, I'll give that a try and get back after lunch.....





Daryll L. Krivanos
New Member

Re: perlcc

Peter:

Yep, the gcc works ok....

Thx!
Peter Godron
Honored Contributor
Solution

Re: perlcc

Daryll,
having had a closer look this is all a bit experimental ;-) See man perlcc Description Paragraph 2 "The code generated in this way is not guaranteed to work."

I assume you are using different versions of perl/gcc to your 10.20 platform.
Compile the perl code to c via:
perlcc hello.pl -c
which will generate hello.c
You can then compare the C files between 10.20 and 11.00.
Also you can then have a go at getting the C to compile with gcc.
Daryll L. Krivanos
New Member

Re: perlcc

Thank you Peter,

Unfortunately, the 10.20 systems are retired and I don't have the machine I used to use available to me anymore.

I have found an 11i machine that it works on though and I will be attempting to figure out why it runs there. (oddly enough, gcc isn't even installed on the machine)....but it works....

I wasn't aware of the extent of it's "experimental nature".....I suppose I need to rethink my use of it. I've found the use of executables to be VERY nice and I'm surprised there isn't more interest/support of this feature.

In any event.....thanks for your response.

Arunvijai_4
Honored Contributor

Re: perlcc

Hello,

Probably, it could be due to some library issues ? Just make sure you have correct libraries installed in /usr/local/lib and /usr/lib

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Daryll L. Krivanos
New Member

Re: perlcc

Thank you all for your input....

I found the problem to be the version of perl being used. Perl 5.8.7 appeared to do the trick on HP-UX.....

Best Regards,

Daryll