threads / discuss / 43323

Re: Commit f84871 breaks build on OS X

Subject: Re: Commit f84871 breaks build on OS X

## tl;dr

12 messages between Dec 7, 2006 and Dec 8, 2006.

replies: 11people: 7as markdown or json

Brian Gernhardt· Dec 7, 2006, 13:54 UTC · lore

Commit f84871 breaks build on OS X

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· Dec 7, 2006, 14:33 UTC · re: Brian Gernhardt · lore
On 12/7/06, Brian Gernhardt <benji@silverinsanity.com> wrote:
Show 7 quoted lines
> 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...
Pazu· Dec 7, 2006, 15:20 UTC · re: Alex Riesen · lore
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
Randal L. Schwartz· Dec 7, 2006, 20:18 UTC · re: Alex Riesen · lore
>>>>> "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· Dec 7, 2006, 22:36 UTC · re: Randal L. Schwartz · lore
merlyn@stonehenge.com (Randal L. Schwartz) writes:
Show 13 quoted lines
>>>>>> "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· Dec 7, 2006, 22:55 UTC · re: Junio C Hamano · lore
Junio C Hamano <junkio@cox.net> writes:
Show 19 quoted lines
> 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· Dec 8, 2006, 07:40 UTC · re: Junio C Hamano · lore
On 12/7/06, Junio C Hamano <junkio@cox.net> wrote:
Show 10 quoted lines
> >> 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?

Show 11 quoted lines
> 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,
Johannes Schindelin· Dec 7, 2006, 14:55 UTC · re: Brian Gernhardt · lore
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

Andreas Ericsson· Dec 7, 2006, 15:23 UTC · re: Johannes Schindelin · lore
Johannes Schindelin wrote:
Show 10 quoted lines
> 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· Dec 7, 2006, 15:29 UTC · re: Johannes Schindelin · lore
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:
Show 6 quoted lines
>> 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· Dec 7, 2006, 15:42 UTC · re: Brian Gernhardt · lore

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
 

← back to recent threads