# Re: Commit f84871 breaks build on OS X

12 messages from 2006-12-07 to 2006-12-08. Participants: Alex Riesen, Brian Gernhardt, Johannes Schindelin, Pazu, Randal L. Schwartz, Andreas Ericsson, Junio C Hamano.
Thread: https://gitlist.dev/t/43323

## Brian Gernhardt, 2006-12-07 13:54

Subject: Commit f84871 breaks build on OS X
Message-ID: <2D096A57-D7B3-49C7-81E4-EB47A0D933B2@silverinsanity.com>
URL: https://gitlist.dev/e/2D096A57-D7B3-49C7-81E4-EB47A0D933B2%40silverinsanity.com

```
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?


```

## Alex Riesen, 2006-12-07 14:33

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <81b0412b0612070633i7aec43dse7a8beda64437103@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0612070633i7aec43dse7a8beda64437103%40mail.gmail.com
In-Reply-To: <2D096A57-D7B3-49C7-81E4-EB47A0D933B2@silverinsanity.com>

```
On 12/7/06, Brian Gernhardt <benji@silverinsanity.com> wrote:
> 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

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...


```

## Johannes Schindelin, 2006-12-07 14:55

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <Pine.LNX.4.63.0612071554180.28348@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0612071554180.28348%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <2D096A57-D7B3-49C7-81E4-EB47A0D933B2@silverinsanity.com>

```
Hi,

On Thu, 7 Dec 2006, Brian Gernhardt wrote:

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

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

Ciao,
Dscho

```

## Pazu, 2006-12-07 15:20

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <loom.20061207T161845-377@post.gmane.org>
URL: https://gitlist.dev/e/loom.20061207T161845-377%40post.gmane.org
In-Reply-To: <81b0412b0612070633i7aec43dse7a8beda64437103@mail.gmail.com>

```
Alex Riesen <raa.lkml <at> gmail.com> writes:

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

I've found the same problem as the OP. First my pull failed like you said, but
then I completely wiped my working copy and tried checkout again -- this time it
worked fine. However, the build still fails with the error mentioned by the OP.

-- Pazu

```

## Andreas Ericsson, 2006-12-07 15:23

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <457831F0.3090305@op5.se>
URL: https://gitlist.dev/e/457831F0.3090305%40op5.se
In-Reply-To: <Pine.LNX.4.63.0612071554180.28348@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin wrote:
> Hi,
> 
> On Thu, 7 Dec 2006, Brian Gernhardt wrote:
> 
>> When I pulled the most recent changes for git (de51faf), `make` began 
>> failing with the following messages: [...]
> 
> I found the same, but could not reproduce it. But a "touch perl/perl.mak" 
> fixes at least compilation.
> 

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

```

## Brian Gernhardt, 2006-12-07 15:29

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <E8038C15-B359-4DE9-B3E0-45B065AEDBFA@silverinsanity.com>
URL: https://gitlist.dev/e/E8038C15-B359-4DE9-B3E0-45B065AEDBFA%40silverinsanity.com
In-Reply-To: <Pine.LNX.4.63.0612071554180.28348@wbgn013.biozentrum.uni-wuerzburg.de>

```
Alex Riesen wrote:
> Strange. You seem to have the old, generated Makefile you perl/
> directory. Haven't your pull failed?

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.

Johannes Schindeli wrote:
>> When I pulled the most recent changes for git (de51faf), `make` began
>> failing with the following messages: [...]
>
> I found the same, but could not reproduce it. But a "touch perl/ 
> perl.mak"
> fixes at least compilation.

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.)


```

## Alex Riesen, 2006-12-07 15:42

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <81b0412b0612070742x51af6011ua96962c53158cea0@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0612070742x51af6011ua96962c53158cea0%40mail.gmail.com
In-Reply-To: <E8038C15-B359-4DE9-B3E0-45B065AEDBFA@silverinsanity.com>

```
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


From 5e00f865fa13a425d4395a70aaca798dfaf093dc Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Thu, 7 Dec 2006 16:40:06 +0100
Subject: [PATCH] workaround for MakeMaker-generated Makefiles

It seems to try to mv perl.mak into perl.mak.old file without checking if
.old exists first.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>

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
 

```

## Randal L. Schwartz, 2006-12-07 20:18

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <86ejrbihnr.fsf@blue.stonehenge.com>
URL: https://gitlist.dev/e/86ejrbihnr.fsf%40blue.stonehenge.com
In-Reply-To: <81b0412b0612070633i7aec43dse7a8beda64437103@mail.gmail.com>

```
>>>>> "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.

```

## Junio C Hamano, 2006-12-07 22:36

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <7vmz5zqqo7.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vmz5zqqo7.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <86ejrbihnr.fsf@blue.stonehenge.com>

```
merlyn@stonehenge.com (Randal L. Schwartz) writes:

>>>>>> "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.

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?


```

## Junio C Hamano, 2006-12-07 22:55

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <7virgnqpt5.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7virgnqpt5.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <7vmz5zqqo7.fsf@assigned-by-dhcp.cox.net>

```
Junio C Hamano <junkio@cox.net> writes:

> merlyn@stonehenge.com (Randal L. Schwartz) writes:
>
>>>>>>> "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.
>
> 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?

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
 );


```

## Alex Riesen, 2006-12-08 07:40

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <81b0412b0612072340w6af9df37y25a1d15773a3f8d8@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0612072340w6af9df37y25a1d15773a3f8d8%40mail.gmail.com
In-Reply-To: <7virgnqpt5.fsf@assigned-by-dhcp.cox.net>

```
On 12/7/06, Junio C Hamano <junkio@cox.net> wrote:
> >> Definitely something went weird when Makefile was removed
> >> from .gitignore.
> >
> > 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?
>
> Now, I am CLUELESS about what MakeMaker does, but would this
> help?
>

Much better.
Works here. Others?

> 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
>  );

I should have read the FS of that MakeMaker.pm,

```

## Brian Gernhardt, 2006-12-08 11:51

Subject: Re: Commit f84871 breaks build on OS X
Message-ID: <2EB26FE2-C6AC-4C2E-9586-AD43B1E05175@silverinsanity.com>
URL: https://gitlist.dev/e/2EB26FE2-C6AC-4C2E-9586-AD43B1E05175%40silverinsanity.com
In-Reply-To: <81b0412b0612072340w6af9df37y25a1d15773a3f8d8@mail.gmail.com>

```
On Dec 8, 2006, at 2:40 AM, Alex Riesen wrote:
>> Now, I am CLUELESS about what MakeMaker does, but would this
>> help?
>
> Much better.
> Works here. Others?

Perfect!


```
