http://www.perlmonks.org?node_id=841375

giwei has asked for the wisdom of the Perl Monks concerning the following question:

Hi Guys I would be very appreciated if anyone can help me analysis this problem.

When I use perlcc to compile my script "Rncproxy.pl" into c. It just stops there and said:

/usr/local/bin/perlcc: Calling /usr/local/bin/perl -I/usr/local/lib/pe +rl5/5.8.4/sun4-solaris -I/usr/local/lib/perl5/5.8.4 -I/usr/local/lib/ +perl5/site_perl/5.8.4/sun4-solaris -I/usr/local/lib/perl5/site_perl/5 +.8.4 -I/usr/local/lib/perl5/site_perl -I. -uDB,-uPod,-uPod::Usage,-u +Symbol,-opccxvD0J.c /ccase_rnccn/adm/rncproxy/src/Rnc_proxy.pl Segmentation Fault - core dumped /usr/local/bin/perlcc: /ccase_rnccn/adm/rncproxy/src/Rnc_proxy.pl did +not compile, which can't happen: Starting compile Walking tree

When I use Ggb to debug the core file.

gdb /usr/local/bin/perl ../gen/sunsun/core execution gdb-6.3/gdb (asb_shanghai/rncenv/linux) GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and y +ou are welcome to change it and/or distribute copies of it under certain cond +itions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for det +ails. This GDB was configured as "sparc-sun-solaris2.8"... Core was generated by `/usr/local/bin/perl -I/usr/local/lib/perl5/5.8. +4/sun4-solaris -I/usr/local/lib/'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/local/lib/perl5/5.8.4/sun4-solaris/auto/File +/Glob/Glob.so...done. Loaded symbols for /usr/local/lib/perl5/5.8.4/sun4-solaris/auto/File/G +lob/Glob.so #0 0x7f8c58f0 in make_sv_object () from /usr/local/lib/perl5/5.8.4/su +n4-solaris/auto/B/B.so

Can u help me about this? Thanks :-)

Replies are listed 'Best First'.
Re: perlcc compile core dump
by marto (Cardinal) on May 24, 2010 at 12:09 UTC

    Welcome to the Monastery, please don't ignore the advice displayed regarding formatting of posts.

    The recently resurrected perlcc is now, and as far as I'm aware always has been somewhat experimental:

    "The code generated in this way is not guaranteed to work. The whole codegen suite (perlcc included) should be considered very experimental. Use for production purposes is strongly discouraged."

    And you're using a pretty old ( ~6 years) version of perl.

    If your goal is to package a script along with it's dependant modules perhaps you'd have more luck using pp.

    See also Steffen Müller's Application Deployment and Dependency Management with PAR slides.

    Updated: Fixed typo.

Re: perlcc compile core dump
by rurban (Scribe) on Nov 29, 2012 at 20:46 UTC
    You are using a very old version of perlcc/B::C with a lot of known problems.

    Update your B::C. Search on CPAN or check http://perl-compiler.org/