Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2024-04-19 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found