Commit f84871 breaks build on OS X

Previous thread: How to conver no branches/tags svn repo to git ? by Dongsheng Song on Thursday, December 7, 2006 - 9:31 am. (3 messages)

Next thread: cygwin, 44k files: how to commit only index? by Alex Riesen on Thursday, December 7, 2006 - 10:27 am. (13 messages)
To: <git@...>
Date: Thursday, December 7, 2006 - 9:54 am

When I pulled the most recent changes for git (de51faf), `make` began
failing with the following messages:

make -C perl PERL_PATH='/usr/bin/perl' prefix='/usr/local/stow/git' all
Makefile out-of-date with respect to Makefile.PL /System/Library/Perl/
5.8.6/darwin-thread-multi-2level/Config.pm /System/Library/Perl/5.8.6/
darwin-thread-multi-2level/CORE/config.h
Cleaning current config before rebuilding Makefile...
mv: rename perl.mak to perl.mak.old: No such file or directory
make[1]: *** [perl.mak] Error 1
make: *** [all] Error 2

My system is (OS 10.4.8):

$ uname -a
Darwin 127.0.0.1 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25
19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386
$ fink --version
Package manager version: 0.25.2
Distribution version: 0.8.1.rsync i386
$ cat config.mak
prefix=/usr/local/stow/git
COLLISION_CHECK=y
NO_DARWIN_PORTS=y

I started trying to use `git bisect` and after several attempts (I
eventually learned the correct pattern of `rm perl/Makefile` and `git
reset --hard`) I found out that the error began with

commit f848718a6980ebda0eb5afb2ca49c3bc1e7b2b1d
Author: Alex Riesen <raa.lkml@gmail.com>
Date: Mon Dec 4 10:50:04 2006 +0100

Make perl/ build procedure ActiveState friendly.

On Cygwin + ActivateState Perl, Makefile generated with
MakeMaker is not usable because of line-endings and
back-slashes.

This teaches perl/Makefile to write a handcrafted equivalent
perl.mak file with 'make NO_PERL_MAKEMAKER=NoThanks'.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

I'll admit that I'm not savvy enough with make and perl to figure out
how to correct it, although `git revert f84871` does fix it. Can
anyone help?

~~Brian Gernhardt
-

To: Brian Gernhardt <benji@...>
Cc: <git@...>
Date: Thursday, December 7, 2006 - 10:55 am

Hi,

I found the same, but could not reproduce it. But a "touch perl/perl.mak"
fixes at least compilation.

Ciao,
Dscho

-

To: <git@...>
Date: Thursday, December 7, 2006 - 11:29 am

My pull didn't fail, and your suggested list of commands tells me
"Already up-to-date." I've pulled, reset, and removed perl/Makefile
repeatedly when I was trying to use git-bisect. Primarily because of
merge conflicts in perl/Makefile that running make causes.

Indeed, the following sequence works:

git reset --hard
touch perl/perl.mak
make

But this one doesn't:

git reset --hard
make
touch perl/perl.mak
make

