Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Getting __errno_location when loading Perl XS module on FreeBSD

by ait (Friar)
on Aug 16, 2011 at 14:47 UTC ( #920501=perlquestion: print w/replies, xml ) Need Help??
ait has asked for the wisdom of the Perl Monks concerning the following question:


I'm compiling a proprietary lib on FreeBSD that offers a Perl API via XS. The package comes with an ar archive for Linux 64 but I need to compile it and run it on FreeBSD. FreeBSD make process makes no complaints about the object files in the ar in the make process, and everything makes without an error.

The lib compiles fine, but when the dynaloader is loading I get:

/libexec/ (undisclosed).so: Undefined symbol "__errno_location"

Is this ld-elf complaining that it does not find the symbol in (undisclosed), or is it (undisclosed) not finding the symbol in it's dependencies?

I've been trying to learn more about __errno_location but some say it's relates to the pthreads lib, some that it's libm and should be defined in errno.h, but nope, it's not defined in any .h in Linux or FreeBSD!

As you can see, the lib build fine and satisfies all dependencies. Shouldn't the undefined symbol pop-up during linking of the shared object (during creation) instead than on dynamic linking?

ldd blib/arch/auto/<undisclosed>.so blib/arch/auto/Gateway/ => /usr/local/lib/ (0x800c00000) => /usr/lib/ (0x800d54000) => /usr/lib/ (0x800ea7000) => /lib/ (0x8010b7000) => /lib/ (0x8011d7000) => /lib/ (0x800647000) => /lib/ (0x8012e5000) => /lib/ (0x801585000)

Thanks in advance for any comments.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://920501]
Approved by herveus
Front-paged by toolic
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2016-10-25 09:53 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (315 votes). Check out past polls.