Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

install module without the compiler

by andyford (Curate)
on Nov 29, 2005 at 17:34 UTC ( [id://512722]=perlquestion: print w/replies, xml ) Need Help??

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

For most modules, I can take the post-build source tree that's been installed on one computer, copy the tree to another computer (with an identical OS, etc.), run "make install" and it just works even though the second computer doesn't have the compiler that I used to build the module originally.

Sometimes when I move the source tree, the "make install" on the new computer wants to re-run some compilation steps, which fail due to lack of compiler.

Is there a general strategy for dealing with these problems?

Are the "make install" dependencies not (in some sense) correctly configured?

If I drag myself through the output of "make -n install", and just copy the files to where they're supposed to go manually, what problems will I be likely to encounter?

BTW, the module I'm currently wrestling with is Time::HiRes on HP-UX 11.00.

Replies are listed 'Best First'.
Re: install module without the compiler
by davidrw (Prior) on Nov 29, 2005 at 18:01 UTC
    Have you looked at PAR for packaging up all your dependencies?
      Wow! That looks amazing. Thanks.
Re: install module without the compiler
by Courage (Parson) on Nov 29, 2005 at 21:30 UTC
    Time::HiRess is part of the core, and 'wrestlinng' with it means something dangerous, so don't do it.

    Also, what exact steps lead you to your problem? AFAIK ExtUtils::MakeMaker (and so perl Makefile.PL) should be good, otherwise file a bug report or discuss your problem at perl developers list perl5-porters, because in this case you've encountered more general perl problem, and PM people usually do not "fix" perl problems of this level.

    Best regards,
    Courage, the Cowardly Dog

      Sorry. Forgot to mention that I'm stuck with Perl 5.6.1 for this app, so it's not core for me.

      The module installs great when you start from 'perl Makefile.PL', it's just when you copy the tree somewhere else and try to start from 'make install' that the problem arises.

      Found a make target 'pure_install' in the Makefile that just copied the modules files into place. Good for a point solution while I'm off learning PAR.

Re: install module without the compiler
by rinceWind (Monsignor) on Nov 30, 2005 at 14:12 UTC

    As an alternative to the PAR approach, you could instead adopt the following technique:

    1. Decide on a special installation directory on your build machine. If you are doing installs not as root, you will probably have one of these already - lets call it $INST.

    2. Point $PERL5LIB at $INST/lib.

    3. perl Makefile.PL LIB=$INST/lib PREFIX=$INST make make test make install
    4. Repeat step 3 for all the modules you need.

    5. tar and zip up $INST directory tree and deploy to target machine.

    This will do the trick provided both machines have the same architecture, and any external libraries that are referenced.

    --

    Oh Lord, won’t you burn me a Knoppix CD ?
    My friends all rate Windows, I must disagree.
    Your powers of persuasion will set them all free,
    So oh Lord, won’t you burn me a Knoppix CD ?
    (Missquoting Janis Joplin)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-12-07 15:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (50 votes). Check out past polls.