I'm totally stumped with this problem.

Because HTML::Parser provides such fantastic parsing capabilities, I use it in my code. But, unfortunately, the place I'm hosting this CGI script on has an old version. I can't upgrade the version, so I install my own copy. I use lib the path to where my module is, so that I can make sure it loads mine. When I run it from the command-line, it works. It loads my copy. If I print $INC{'HTML/Parser.pm'} I get this:

/home/j/johngalt/lib/perl5/site_perl/5.005/i386-linux-thread/HTML/Parser.pm

Now, if I run the exact same code as the web user, I get this output (with CGI::Carp qw(fatalsToBrowser)):

Can't load '/home/j/johngalt/lib/perl5/site_perl/5.005/i386-linux-thread/auto/HTML/Parser/Parser.so' for module HTML::Parser: /home/j/johngalt/lib/perl5/site_perl/5.005/i386-linux-thread/auto/HTML/Parser/Parser.so: undefined symbol: PL_thrsv at /usr/lib/perl5/i386-linux/DynaLoader.pm line 169. at/home/j/johngalt/public-web/uncoiled/cgi-bin/logger.cgi line 10

If I run ld --cref on the Parser.so file, it gives me the symbol table, and then it says that all of the symbols that are supposed to be defined in Parser.so are undefined (including PL_thrsv, which is what is generating that error).

I've run out of ideas, any suggestions from the venerable monks?


In reply to Particularly peculiar problem with loading modules by SamQi

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.