Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Adding Modules to Non-Standard Locations in Solaris 8

by beernuts (Pilgrim)
on Apr 23, 2002 at 20:51 UTC ( [id://161436]=perlquestion: print w/replies, xml ) Need Help??

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

Monks,

I'm trying to add a few perl modules to a non-standard directory under Solaris 8, something like /notusrperl5/lib/. I've got gcc working with 5.00503 so there's one headache out of the way, but when I:

perl Makefile.PL PREFIX=/notusrperl5/lib /usr/ccs/bin/make /usr/ccs/bin/make test /usr/ccs/bin/make install
the files just install into /usr/perl5/... completely ignoring my 'PREFIX' arg. Has anyone else encountered this? Am I missing something simple, like a known Makemaker problem? Am I resigned to copying the modules and associated libraries manually after the install given my system limitations?

-beernuts

Replies are listed 'Best First'.
Re: Adding Modules to Non-Standard Locations in Solaris 8
by vek (Prior) on Apr 23, 2002 at 21:17 UTC
    I see you are setting PREFIX but you're not setting LIB:
    perl Makefile.PL PREFIX=/notusrperl5/lib LIB=/notusrperl5/lib
    If memory serves, LIB is where the module files will go and PREFIX is the stub directory for everything else.

    -- vek --
      vek,

      ++! It's installing, albeit strangely. It's putting everything where I want, it's just adding a few extra directories:
      /notusrperl5/lib/lib/lib/Module/. Minor problem, given the end result. Again, ++!

      --beernuts

Re: Adding Modules to Non-Standard Locations in Solaris 8
by mojotoad (Monsignor) on Apr 23, 2002 at 22:14 UTC
    Setting LIB in addition to PREFIX may be a workaround, but PREFIX alone should be enough. If it isn't, it's either a bug or a sign of an improperly configured perl installation.

    From the Extutils::MakeMaker docs:

    Conflicts between parameters LIB, PREFIX and the various INSTALL* arguments are resolved so that:
    • setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX);
    • without LIB, setting PREFIX replaces the initial $Config{prefix} part of those INSTALL* arguments, even if the latter are explicitly set (but are set to still start with $Config{prefix}).
    That might sound convoluted on first read, but what it means is that PREFIX *should* set everything, but LIB will override PREFIX should you so desire -- this allows you to send the pods, etc, off to somewhere besides where the actual modules reside.

    I've used PREFIX to great effect on many systems, however it *will* break if your perl was not compiled properly. Depending on how the inital locations are defined some of this can end up being hard-coded and beyond the ken of PREFIX.

    Matt

      Matt,

      ++. Aside from the compiler changes to Config.pm, Perl is just as it gets installed from the Solaris 8 CDs (which isn't to say it's correct, just standard). What I've found is that setting LIB, INSTALLMAN1DIR and INSTALLMAN3DIR gives me what I'm looking for. Adding PREFIX into the mix seems to confuse MakeMaker. It installs things into strange, recursive-looking directories (../lib/lib/lib, see above post). This seems to contradict LIB overriding PREFIX - it seems to append to it under 5.00503/Solaris 8. Even the dead stock Solaris 8 machine has the same problem. Hrmmmm...

      *heads off to delve into perldoc ExtUtils::MakeMaker*

      Thanks again,
      -beernuts

Re: Adding Modules to Non-Standard Locations in Solaris 8
by d4vis (Chaplain) on Apr 23, 2002 at 21:35 UTC
    I think vek is right.
    This is from the CPAN faq:
    "How do I manually install a module in a private/non-standard director +y? You need to set PREFIX and LIB when you run the Makefile.PL. LIB is wh +ere the module files will go and PREFIX is the stub directory for eve +rything else. For example: foo@barbell$ perl Makefile.PL LIB=/home/foobar/mylib PREFIX=/home/fo +obar/mylib Read more about this in the ExtUtils::MakeMaker documentation.

    ~monk d4vis
    #!/usr/bin/fnord

Re: Adding Modules to Non-Standard Locations in Solaris 8
by RMGir (Prior) on Apr 23, 2002 at 21:04 UTC
    I have the same problem with 5.00503, but PREFIX does work for me with more recent perls, such as 5.6.0, albeit on Linux.

    From the README for the most recent version, though:

    Known Problems: PREFIX/LIB broken on Debian systems and many others.
    This may not be a good omen... :(
    --
    Mike
      Thanks for the pointer, RMgir, ++. I've not had problems doing it either (under Linux as well) until today. Hmmm. *mutters soemthing nasty about the dot in dot com*

      In all seriousness, thanks for the tip, I really appreciate it.

      -beernuts

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-25 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found