I have been trying to wrap my head around this one for a while but to no avail. I am working on the embedded Perl interpreter for Gaim and currently it does not work with the most current development branch.
Everytime the PerlInterpreter would run it would crash Gaim with the error '...unresolved symbol: PL_sv_undef....' from inside DynaLoader. I traced this back to a change in the way plugins are loaded where g_module_open now enforces local binding of symbols. This problem was corrected by linking Gaim.so (my library of XSUBs) to libperl.a. No more unresolved symbols. However, now the interpreter would segfault when loading the library Gaim.so.
I ran gaim through a debugger and found it was seg faulting when DynaLoader called boot_Gaim and tried to setup the Perl stack. It dies somewhere in the dXSARGS macro. I have tried a bunch of different ways of building my libraries and code, but it still crashes Gaim at this point when local binding is enforced. I tried to load other Perl modules that utilize DynaLoader and they crash in a similar fashion. As soon as local G_MODULE_BIND_LOCAL is not set for g_module_open, the problem goes away, but has the bad side effects of putting every plugin's symbols in the global name space.
Thank you for any advice.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.