Loading ...
Sorry, an error occurred while loading the content.

Include path question

Expand Messages
  • Vsevolod (Simon) Ilyushchenko
    Hi, This has been bothering me for a while. If I install Perl modules into a custom location (say, /opt/perl), I have to specify *two* directories in my
    Message 1 of 9 , Nov 3, 2005
    • 0 Attachment
      Hi,

      This has been bothering me for a while. If I install Perl modules into a
      custom location (say, /opt/perl), I have to specify *two* directories in
      my include path to see all of them:
      -I /opt/perl/lib -I /opt/perl/lib/perl5/site_perl

      I think that's mostly a problem for modules built with Makefile.PL, not
      Build.PL - the latter specifically says it's addressing INC problems,
      but meanwhile, for the older installations, is this situation normal?

      Thanks,
      Simon
      --

      Simon (Vsevolod ILyushchenko) simonf@...
      http://www.simonf.com

      "Think like a man of action, act like a man of thought."

      Henri Bergson
    • James Keenan
      ... Can you clarify what you mean by see them? If you mean to get them put into @INC in a command-line invocation of a script just as would be done by use
      Message 2 of 9 , Nov 3, 2005
      • 0 Attachment
        On Nov 3, 2005, at 3:38 PM, Vsevolod (Simon) Ilyushchenko wrote:

        > Hi,
        >
        > This has been bothering me for a while. If I install Perl modules into
        > a
        > custom location (say, /opt/perl), I have to specify *two* directories
        > in
        > my include path to see all of them:
        > -I /opt/perl/lib -I /opt/perl/lib/perl5/site_perl
        >

        Can you clarify what you mean by 'see' them? If you mean "to get them
        put into @INC in a command-line invocation of a script just as would be
        done by 'use lib' (); inside a program," then I don't understand the
        problem. A module should have only one location.

        jimk
      • Vsevolod (Simon) Ilyushchenko
        Jim, I mean that some modules go into /opt/perl/lib, and some others into /opt/perl/lib/perl5/site_perl. When I m using a lot of modules, I always have to put
        Message 3 of 9 , Nov 3, 2005
        • 0 Attachment
          Jim,

          I mean that some modules go into /opt/perl/lib, and some others into
          /opt/perl/lib/perl5/site_perl. When I'm using a lot of modules, I always
          have to put both of these paths into @INC, or some of the modules are
          not found.

          Thanks,
          Simon

          James Keenan wrote on 11/03/2005 05:34 PM:
          > On Nov 3, 2005, at 3:38 PM, Vsevolod (Simon) Ilyushchenko wrote:
          >
          >
          >>Hi,
          >>
          >>This has been bothering me for a while. If I install Perl modules into
          >>a
          >>custom location (say, /opt/perl), I have to specify *two* directories
          >>in
          >>my include path to see all of them:
          >>-I /opt/perl/lib -I /opt/perl/lib/perl5/site_perl
          >>
          >
          >
          > Can you clarify what you mean by 'see' them? If you mean "to get them
          > put into @INC in a command-line invocation of a script just as would be
          > done by 'use lib' (); inside a program," then I don't understand the
          > problem. A module should have only one location.
          --

          Simon (Vsevolod ILyushchenko) simonf@...
          http://www.simonf.com

          "Think like a man of action, act like a man of thought."

          Henri Bergson
        • Perrin Harkins
          ... Sounds like you re not installing them correctly. I install all my modules locally and none of them ever end in site_perl. The options to do this are
          Message 4 of 9 , Nov 3, 2005
          • 0 Attachment
            On Thu, 2005-11-03 at 17:52 -0500, Vsevolod (Simon) Ilyushchenko wrote:
            > I mean that some modules go into /opt/perl/lib, and some others into
            > /opt/perl/lib/perl5/site_perl.

            Sounds like you're not installing them correctly. I install all my
            modules locally and none of them ever end in site_perl. The options to
            do this are different with Makefile.PL than they are with Build.PL.

            - Perrin
          • Vsevolod (Simon) Ilyushchenko
            ... I m just doing perl Makefile.PL PREFIX=/opt/perl or the equivalent in CPAN s config file. Should I be doing something else? Watch this installation of
            Message 5 of 9 , Nov 3, 2005
            • 0 Attachment
              Perrin Harkins wrote on 11/03/2005 06:14 PM:
              > On Thu, 2005-11-03 at 17:52 -0500, Vsevolod (Simon) Ilyushchenko wrote:
              >
              >>I mean that some modules go into /opt/perl/lib, and some others into
              >>/opt/perl/lib/perl5/site_perl.
              >
              >
              > Sounds like you're not installing them correctly. I install all my
              > modules locally and none of them ever end in site_perl. The options to
              > do this are different with Makefile.PL than they are with Build.PL.

              I'm just doing "perl Makefile.PL PREFIX=/opt/perl" or the equivalent in
              CPAN's config file. Should I be doing something else? Watch this
              installation of Data::Page (I'm using Fedora Core 4's default perl):

              ***
              -->sudo perl Makefile.PL PREFIX=/opt/perl
              Writing Makefile for Data::Page

              -->sudo make
              Manifying blib/man3/Data::Page.3pm

              -->sudo make install
              Installing /opt/perl/lib/perl5/site_perl/5.8.6/Data/Page.pm
              Installing /opt/perl/share/man/man3/Data::Page.3pm
              Writing
              /opt/perl/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/auto/Data/Page/.packlist
              Appending installation info to
              /opt/perl/lib/perl5/5.8.6/i386-linux-thread-multi/perllocal.pod
              ***

              perl -V shows:


              Characteristics of this binary (from libperl):
              Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS
              USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
              Built under linux
              Compiled at May 18 2005 18:21:23
              %ENV:

              PERL5LIB="/opt/software/perl/lib:/opt/software/perl/lib/perl5/site_perl"
              @INC:
              /opt/software/perl/lib/5.8.6/i386-linux-thread-multi
              /opt/software/perl/lib/5.8.6
              /opt/software/perl/lib/i386-linux-thread-multi
              /opt/software/perl/lib/5.8.5
              /opt/software/perl/lib/5.8.4
              /opt/software/perl/lib/5.8.3
              /opt/software/perl/lib
              /opt/software/perl/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
              /opt/software/perl/lib/perl5/site_perl/5.8.6
              /opt/software/perl/lib/perl5/site_perl/i386-linux-thread-multi
              /opt/software/perl/lib/perl5/site_perl/5.8.5
              /opt/software/perl/lib/perl5/site_perl/5.8.4
              /opt/software/perl/lib/perl5/site_perl/5.8.3
              /opt/software/perl/lib/perl5/site_perl
              /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
              /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
              /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi
              /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi
              /usr/lib/perl5/site_perl/5.8.6
              /usr/lib/perl5/site_perl/5.8.5
              /usr/lib/perl5/site_perl/5.8.4
              /usr/lib/perl5/site_perl/5.8.3
              /usr/lib/perl5/site_perl
              /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
              /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
              /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi
              /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi
              /usr/lib/perl5/vendor_perl/5.8.6
              /usr/lib/perl5/vendor_perl/5.8.5
              /usr/lib/perl5/vendor_perl/5.8.4
              /usr/lib/perl5/vendor_perl/5.8.3
              /usr/lib/perl5/vendor_perl
              /usr/lib/perl5/5.8.6/i386-linux-thread-multi
              /usr/lib/perl5/5.8.6
              .


              Thanks,
              Simon
              --

              Simon (Vsevolod ILyushchenko) simonf@...
              http://www.simonf.com

              "Think like a man of action, act like a man of thought."

              Henri Bergson
            • Perrin Harkins
              ... I think you should specify LIB. Here s an example from our auto- installer: perl Makefile.PL LIB=$dest_dir PREFIX=$trash_dir INSTALLMAN3DIR=
              Message 6 of 9 , Nov 3, 2005
              • 0 Attachment
                On Thu, 2005-11-03 at 18:38 -0500, Vsevolod (Simon) Ilyushchenko wrote:
                > I'm just doing "perl Makefile.PL PREFIX=/opt/perl" or the equivalent in
                > CPAN's config file. Should I be doing something else?

                I think you should specify LIB. Here's an example from our auto-
                installer:

                perl Makefile.PL LIB=$dest_dir PREFIX=$trash_dir INSTALLMAN3DIR=' '
                INSTALLMAN1DIR=' '

                We do this to get rid of all the man pages and junk, since we just want
                the libs.

                - Perrin
              • Vsevolod (Simon) Ilyushchenko
                Thanks! Simon ... -- Simon (Vsevolod ILyushchenko) simonf@cshl.edu http://www.simonf.com Think like a man of action, act like a man of thought. Henri
                Message 7 of 9 , Nov 3, 2005
                • 0 Attachment
                  Thanks!

                  Simon

                  Perrin Harkins wrote on 11/03/2005 06:49 PM:
                  > On Thu, 2005-11-03 at 18:38 -0500, Vsevolod (Simon) Ilyushchenko wrote:
                  >
                  >>I'm just doing "perl Makefile.PL PREFIX=/opt/perl" or the equivalent in
                  >>CPAN's config file. Should I be doing something else?
                  >
                  >
                  > I think you should specify LIB. Here's an example from our auto-
                  > installer:
                  >
                  > perl Makefile.PL LIB=$dest_dir PREFIX=$trash_dir INSTALLMAN3DIR=' '
                  > INSTALLMAN1DIR=' '
                  >
                  > We do this to get rid of all the man pages and junk, since we just want
                  > the libs.
                  >
                  > - Perrin
                  >
                  >
                  >
                  >
                  >
                  > Yahoo! Groups Links
                  >
                  >
                  >
                  >
                  >
                  >
                  >

                  --

                  Simon (Vsevolod ILyushchenko) simonf@...
                  http://www.simonf.com

                  "Think like a man of action, act like a man of thought."

                  Henri Bergson
                • Steven Lembark
                  ... If you cannot install the stuff into the default perl location and you normally work out of a sandbox (i.e, CVS or svn tree) then just use a prefix of a
                  Message 8 of 9 , Nov 4, 2005
                  • 0 Attachment
                    > I think that's mostly a problem for modules built with Makefile.PL, not
                    > Build.PL - the latter specifically says it's addressing INC problems,
                    > but meanwhile, for the older installations, is this situation normal?

                    If you cannot install the stuff into the default perl
                    location and you normally work out of a sandbox (i.e,
                    CVS or svn tree) then just use a prefix of a 'lib' dir
                    in your sandbox's root (e.g., "./sandbox/lib/") and
                    use FindBin::libs. This is exactly the situation it
                    was originally developed to solve.

                    --
                    Steven Lembark 85-09 90th Street
                    Workhorse Computing Woodhaven, NY 11421
                    lembark@... 1 888 359 3508
                  • Marc Prewitt
                    ... There s also another magical thing you can do to make sure that things are not installed into the siteperl directory: perl Makefile.PL PREFIX={...}
                    Message 9 of 9 , Nov 6, 2005
                    • 0 Attachment
                      Perrin Harkins wrote:
                      > On Thu, 2005-11-03 at 18:38 -0500, Vsevolod (Simon) Ilyushchenko wrote:
                      >> I'm just doing "perl Makefile.PL PREFIX=/opt/perl" or the equivalent in
                      >> CPAN's config file. Should I be doing something else?
                      >
                      > I think you should specify LIB. Here's an example from our auto-
                      > installer:
                      >
                      > perl Makefile.PL LIB=$dest_dir PREFIX=$trash_dir INSTALLMAN3DIR=' '
                      > INSTALLMAN1DIR=' '
                      >
                      > We do this to get rid of all the man pages and junk, since we just want
                      > the libs.
                      >
                      > - Perrin

                      There's also another magical thing you can do to make sure that things
                      are not installed into the siteperl directory:

                      perl Makefile.PL PREFIX={...} INSTALLDIRS=perl

                      I can't actually test this out right now as my regular install doesn't
                      go into site_perl but I had to do this for something I built a while ago.
                    Your message has been successfully submitted and would be delivered to recipients shortly.