Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

How can I persuade MakeMaker to install a file in $installarchlib/auto/...

by markt (Initiate)
on Sep 29, 2016 at 09:02 UTC ( [id://1172902]=perlquestion: print w/replies, xml ) Need Help??

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

I am using SWIG to wrap functions from a C library (libX.a) and producing a shared object (Y.so) and a Perl module (Y.pm).

Neither the library C code nor the library object files are available on the target platform so the shared object is created outwith MakeMaker. The Makefile.PL is written to create the distribution tarball so that the usual rules apply on `make install`.

However the shared object is installed in the same directory as the Perl module and Dynaload is unable to find the required symbols.

Looking at other Makefie.PL flles from modules that do install a shared object in the correct place there is no explicit mechanism to place such a shared object. The magic seems to be enabled by defining values for LIB (or some such variable).

Please could someone tell me where to look in MakeMaker code (whilst I start at the top and go on until the end).

TIA

MarkT

Replies are listed 'Best First'.
Re: How can I persuade MakeMaker to install a file in $installarchlib/auto/...
by Anonymous Monk on Sep 29, 2016 at 10:27 UTC
    The swig docs should have example

      Well - I tried various things like writing a MY::xs_make_dynamic_lib method or adding postamble attribute and MY:: method but ran out of Copious Free Time.

      Reverted to a vanilla Makefile.PL and copied the shared object from $installprivlib/... to $installarchlib/auto/... in the %postinstall script of the package.

      hey ho

      --
      MarkT

        Hi,

        That seems straight forward, although I would move the file instead of copy as extra copies don't do anything :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-28 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found