(For those who don't know, Pidgin is the new name of the Gaim IM client, and libpurple the new name of the underlying libgaim library)

I'm on a FC 6 box, and I'm getting the following error when use'ing the Purple module:

[~]$ perl -e'use Purple;' Can't load '/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/a +uto/Purple/Purple.so' for module Purple: /usr/lib/perl5/vendor_perl/5 +.8.8/i386-linux-thread-multi/auto/Purple/Purple.so: undefined symbol: + g_str_hash at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/XSLoader. +pm line 70. at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Purple.pm + line 52 Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.

I've searched Google and the Pidgin wiki, but haven't found any solution. g_str_hash is defined in /usr/include/glib-2.0/glib/ghash.h, which I assume is properly found since the compilation does succeed.

An ldd on Purple.so does not show glib2 in the list of libraries though. Should it show up or is the XS loader smart enough to find out what libraries to load some other way?

I tried explicitly linking against the library by adding a -lglib-2.0 to the final line of the .so creation. The resulting so file does show the dependency on glib2 then, but trying to load shows a different error:

[~]$ perl -e'use Purple;' perl: symbol lookup error: /usr/lib/perl5/vendor_perl/5.8.8/i386-linux +-thread-multi/auto/Purple/Purple.so: undefined symbol: purple_perl_ca +llXS

which to me seems to suggest linking in the library this way is not the correct thing to do.

If anything has any insight or suggestions on how to solve this, I'm all ears.


In reply to Purple/Pidgin perl plugin load error by Crackers2

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.