Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtUtils::PkgConfig dependency #5

Closed
trinitum opened this issue Mar 24, 2015 · 4 comments
Closed

ExtUtils::PkgConfig dependency #5

trinitum opened this issue Mar 24, 2015 · 4 comments

Comments

@trinitum
Copy link

When I tried to install the package with cpanm, I've got the following error:

Running Makefile.PL
Can't locate ExtUtils/PkgConfig.pm in @INC (@INC contains: /home/pavel/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/x86_64-linux /home/pavel/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1 /home/pavel/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux /home/pavel/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1 .) at Makefile.PL line 2.
BEGIN failed--compilation aborted at Makefile.PL line 2.

I guess the reason is that ExtUtils::PkgConfig dependency is specified in Makefile.PL as PREREQ_PM while it should be specified as BUILD_REQUIRES, hence cpanm doesn't install it before running Makefile.PL.

Manual installation of ExtUtils::PkgConfig fixed the problem of course.

@cosimo
Copy link
Owner

cosimo commented Mar 25, 2015

Hi, thanks for your comment.
Even if it was like you mention, I'm not sure how to get around the fact that Makefile.PL itself needs ExtUtils::PkgConfig to run... Any idea?

@trinitum
Copy link
Author

Oops, I was mistaken, it should be CONFIGURE_REQUIRES. If you specify dependency in CONFIGURE_REQUIRES it will be installed before Makefile.PL executed. When you running make dist, this information goes into META.yml, and cpan or cpanm know from it, that they should install these dependencies before running Makefile.PL

@trinitum
Copy link
Author

Thanks, 1fc3672 fixed the problem, I checked it on a clean perlbrew and indeed cpanm installed ExtUtils::PkgConfig before running Makefile.PL:

$ cpanm Text::Hunspell
--> Working on Text::Hunspell
Fetching http://www.cpan.org/authors/id/C/CO/COSIMO/Text-Hunspell-2.10.tar.gz ... OK
==> Found dependencies: ExtUtils::PkgConfig
--> Working on ExtUtils::PkgConfig
Fetching http://www.cpan.org/authors/id/X/XA/XAOC/ExtUtils-PkgConfig-1.15.tar.gz ... OK
Configuring ExtUtils-PkgConfig-1.15 ... OK
Building and testing ExtUtils-PkgConfig-1.15 ... OK
Successfully installed ExtUtils-PkgConfig-1.15
Configuring Text-Hunspell-2.10 ... OK
Building and testing Text-Hunspell-2.10 ... OK
Successfully installed Text-Hunspell-2.10
2 distributions installed

@cosimo
Copy link
Owner

cosimo commented Mar 27, 2015

Great, thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants