Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Real Static Modules

by syphilis (Archbishop)
on Sep 18, 2007 at 01:29 UTC ( [id://639529]=note: print w/replies, xml ) Need Help??


in reply to Real Static Modules

I’m really looking for a way to get an external static library compiled into a Perl module shared library. Is that even possible?

Definitely possible - in fact that's precisely what happens when you build the perl module against a *static* build of the external library. (Therein lies one reason that I prefer to build static, rather than shared, libraries.)

Your problem, as I see it, is that you want to incorporate a *shared* library into the perl module's '.so'. If that can be done, then I don't know how to do it .... it undoes what shared libraries set out to achieve, so I'm a little sceptical.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Real Static Modules
by mpeppler (Vicar) on Oct 02, 2007 at 07:18 UTC
    This indeed feasible on many platforms, but on some platforms you can't dynamically load a .so that has been linked to a .a (or equivalent) file (HP-UX comes to mind).

    As an aside - I was surprised that on AIX (at least 5.2) the links are static by default, so my Sybase.so file is in fact independent of the libct.so, etc. files...

    Michael

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://639529]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-20 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found