FAQ
Hi,

I have a module B which is prerequisite for A module.
I have built Module B by running these steps

perl Makefile.PL PREFIX=/path/to/where/you/want/it
gmake
gmake test
gmake install

The module gets installed at /path/to/where/you/want/it.

Then for building module A when i run
perl Makefile.PL PREFIX=/path/to/where/you/want/it
I got this
Warning: prerequisite B::foo 1 not found.

What is happening here is when it tries to generate Makefile by running perl Makefile.PL PREFIX=/path/to/where/you/want/it, it is looking for the prerequisite B::foo in the directory where Perl is installed. But i have installed it at /path/to/where/you/want/it.

Any suggestion how to resolve this problem?

Thanks & Regards
Yaseen






---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.

Search Discussions

  • Jim Cromie at May 2, 2006 at 12:11 pm

    mohammad yaseen wrote:
    Hi,

    I have a module B which is prerequisite for A module.
    I have built Module B by running these steps
    Theres already a B module in core, you could be clashing with it.
    Simplest thing to do is change your name.
    FWIW, its generally wise to stay away from $a, $b too, theyre special
    for sort
    perldoc -f sort
  • Yuval Kogman at May 2, 2006 at 12:14 pm

    On Tue, May 02, 2006 at 05:25:47 -0700, mohammad yaseen wrote:
    Hi,

    I have a module B which is prerequisite for A module.
    I have built Module B by running these steps

    perl Makefile.PL PREFIX=/path/to/where/you/want/it ....
    What is happening here is when it tries to generate Makefile by running perl Makefile.PL PREFIX=/path/to/where/you/want/it, it is looking for the prerequisite B::foo in the directory where Perl is installed. But i have installed it at /path/to/where/you/want/it.
    Try

    export PERL5LIB=$PERL5LIB:/path/to/where/you/want/it

    before running the Makefile.PL so that the B makefile.pl can have a
    chance at loading module A.

    Beware that PREFIX doesn't work correctly on some platforms, and
    that Module::Build modules will not support it without generating a
    traditional makefile.PL.

    --
    Yuval Kogman <nothingmuch@woobling.org>
    http://nothingmuch.woobling.org 0xEBD27418
  • Mohammad yaseen at May 2, 2006 at 12:48 pm
    I tried as you suggested, but i'm still facing the same problem.

    Yuval Kogman wrote:
    On Tue, May 02, 2006 at 05:25:47 -0700, mohammad yaseen wrote:
    Hi,

    I have a module B which is prerequisite for A module.
    I have built Module B by running these steps

    perl Makefile.PL PREFIX=/path/to/where/you/want/it ....
    What is happening here is when it tries to generate Makefile by running perl Makefile.PL PREFIX=/path/to/where/you/want/it, it is looking for the prerequisite B::foo in the directory where Perl is installed. But i have installed it at /path/to/where/you/want/it.
    Try

    export PERL5LIB=$PERL5LIB:/path/to/where/you/want/it

    before running the Makefile.PL so that the B makefile.pl can have a
    chance at loading module A.

    Beware that PREFIX doesn't work correctly on some platforms, and
    that Module::Build modules will not support it without generating a
    traditional makefile.PL.

    --
    Yuval Kogman
    http://nothingmuch.woobling.org 0xEBD27418



    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com
  • Yuval Kogman at May 2, 2006 at 12:52 pm

    On Tue, May 02, 2006 at 06:48:23 -0700, mohammad yaseen wrote:
    I tried as you suggested, but i'm still facing the same problem.
    Sorry, I was not accurate. The PERL5LIB value should contain the
    actual 'lib' directory which is presumably under the prefix (this is
    where the portability issues begin).

    what PREFIX does is replace Perl's original PREFIX, usually
    something like "/usr" or "/usr/local" with something else. Arguably
    it should be under $PREFIX/lib for more DWIM like behavior, and
    arguably it should also be consistent with the original value
    (lib/perl5/{site_perl,vendor}/lib or whatever perl was configured
    for) - and this is what is at the heart of the dispute.

    Poke around your prefix and find the thing that should be added to
    @INC.

    --
    Yuval Kogman <nothingmuch@woobling.org>
    http://nothingmuch.woobling.org 0xEBD27418
  • Mohammad yaseen at May 3, 2006 at 11:45 am
    Thanks Yuval,

    I tried another approach of installing module in non-standard place and it worked.

    For B module
    ____________

    perl Makefile.PL LIB=/home/uid/lib/perl
    gmake
    gmake test
    gmake install

    After installing the B module using these steps,i did
    export PERL5LIB=/home/uid/lib/perl before running again
    these steps for the A module.
    It is able to locate the prerequisite and build the A module.

    Thanks & Regards
    Yaseen




    Yuval Kogman wrote: On Tue, May 02, 2006 at 06:48:23 -0700, mohammad yaseen wrote:
    I tried as you suggested, but i'm still facing the same problem.
    Sorry, I was not accurate. The PERL5LIB value should contain the
    actual 'lib' directory which is presumably under the prefix (this is
    where the portability issues begin).

    what PREFIX does is replace Perl's original PREFIX, usually
    something like "/usr" or "/usr/local" with something else. Arguably
    it should be under $PREFIX/lib for more DWIM like behavior, and
    arguably it should also be consistent with the original value
    (lib/perl5/{site_perl,vendor}/lib or whatever perl was configured
    for) - and this is what is at the heart of the dispute.

    Poke around your prefix and find the thing that should be added to
    @INC.

    --
    Yuval Kogman
    http://nothingmuch.woobling.org 0xEBD27418




    ---------------------------------
    Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.
  • Randy W. Sims at May 4, 2006 at 11:56 pm

    Yuval Kogman wrote:
    Beware that PREFIX doesn't work correctly on some platforms, and
    that Module::Build modules will not support it without generating a
    traditional makefile.PL.
    As of version 0.28, Module::Build does fully support MakeMaker-style
    'prefix' (note: lowercase spelling) thanks to the work of Michael
    Schwern. The compatibility Makefile.PLs generated by Module::Build
    support the uppercase 'PREFIX' argument.

    Randy.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedMay 2, '06 at 11:25a
activeMay 4, '06 at 11:56p
posts7
users4
websiteperl.org

People

Translate

site design / logo © 2021 Grokbase