That one fails with "make[2]: *** No rule to make target
`instlibdir'. Stop."

And both of these sequences cause `git status` to report that "perl/
Makefile" has been changed, which doesn't seem ideal.

(I'm replying to multiple messages because the list archive I'm
browsing is getting the messages faster than I am, and I didn't feel
the need to wait.)

~~ Brian
-

To: Brian Gernhardt <benji@...>
Cc: <git@...>
Date: Thursday, December 7, 2006 - 11:42 am

Does the attached patch help? I highly suspect the perl.mak generated
by MakeMaker.

diff --git a/perl/Makefile b/perl/Makefile
index bd483b0..b936e0d 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -29,6 +29,8 @@ $(makfile): ../GIT-CFLAGS Makefile
echo ' echo $(instdir_SQ)' >> $@
else
$(makfile): Makefile.PL ../GIT-CFLAGS
+ $(RM) $(makfile)
+ $(RM) $(makfile).old
'$(PERL_PATH_SQ)' $< FIRST_MAKEFILE='$@' PREFIX='$(prefix_SQ)'
endif

To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: Brian Gernhardt <benji@...>, <git@...>
Date: Thursday, December 7, 2006 - 11:23 am

I had to do the same. Somewhere, there's a "mv" that tries to move
perl.mak out of the way and doesn't properly detect the fact that it
isn't there.

--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-

To: Brian Gernhardt <benji@...>
Cc: <git@...>
Date: Thursday, December 7, 2006 - 10:33 am

Strange. You seem to have the old, generated Makefile you perl/
directory. Haven't your pull failed? If so, I suspect that

rm perl/Makefile
git reset --hard
git pull git...

should fix it.
-

To: Alex Riesen <raa.lkml@...>
Cc: Brian Gernhardt <benji@...>, <git@...>
Date: Thursday, December 7, 2006 - 4:18 pm

>>>>> "Alex" == Alex Riesen <raa.lkml@gmail.com> writes:

Alex> Strange. You seem to have the old, generated Makefile you perl/
Alex> directory. Haven't your pull failed? If so, I suspect that

Alex> rm perl/Makefile
Alex> git reset --hard
Alex> git pull git...

I ended up having to do another reset afterward.

Definitely something went weird when Makefile was removed
from .gitignore.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
-

To: Randal L. Schwartz <merlyn@...>
Cc: Alex Riesen <raa.lkml@...>, <git@...>
Date: Thursday, December 7, 2006 - 6:36 pm

Yes, perl/Makefile is getting overwritten by what Makefile.PL
generates. I thought the point of Alex's patch was to have it
muck with perl.mak and leave the tracked Makefile alone?

-

To: Randal L. Schwartz <merlyn@...>
Cc: Alex Riesen <raa.lkml@...>, <git@...>
Date: Thursday, December 7, 2006 - 6:55 pm

Now, I am CLUELESS about what MakeMaker does, but would this
help?

---
diff --git a/perl/Makefile b/perl/Makefile
index bd483b0..099beda 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -29,7 +29,7 @@ $(makfile): ../GIT-CFLAGS Makefile
echo ' echo $(instdir_SQ)' >> $@
else
$(makfile): Makefile.PL ../GIT-CFLAGS
- '$(PERL_PATH_SQ)' $< FIRST_MAKEFILE='$@' PREFIX='$(prefix_SQ)'
+ '$(PERL_PATH_SQ)' $< PREFIX='$(prefix_SQ)'
endif

# this is just added comfort for calling make directly in perl dir
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
index de73235..4168775 100644
--- a/perl/Makefile.PL
+++ b/perl/Makefile.PL
@@ -24,5 +24,6 @@ WriteMakefile(
NAME => 'Git',
VERSION_FROM => 'Git.pm',
PM => \%pm,
+ MAKEFILE => 'perl.mak',
%extra
);

-

To: Junio C Hamano <junkio@...>
Cc: Johannes Schindelin <Johannes.Schindelin@...>, Andreas Ericsson <ae@...>, Pazu <pazu@...>, Brian Gernhardt <benji@...>, Randal L. Schwartz <merlyn@...>, <git@...>
Date: Friday, December 8, 2006 - 3:40 am

Much better.

I should have read the FS of that MakeMaker.pm,
instead of relying on perldoc...
-

To: Alex Riesen <raa.lkml@...>
Cc: <git@...>
Date: Friday, December 8, 2006 - 7:51 am

Perfect!

~~Brian
-

Previous thread: How to conver no branches/tags svn repo to git ? by Dongsheng Song on Thursday, December 7, 2006 - 9:31 am. (3 messages)

Next thread: cygwin, 44k files: how to commit only index? by Alex Riesen on Thursday, December 7, 2006 - 10:27 am. (13 messages)