{"thread":{"id":"5689","subject":"[PATCH] perl bindings fix compilation errors","startedAt":"2006-09-25T10:03:20Z","lastAt":"2006-09-27T09:42:04Z","messageCount":8,"participants":["Andy Whitcroft","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"27614","messageId":"20060925100319.GA1655@shadowen.org","threadId":"5689","inReplyTo":null,"subject":"[PATCH] perl bindings fix compilation errors","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2006-09-25T10:03:20Z","receivedAt":"2006-09-25T10:03:20Z","isPatch":true,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"perl bindings: fix compilation errors\n\nWith the introduction of Makefile.PL to the perl bindings we no\nlonger seem to pass in either the definition of SHA1_HEADER or\nGIT_VERSION.  It seems we no longer pass over the BASIC_FLAGS into\nthe compilation.\n\nSigned-off-by: Andy Whitcroft <apw@shadowen.org>\n---\ndiff --git a/Makefile b/Makefile\nindex d705e06..d32f4c4 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -603,7 +603,7 @@ all: $(ALL_PROGRAMS) $(BUILT_INS) git$X \n \tgit-merge-recur$X\n \n all: perl/Makefile\n-\t$(MAKE) -C perl\n+\t$(MAKE) -C perl GIT_VERSION='$(GIT_VERSION)' BASIC_CFLAGS=\"$(BASIC_CFLAGS)\"\n \t$(MAKE) -C templates\n \n strip: $(PROGRAMS) git$X\ndiff --git a/perl/Makefile.PL b/perl/Makefile.PL\nindex de73235..00fc779 100644\n--- a/perl/Makefile.PL\n+++ b/perl/Makefile.PL\n@@ -5,6 +5,8 @@ sub MY::postamble {\n instlibdir:\n \t@echo '$(INSTALLSITELIB)'\n \n+CCFLAGS += -DGIT_VERSION='\"$(GIT_VERSION)\"' $(BASIC_CFLAGS)\n+\n MAKE_FRAG\n }\n \n"},{"id":"27615","messageId":"Pine.LNX.4.63.0609251223590.25371@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5689","inReplyTo":"20060925100319.GA1655@shadowen.org","subject":"Re: [PATCH] perl bindings fix compilation errors","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-09-25T10:25:27Z","receivedAt":"2006-09-25T10:25:27Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 25 Sep 2006, Andy Whitcroft wrote:\n\n> With the introduction of Makefile.PL to the perl bindings we no\n> longer seem to pass in either the definition of SHA1_HEADER or\n> GIT_VERSION.  It seems we no longer pass over the BASIC_FLAGS into\n> the compilation.\n\nYou probably got bitten by the fact that earlier runs left Git.c in the \nperl/ directory. Go to perl/, \"make distclean\", and make git again.\n\nHth,\nDscho\n"},{"id":"27618","messageId":"4517BEBC.4000002@shadowen.org","threadId":"5689","inReplyTo":"Pine.LNX.4.63.0609251223590.25371@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] perl bindings fix compilation errors","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2006-09-25T11:34:20Z","receivedAt":"2006-09-25T11:34:20Z","isPatch":true,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Mon, 25 Sep 2006, Andy Whitcroft wrote:\n> \n>> With the introduction of Makefile.PL to the perl bindings we no\n>> longer seem to pass in either the definition of SHA1_HEADER or\n>> GIT_VERSION.  It seems we no longer pass over the BASIC_FLAGS into\n>> the compilation.\n> \n> You probably got bitten by the fact that earlier runs left Git.c in the \n> perl/ directory. Go to perl/, \"make distclean\", and make git again.\n\nHmmm that sucks.  Yes, I had to make distclean more than once, but it\nseems to fix things.\n\nI am somewhat unhappy that a make clean at the top level and remake was\nnot sufficient to get a working tree.\n\n-apw\n"},{"id":"27619","messageId":"Pine.LNX.4.63.0609251336380.25371@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5689","inReplyTo":"4517BEBC.4000002@shadowen.org","subject":"Re: [PATCH] perl bindings fix compilation errors","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-09-25T11:38:13Z","receivedAt":"2006-09-25T11:38:13Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 25 Sep 2006, Andy Whitcroft wrote:\n\n> Johannes Schindelin wrote:\n> > Hi,\n> > \n> > On Mon, 25 Sep 2006, Andy Whitcroft wrote:\n> > \n> >> With the introduction of Makefile.PL to the perl bindings we no\n> >> longer seem to pass in either the definition of SHA1_HEADER or\n> >> GIT_VERSION.  It seems we no longer pass over the BASIC_FLAGS into\n> >> the compilation.\n> > \n> > You probably got bitten by the fact that earlier runs left Git.c in the \n> > perl/ directory. Go to perl/, \"make distclean\", and make git again.\n> \n> Hmmm that sucks.  Yes, I had to make distclean more than once, but it\n> seems to fix things.\n> \n> I am somewhat unhappy that a make clean at the top level and remake was\n> not sufficient to get a working tree.\n\nYes. I almost submitted a patch which checks for perl/Git.c, and makes \ndistclean in perl/ if exists.\n\nCiao,\nDscho\n"},{"id":"27655","messageId":"7vfyeftehf.fsf@assigned-by-dhcp.cox.net","threadId":"5689","inReplyTo":"4517BEBC.4000002@shadowen.org","subject":"Re: [PATCH] perl bindings fix compilation errors","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-26T04:54:04Z","receivedAt":"2006-09-26T04:54:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Whitcroft <apw@shadowen.org> writes:\n\n> I am somewhat unhappy that a make clean at the top level and remake was\n> not sufficient to get a working tree.\n\nSympathetic I am (since I was bitten by it too), but I am not\nsure what the right thing to do.\n\nIt is certainly incorrect to say that it is a driver error to\ngit-pull (or git-checkout to switch branches) without running\n\"make clean\" first to get rid of perl/Git.c while your Makefile\nstill knows it is a generated file.  Our Makefile should be more\nhelpful.\n\nBut the question is Makefile in which branch?\n\nIdeally, if Makefile of each and every branch head currently\nalive knew that perl/Git.c is problematic and removed it, then\nwe would not suffer from this problem.  But it's obviously not\npractical.\n"},{"id":"27669","messageId":"Pine.LNX.4.63.0609261031430.25371@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5689","inReplyTo":"7vfyeftehf.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] perl bindings fix compilation errors","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-09-26T08:34:19Z","receivedAt":"2006-09-26T08:34:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 25 Sep 2006, Junio C Hamano wrote:\n\n> It is certainly incorrect to say that it is a driver error to\n> git-pull (or git-checkout to switch branches) without running\n> \"make clean\" first to get rid of perl/Git.c while your Makefile\n> still knows it is a generated file.  Our Makefile should be more\n> helpful.\n\nHow about this:\n\ndiff --git a/Makefile b/Makefile\nindex d3310ae..a722c5a 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -612,7 +612,14 @@ ### Build rules\n all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi \\\n \tgit-merge-recur$X\n \n-all: perl/Makefile\n+# work around for left-over files\n+.PHONY: perl/check-left-over\n+\n+perl/check-left-over:\n+\t(test -f perl/Git.c && test ! -f perl/Git.xs \\\n+\t && rm perl/{Git.c,Git.bs,Makefile}) || true\n+\n+all: perl/check-left-over perl/Makefile\n \t$(MAKE) -C perl\n \t$(MAKE) -C templates\n \n"},{"id":"27737","messageId":"7vwt7qjal5.fsf@assigned-by-dhcp.cox.net","threadId":"5689","inReplyTo":"Pine.LNX.4.63.0609261031430.25371@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] perl bindings fix compilation errors","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-27T02:40:38Z","receivedAt":"2006-09-27T02:40:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Mon, 25 Sep 2006, Junio C Hamano wrote:\n>\n>> It is certainly incorrect to say that it is a driver error to\n>> git-pull (or git-checkout to switch branches) without running\n>> \"make clean\" first to get rid of perl/Git.c while your Makefile\n>> still knows it is a generated file.  Our Makefile should be more\n>> helpful.\n>\n> How about this:\n\nThe problem is on which branch we would apply this and how long\nwe will carry it.  I suspect you would have to have it forever\nand everywhere.  After all your bisect can hit a version with\nGit.xs and then next build suggested by bisect may be a version\nwithout it.  And the user is doing that bisect long after we\nrelease version 47.\n\nThe worst part is that the version bisect suggests that does not\nhave Git.xs may be a version in the past -- which we obviously\ncannot apply your patch to.\n"},{"id":"27778","messageId":"Pine.LNX.4.63.0609271141210.14200@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5689","inReplyTo":"7vwt7qjal5.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] perl bindings fix compilation errors","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-09-27T09:42:04Z","receivedAt":"2006-09-27T09:42:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 26 Sep 2006, Junio C Hamano wrote:\n\n> The worst part is that the version bisect suggests that does not\n> have Git.xs may be a version in the past -- which we obviously\n> cannot apply your patch to.\n\nOkay, just forget about my patch.\n\nCiao,\nDscho\n"}]}