I have an iBook. It shipped with Mac OS X 10.1.something, and Perl 5.6.0. After "software update", fink, upgrade to 10.2, rinse, repeat, it now has 10.2.6, and still Apple's Perl 5.6.0.

Some time ago I started having problems with XS modules: they would compile, but in the test phase I would get "dyld: /usr/bin/perl Undefined symbols: _PERL_UNUSED_VAR", and Perl would "crash".

Google did not turn up anything useful (some "happened to me", "works for me" only), so I dived into the source of the modules and the various parts of the XS-to-C transformation.

I discovered that /Library/Perl/ExtUtils/ParseXS.pm inserts a "PERL_UNUSED_VAR(ax)" in some functions, presumably to stop gcc from complaining about unused arguments.

The problem is, that should be either a macro or a function: there is no macro defined with that name, so the compiler makes it a function call; there is no such function, so the loader dies at link-time.

For the moment I have "solved" the problem by commenting out that line, and everything seems to work.

Has anyone else experienced the same problem? (I did use super search)

Is what I did "right" in some sense, or is it going to cause problems?

-- 
        dakkar - Mobilis in mobile

Most of my code is tested...

Perl is strongly typed, it just has very few types (Dan)


In reply to "undefined symbols" on Mac OS X by dakkar

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.