Problems with perlembed under Linux (xs_init and boot_Socket issues) 
Author Message
 Problems with perlembed under Linux (xs_init and boot_Socket issues)

Hi folks,

I'm trying to use Perl as a parser for my app.  So far, I have the
basics down.  I am able to send a buffer via C++ class method
"perlparse(char *)" but am running into some trouble:

1.  I get an error about the module I'm trying to load.  It's
proprietary, but works fine.  I have a command line based app which also
uses Perl to parse input.  It also uses this module.  In any case,
here's the error:


I do have the RT.pm module in the right place.  Note that the above
error is different from:


which is what it would say if it couldn't find RT.pm.  The problem seems
to be with loading.  So I've read through "man perlembed" and am trying
to make sure I'm doing things right.  Here's my basic perl parser, taken
pretty much out of the docs:

int perl_parse_buf (char *inBuf) {

    STRLEN n_a;
    char *embedding[] = { "", "-e", "" };

    my_perl = perl_alloc();
    perl_construct( my_perl );
    perl_parse(my_perl, xs_init, 3, embedding, NULL);
    PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
    perl_run(my_perl);

    eval_pv(inBuf, TRUE);

    perl_destruct(my_perl);
    perl_free(my_perl);

    return 0;

Quote:
}

but my xs_init was originally just this:

xs_init()
{
   char *file = __FILE__;
   newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);

Quote:
}

The docs say I should add:

    newXS("Socket::bootstrap", boot_Socket, file);

but when I do, I get an error at compile time:

    /musr/src/RTcmix/Minc/pimbRTcmix.o(.text+0x1f03): In function `xs_init':
    /home/topper/RTcmix/Minc/parse_with_perl.c:29: undefined reference
to `boot_Socket'
    collect2: ld returned 1 exit status
    make: *** [plink] Error 1

and I am in fact using the linking syntax:  `perl -MExtUtils::Embed -e
ldopts`  So there's something screwy.  Why can't ld fine boot_Socket?  I
suspect I need it given previous errors.

Any input would be most appreciated.

Thanks,

Dave Topper

--
Technical Director - {*filter*}ia Center for Computer Music
http://www.{*filter*}ia.edu/music/vccm.html



Tue, 20 Sep 2005 09:09:56 GMT  
 Problems with perlembed under Linux (xs_init and boot_Socket issues)


<snip>

Quote:
> here's the error:


> I do have the RT.pm module in the right place.  Note that the above
> error is different from:


> which is what it would say if it couldn't find RT.pm.

That's correct. What it's saying is that it can't find RT.so.
Why is RT.so not where it should be ? It should be in the '/auto/RT/'

Cheers,
Rob



Tue, 20 Sep 2005 13:35:34 GMT  
 Problems with perlembed under Linux (xs_init and boot_Socket issues)
Hey thanks,

That did the trick.  On to other snags ...

DT

Quote:



> <snip>

>>here's the error:


>>I do have the RT.pm module in the right place.  Note that the above
>>error is different from:


>>which is what it would say if it couldn't find RT.pm.

> That's correct. What it's saying is that it can't find RT.so.
> Why is RT.so not where it should be ? It should be in the '/auto/RT/'

> Cheers,
> Rob

--
--
Technical Director, {*filter*}ia Center for Computer Music


Sun, 25 Sep 2005 08:23:41 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problems with perlembed under Linux (xs_init and boot_Socket issues)

2. Linux issues with 5.004.

3. fileevent Issues Between Solaris and Linux

4. perlembed problems

5. perlembed problem

6. Possible Perl/h2ph/Linux problem [ Was: aub for linux ]

7. Perl cgi-wrap issues and security problems

8. Problem: Chop and Line Issues

9. Past Issues of Idiot's Guide to Solving Perl CGI Problems

10. perlembed - is there anything around yet.

11. Guru question: perlembed,perlguts

12. perlembed on HP-UX 9.05

 

 
Powered by phpBB® Forum Software