Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

"undefined symbols" on Mac OS X

by dakkar (Hermit)
on Jul 05, 2003 at 16:12 UTC ( #271646=perlquestion: print w/replies, xml ) Need Help??

dakkar has asked for the wisdom of the Perl Monks concerning the following question:

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/ 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)

Replies are listed 'Best First'.
Re: "undefined symbols" on Mac OS X
by Cody Pendant (Prior) on Jul 06, 2003 at 02:13 UTC
    I can't help with that particular problem, but I can tell you there's an OS X/Perl mailing list which you ought to be able to find quite easily, and it's a very helpful resource with lots of clued-up people on it.

    “Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”
    M-J D

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://271646]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2022-01-23 07:04 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (63 votes). Check out past polls.