I've developed and tested a module that uses Inline::C. It works fine, all the tests pass, etc. But now I need to turn it into a pre-compiled, free-standing loadable module, and this is not going so well.

When I attempt to run the tests using this pre-compiled version, the loading fails with an error about not being able to find the symbol XS_unpack_charPtrPtr.

This makes no sense to me. I do have C functions in my code whose arguments include some of type char**, I even have one that takes char***, but all these functions are statics, unseen by the Perl code; these functions that take char** are called only by other C functions. Therefore I don't see why they should cause this reference to XS_unpack_charPtrPtr. If my reasoning here is incorrect (which is quite likely), please let me know.

I've tried to make a simple example that illustrates the problem, without any luck. The error shows up only when there's a substantial amount of code. (In fact, AFAICT, what I have here is a Heisenbug.)

Therefore, the only thing I can hope for is some general Inline debugging/troubleshooting advice. For starters, I would love to know how to find out which function in my code is causing Inline C to generate a reference to XS_unpack_charPtrPtr.

FWIW, I'm following the instructions given in the Inline docs, under the section "Writing Modules with Inline". This includes modifying Makefile.PL to use Inline::MakeMaker instead of ExtUtils::MakeMaker. The versions of all the modules used are the most current ones from CPAN.

Many thanks in advance!

the lowliest monk


In reply to weird XS_unpack_charPtrPtr error by tlm

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.