Problems embedding Perl
Problems embedding Perl
- Subject: Problems embedding Perl
- From: email@hidden
- Date: Fri, 6 May 2005 17:58:27 -0700
Ok. I'm stumped. I'm trying host (aka embed) a Perl interpreter in an Apache (1.3.3) module I'm writing. The server is written in C++ and compiled under Tiger using gcc4. It works just peachy. Follows the examples given at http://perldoc.perl.org I've recently added code to host a Perl interpreter. While I have no problem making this work in a stand-alone C file, making it work from my server code is proving a challenge. I can successfully load the interpreter, including feeding it a script at start-up (via perl_parse). However, if I try to invoke a script through one of the call_xxxx routines, it always faults. For example, when I invoke call_argv, it faults with the following:
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000040 0x97054948 in Perl_call_argv ()
The same exact code runs fine from my test C file. So, I'm willing to believe it has something to do with compiler/linker options, but I'm not clear on what ones. I added to my server build the same switches I used when building my C test version. I further separated out into a separate C file the code that invokes Perl (Tiger, sadly, includes Perl 5.8.6 compiled with gcc3.3!).
I will, obviously, take any suggestions folks may have to offer.
Thank you, Brendan Dixon 425.922.8798 |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden