Can't locate ExtUtils/MakeMaker.pm in @INC
This looks like the last issue with Git 2.12.2. This time the machine is Fedora 25.
I configured with PERL_PATH=/usr/local/bin/perl. The local Perl was built specifically for this error, and it includes ExtUtils/MakeMaker.pm:
$ find /usr/local -name MakeMaker.pm /usr/local/lib/perl5/5.24.1/ExtUtils/MakeMaker.pm
$ make all ...
GEN git-bisect
GEN git-difftool--helper
GEN git-filter-branch
GEN git-merge-octopus
GEN git-merge-one-file
GEN git-merge-resolve
GEN git-mergetool
GEN git-quiltimport
GEN git-rebase
GEN git-request-pull
GEN git-stash
GEN git-submodule
GEN git-web--browse
SUBDIR perl/usr/bin/perl Makefile.PL PREFIX='/usr/local' INSTALL_BASE='' --localedir='/usr/local/share/locale'
GEN git-p4
Can't locate ExtUtils/MakeMaker.pm in @INC (you may need to install the ExtUtils::MakeMaker module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 3.
BEGIN failed--compilation aborted at Makefile.PL line 3. Makefile:83: recipe for target 'perl.mak' failed
make[1]: *** [perl.mak] Error 2
Makefile:1843: recipe for target 'perl/perl.mak' failed
make: *** [perl/perl.mak] Error 2
make: *** Waiting for unfinished jobs....
Failed to build Git
/usr/local/bin/perl is on path but Git is using the old one in /usr/bin:
$ which perl
/usr/local/bin/perlIt appears Git is not honoring the request for the updated Perl.
Thanks,
Quoted 6 lines · Jeffrey Walton
This looks like the last issue with Git 2.12.2. This time the machine is Fedora 25.
I configured with PERL_PATH=/usr/local/bin/perl. The local Perl was built specifically for this error, and it includes ExtUtils/MakeMaker.pm:
I'm not sure what "configured with PERL_PATH" means exactly. If you did:
PERL_PATH=/usr/local/bin/perl ./configure
then I don't think that works. The way to tell configure that you want to use a specific version of perl is with a command-line option:
./configure --with-perl=/usr/local/bin/perl
When you're running make itself, you can override the default (or what was specified during configure) with:
make PERL_PATH=/usr/local/bin/perl
Both of the latter two work for me:
$ ./configure --with-perl=/perl/from/configure [...] $ make [...] /perl/from/configure Makefile.PL PREFIX='/home/peff/local/git/master' INSTALL_BASE='' --localedir='/home/peff/local/git/master/share/locale' make[1]: /perl/from/configure: Command not found
$ make PERL_PATH=/perl/from/make [...] /perl/from/make Makefile.PL PREFIX='/home/peff/local/git/master' INSTALL_BASE='' --localedir='/home/peff/local/git/master/share/locale' make[1]: /perl/from/make: Command not found
Obviously those are nonsense, but they quickly show that we're using the requested version of perl.
-Peff
PATCH 1/1 perl: regenerate perl.mak if perl -V changes
Change the perl/perl.mak build process so that the file is re-made if the output of "perl -V" changes.
Before this change updating e.g. /usr/bin/perl to a new major version would cause the next "make" command to fail, since perl.mak has hardcoded paths to perl library paths retrieved from its first run.
Now the logic added in commit ee9be06770 ("perl: detect new files in MakeMaker builds", 2012-07-27) is extended to regeneratio perl/perl.mak if there's any change to "perl -V".
This will in some cases redundantly trigger perl/perl.mak to be re-made, e.g. if @INC is modified in ways the build process doesn't care about through sitecustomize.pl, but the common case is that we just do the right thing and re-generate perl/perl.mak when needed.
---
Quoted 2 lines · Jeff King
On Tue, Mar 28, 2017 at 09:03:43PM -0400, Jeffrey Walton wrote:
[...]
At first I thought Jeffrey was running into this longstanding issue with the perl Makefile. Looks like not, and he just wasn't passing PERL_PATH correctly, but fix this related issue while it's fresh in my mind.
Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -1850,6 +1850,7 @@ perl/perl.mak: perl/PM.stamp perl/PM.stamp: FORCE @$(FIND) perl -type f -name '*.pm' | sort >$@+ && \ + $(PERL_PATH) -V >$@+ && \ { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \ $(RM) $@+
Signature · 1 line
2.11.0
PATCH v2 1/1 perl: regenerate perl.mak if perl -V changes
Change the perl/perl.mak build process so that the file is re-made if the output of "perl -V" changes.
Before this change updating e.g. /usr/bin/perl to a new major version would cause the next "make" command to fail, since perl.mak has hardcoded paths to perl library paths retrieved from its first run.
Now the logic added in commit ee9be06770 ("perl: detect new files in MakeMaker builds", 2012-07-27) is extended to regeneratio perl/perl.mak if there's any change to "perl -V".
This will in some cases redundantly trigger perl/perl.mak to be re-made, e.g. if @INC is modified in ways the build process doesn't care about through sitecustomize.pl, but the common case is that we just do the right thing and re-generate perl/perl.mak when needed.
---
Maybe this'll set some sort of record for a v2 submission, but anyway, this should clearly be >> not >, we don't want to overwrite the list of *.pm files we just added.
Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -1851,6 +1851,7 @@ perl/perl.mak: perl/PM.stamp perl/PM.stamp: FORCE @$(FIND) perl -type f -name '*.pm' | sort >$@+ && \ + $(PERL_PATH) -V >>$@+ && \ { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \ $(RM) $@+
Signature · 1 line
2.11.0
Re: [PATCH v2] perl: regenerate perl.mak if perl -V changes
Am 29.03.2017 um 15:33 schrieb Ævar Arnfjörð Bjarmason:
Quoted 9 lines
Change the perl/perl.mak build process so that the file is re-made if the output of "perl -V" changes.
Before this change updating e.g.
/usr/bin/perlto a new major version would cause the next "make" command to fail, since perl.mak has hardcoded paths to perl library paths retrieved from its first run.Now the logic added in commit
ee9be06770("perl: detect new files in MakeMaker builds", 2012-07-27) is extended to regeneratio
s/regeneratio/regenerate/
Quoted 1 line
[...]
/S
Signature · 4 lines
----------------------------------------------------------------
/dev/random says: HELP! I need a tagline. HELP! Not just any tagline.
python -c "print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')"
GPG Key fingerprint = 2DF5 E01B 09C3 7501 BCA9 9666 829B 49C5 9221 27AFPATCH v3 1/1 perl: regenerate perl.mak if perl -V changes
Change the perl/perl.mak build process so that the file is regenerated if the output of "perl -V" changes.
Before this change updating e.g. /usr/bin/perl to a new major version would cause the next "make" command to fail, since perl.mak has hardcoded paths to perl library paths retrieved from its first run.
Now the logic added in commit ee9be06770 ("perl: detect new files in MakeMaker builds", 2012-07-27) is extended to regenerate perl/perl.mak if there's any change to "perl -V".
This will in some cases redundantly trigger perl/perl.mak to be re-made, e.g. if @INC is modified in ways the build process doesn't care about through sitecustomize.pl, but the common case is that we just do the right thing and re-generate perl/perl.mak when needed.
---
Quoted 11 lines · On Wed, Mar 29, 2017 at 3:36 PM, <[email protected]> wrote:
Am 29.03.2017 um 15:33 schrieb Ævar Arnfjörð Bjarmason:
[...]Quoted 2 lines
Now the logic added in commit
ee9be06770("perl: detect new files in MakeMaker builds", 2012-07-27) is extended to regeneratios/regeneratio/regenerate/
Quoted 1 line
[...]
/S
Thanks!
Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -1851,6 +1851,7 @@ perl/perl.mak: perl/PM.stamp perl/PM.stamp: FORCE @$(FIND) perl -type f -name '*.pm' | sort >$@+ && \ + $(PERL_PATH) -V >>$@+ && \ { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \ $(RM) $@+
Signature · 1 line
2.11.0
Re: [PATCH v3] perl: regenerate perl.mak if perl -V changes
Quoted 6 lines · Ævar Arnfjörð Bjarmason
Change the perl/perl.mak build process so that the file is regenerated if the output of "perl -V" changes.
Before this change updating e.g.
/usr/bin/perlto a new major version would cause the next "make" command to fail, since perl.mak has hardcoded paths to perl library paths retrieved from its first run.
This is one of those things that has been bugging me for years, but it comes up so rarely that I have never dug into it.
Quoted 3 lines
Now the logic added in commit
ee9be06770("perl: detect new files in MakeMaker builds", 2012-07-27) is extended to regenerate perl/perl.mak if there's any change to "perl -V".
Nice. This fix is way simpler than I feared.
Quoted 4 lines
This will in some cases redundantly trigger perl/perl.mak to be re-made, e.g. if @INC is modified in ways the build process doesn't care about through sitecustomize.pl, but the common case is that we just do the right thing and re-generate perl/perl.mak when needed.
I think that's fine. There's a related bug that the generation of perl/perl.mak via recursive-make is sometimes racy. So that _might_ trigger more often as a result of this, but I think the solution is to fix that race, not try to pretend it won't happen. :)
-Peff
Re: [PATCH v3] perl: regenerate perl.mak if perl -V changes
Quoted 11 lines · Jeff King
Quoted 6 lines · Ævar Arnfjörð Bjarmason
Change the perl/perl.mak build process so that the file is regenerated if the output of "perl -V" changes.
Before this change updating e.g.
/usr/bin/perlto a new major version would cause the next "make" command to fail, since perl.mak has hardcoded paths to perl library paths retrieved from its first run.This is one of those things that has been bugging me for years, but it comes up so rarely that I have never dug into it.
Glad to help. I've only run into this once a couple of days ago, made a mental note to fix it, and then I saw that thread...
Quoted 11 lines
Quoted 3 lines
Now the logic added in commit
ee9be06770("perl: detect new files in MakeMaker builds", 2012-07-27) is extended to regenerate perl/perl.mak if there's any change to "perl -V".Nice. This fix is way simpler than I feared.
Quoted 4 lines
This will in some cases redundantly trigger perl/perl.mak to be re-made, e.g. if @INC is modified in ways the build process doesn't care about through sitecustomize.pl, but the common case is that we just do the right thing and re-generate perl/perl.mak when needed.
Quoted 4 lines
I think that's fine. There's a related bug that the generation of perl/perl.mak via recursive-make is sometimes racy. So that _might_ trigger more often as a result of this, but I think the solution is to fix that race, not try to pretend it won't happen. :)
We'll also redundantly trigger if you upgrade to a minor new perl version, but I think that's squarely in "who cares" territory. This'll only impact people working on git, and *occasionally* they might get a 100 ms hit when running make, as opposed to a cryptic error where they'll likely stare at it for a bit before running "make clean".
If we were being more pedantic we could only bust the cache on major perl version upgrades:
perl -e 'print substr($], 0, 5), "\n"' >>PM.stamp+
Or use Config.pm:
perl -MConfig -e 'print @Config{qw(api_revision api_version)},
"\n"' >>PM.stamp+
But I think overall leaning on the side of busting the cache more often to avoid cryptic errors is the right choice, and we should use "perl -V".
Re: [PATCH v3] perl: regenerate perl.mak if perl -V changes
Quoted 6 lines · Ævar Arnfjörð Bjarmason
We'll also redundantly trigger if you upgrade to a minor new perl version, but I think that's squarely in "who cares" territory.
...
But I think overall leaning on the side of busting the cache more often to avoid cryptic errors is the right choice, and we should use "perl -V".
I'd throw it into "better safe than sorry" category. I think we all like the approach this patch takes. Let's queue it and merge it down soonish.
Thanks.
Re: [PATCH v3] perl: regenerate perl.mak if perl -V changes
In reply to Ævar Arnfjörð BjarmasonQuoted 16 lines
Quoted 11 lines
Quoted 3 lines
Now the logic added in commit
ee9be06770("perl: detect new files in MakeMaker builds", 2012-07-27) is extended to regenerate perl/perl.mak if there's any change to "perl -V".Nice. This fix is way simpler than I feared.
Quoted 4 lines
This will in some cases redundantly trigger perl/perl.mak to be re-made, e.g. if @INC is modified in ways the build process doesn't care about through sitecustomize.pl, but the common case is that we just do the right thing and re-generate perl/perl.mak when needed.
Quoted 4 lines
I think that's fine. There's a related bug that the generation of perl/perl.mak via recursive-make is sometimes racy. So that _might_ trigger more often as a result of this, but I think the solution is to fix that race, not try to pretend it won't happen. :)
Quoted 5 lines
We'll also redundantly trigger if you upgrade to a minor new perl version, but I think that's squarely in "who cares" territory. This'll only impact people working on git, and *occasionally* they might get a 100 ms hit when running make, as opposed to a cryptic error where they'll likely stare at it for a bit before running "make clean".
+1, I don't mind extra config or build times as long as things "just work" for the common case.
I was trying to figure out the use case that I was seeing. I was envisioning someone with Perl 4 in /usr/local who complained it would break some one-off setup. In the common case, the guy running Perl 4 should do the extra work, not the majority of users operating under the common case.
Jeff