{"thread":{"id":"12252","subject":"msgmft segfaulting on tiger","startedAt":"2008-02-21T23:53:54Z","lastAt":"2008-03-14T13:07:27Z","messageCount":21,"participants":["Martin Langhoff","Shawn O. Pearce","Gabriel Saldaña","Johannes Schindelin","Junio C Hamano","Charles Bailey","Paul Mackerras","Andreas Ericsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"69539","messageId":"46a038f90802211553g735215c6q260ddc49ac149bb5@mail.gmail.com","threadId":"12252","inReplyTo":null,"subject":"msgmft segfaulting on tiger","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2008-02-21T23:53:54Z","receivedAt":"2008-02-21T23:53:54Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"Today I've debugged a compile of git 1.5.4.2 failing on OSX Tiger (on\nBasilio's machine). The problem is during the git-gui build, in the PO\nfile handling. Apparently fmtmsg (from fink) segfaults on de.po so the\nfix is to say\n\n   make NO_MSGFMT=NoneThere\n\nI don't think we can do much about it -- my guess is that fink has\nbeen built and tested in a different OSX release, and happens to go\nbellyup on Tiger. Here's a transcript in case it helps anyone.\n\nHere's the tail of the build message, with make called with -d:\n\nGITGUI_VERSION = 0.9.2\n     * new locations or Tcl/Tk interpreter\n     GEN git-gui\n     INDEX lib/\n     MSGFMT    po/de.msg make[1]: *** [po/de.msg] Error 1\n make: *** [all] Error 2\n\nVarious versions of things involved:\n $ dpkg -S /sw/bin/msgfmt\n gettext-tools: /sw/bin/msgfmt\n $ dpkg -l gettext-tools\n(...)\n ii  gettext-tools                     0.10.40-19\n $ uname -a\n Darwin developer 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10\n 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386\n $ msgfmt -V\n msgfmt (GNU gettext) 0.10.40\n Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.\n This is free software; see the source for copying conditions.  There is NO\n warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n Written by Ulrich Drepper.\n\nHas anyone got any ideas on how to debug this further? I couldn't find\nany core files.\n\ncheers,\n\n\n\nmartin\n"},{"id":"69540","messageId":"46a038f90802211559w457c5460k7447ba8b38352713@mail.gmail.com","threadId":"12252","inReplyTo":"46a038f90802211553g735215c6q260ddc49ac149bb5@mail.gmail.com","subject":"Re: msgmft segfaulting on tiger","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2008-02-21T23:59:38Z","receivedAt":"2008-02-21T23:59:38Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Fri, Feb 22, 2008 at 12:53 PM, Martin Langhoff\n<martin.langhoff@gmail.com> wrote:\n> Today I've debugged a compile of git 1.5.4.2 failing on OSX Tiger (on\n>  Basilio's machine). The problem is during the git-gui build, in the PO\n>  file handling. Apparently fmtmsg (from fink) segfaults on de.po so the\n>  fix is to say\n\nGrumble. It seems like msgfmt that fink provides actually does not\nsupport the --tcl flag. So perhaps the right thing is to always say\nNO_MSGFMT on OSX?\n\ncheers,\n\n\nm\n"},{"id":"69553","messageId":"20080222065836.GE8410@spearce.org","threadId":"12252","inReplyTo":"46a038f90802211559w457c5460k7447ba8b38352713@mail.gmail.com","subject":"Re: msgmft segfaulting on tiger","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-02-22T06:58:36Z","receivedAt":"2008-02-22T06:58:36Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Martin Langhoff <martin.langhoff@gmail.com> wrote:\n> On Fri, Feb 22, 2008 at 12:53 PM, Martin Langhoff\n> <martin.langhoff@gmail.com> wrote:\n> > Today I've debugged a compile of git 1.5.4.2 failing on OSX Tiger (on\n> >  Basilio's machine). The problem is during the git-gui build, in the PO\n> >  file handling. Apparently fmtmsg (from fink) segfaults on de.po so the\n> >  fix is to say\n> \n> Grumble. It seems like msgfmt that fink provides actually does not\n> support the --tcl flag. So perhaps the right thing is to always say\n> NO_MSGFMT on OSX?\n\nI'd hate to do this.  GNU msgfmt does better checking on the\nmessages then po2msg.sh does, and its a tiny bit faster.  So\nI'd rather stick to the standard tool that is widely used.\n\nCurrently we are looking to see if msgfmt generates an exit status\nof 127, and if so we fallback to po2msg.sh.  Apparently however\nthat test is passing and thus you are using the fink msgfmt.\n\nDid you try building with `make V=1` to look at the full output and\nnot the prettied up simplified output the Makefile uses by default?\nIt won't fix your issue but it may be interesting to see if msgfmt\nis failing with a particular message or not.\n\n-- \nShawn.\n"},{"id":"69600","messageId":"46a038f90802220957y7db67d8nb6b7ad784124546a@mail.gmail.com","threadId":"12252","inReplyTo":"20080222065836.GE8410@spearce.org","subject":"Re: msgmft segfaulting on tiger","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2008-02-22T17:57:49Z","receivedAt":"2008-02-22T17:57:49Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Fri, Feb 22, 2008 at 7:58 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n>  Did you try building with `make V=1` to look at the full output and\n>  not the prettied up simplified output the Makefile uses by default?\n>  It won't fix your issue but it may be interesting to see if msgfmt\n>  is failing with a particular message or not.\n\nI'll track down Basilio (it's his laptop) today and try, I think he's\nstill at the conference. I also suspect that OSX's own build tools may\ninclude a different msgfmt, but the fink one is earlier in the path.\n\ncheers,\n\n\n\nm\n"},{"id":"70098","messageId":"47C5A974.7080207@gmail.com","threadId":"12252","inReplyTo":"46a038f90802220957y7db67d8nb6b7ad784124546a@mail.gmail.com","subject":"Re: msgmft segfaulting on tiger","fromName":"Gabriel Saldaña","fromEmail":"gsaldana@gmail.com","sentAt":"2008-02-27T18:18:28Z","receivedAt":"2008-02-27T18:18:28Z","isPatch":false,"sender":{"key":"gsaldana@gmail.com","avatar":"https://gravatar.com/avatar/ebcc06825afa22ddfc5c90e535690d2bebfb481f173ca612e7d86103c351f20e?d=mp&s=160"},"body":"We tried to build with make V=1 and this was the output:\n\nmsgfmt --statistics --tcl -l de -d po/ po/de.po \nmsgfmt: unrecognized option `--tcl'\nTry `msgfmt --help' for more information.\nmake[1]: *** [po/de.msg] Error 1\nmake: *** [all] Error 2\n\nStill the error is in the po/de.po file\n\nHope this info helps\n\nGabriel Saldana\n\nMartin Langhoff wrote:\n> On Fri, Feb 22, 2008 at 7:58 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n>>  Did you try building with `make V=1` to look at the full output and\n>>  not the prettied up simplified output the Makefile uses by default?\n>>  It won't fix your issue but it may be interesting to see if msgfmt\n>>  is failing with a particular message or not.\n> \n> I'll track down Basilio (it's his laptop) today and try, I think he's\n> still at the conference. I also suspect that OSX's own build tools may\n> include a different msgfmt, but the fink one is earlier in the path.\n> \n> cheers,\n> \n> \n> \n> m\n> \n"},{"id":"70099","messageId":"alpine.LSU.1.00.0802271825330.22527@racer.site","threadId":"12252","inReplyTo":"47C5A974.7080207@gmail.com","subject":"Re: msgmft segfaulting on tiger","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-27T18:26:24Z","receivedAt":"2008-02-27T18:26:24Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 27 Feb 2008, Gabriel Saldaña wrote:\n\n> msgfmt --statistics --tcl -l de -d po/ po/de.po msgfmt: unrecognized option\n> `--tcl'\n\nCould you try this, please:\n\n$ msgfmt --tcl; echo $?\n\nMaybe we can have a clever autodetection of msgfmt which does not \nunderstand --tcl?\n\nCiao,\nDscho\n"},{"id":"70100","messageId":"47C5AEFA.5020004@gmail.com","threadId":"12252","inReplyTo":"alpine.LSU.1.00.0802271825330.22527@racer.site","subject":"Re: msgmft segfaulting on tiger","fromName":"Gabriel Saldaña","fromEmail":"gsaldana@gmail.com","sentAt":"2008-02-27T18:42:02Z","receivedAt":"2008-02-27T18:42:02Z","isPatch":false,"sender":{"key":"gsaldana@gmail.com","avatar":"https://gravatar.com/avatar/ebcc06825afa22ddfc5c90e535690d2bebfb481f173ca612e7d86103c351f20e?d=mp&s=160"},"body":"Here it is:\n\n$ msgfmt --tcl; echo $?\nmsgfmt: unrecognized option `--tcl'\nTry `msgfmt --help' for more information.\n1\n\nGabriel\n\nJohannes Schindelin wrote:\n> Hi,\n> \n> On Wed, 27 Feb 2008, Gabriel Saldaña wrote:\n> \n>> msgfmt --statistics --tcl -l de -d po/ po/de.po msgfmt: unrecognized option\n>> `--tcl'\n> \n> Could you try this, please:\n> \n> $ msgfmt --tcl; echo $?\n> \n> Maybe we can have a clever autodetection of msgfmt which does not \n> understand --tcl?\n> \n> Ciao,\n> Dscho\n"},{"id":"70162","messageId":"alpine.LSU.1.00.0802272203270.22527@racer.site","threadId":"12252","inReplyTo":"47C5AEFA.5020004@gmail.com","subject":"Re: msgmft segfaulting on tiger","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-27T22:04:34Z","receivedAt":"2008-02-27T22:04:34Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 27 Feb 2008, Gabriel Saldaña wrote:\n\n> Here it is:\n> \n> $ msgfmt --tcl; echo $?\n> msgfmt: unrecognized option `--tcl'\n> Try `msgfmt --help' for more information.\n> 1\n\nDarn.  I think that's the same exit code as for any other invocation \nwithout filename.\n\nSo it seems that there is no easy way to tell a --tcl aware msgfmt from \nthe other.\n\nCiao,\nDscho"},{"id":"70165","messageId":"7vablmqc7q.fsf@gitster.siamese.dyndns.org","threadId":"12252","inReplyTo":"alpine.LSU.1.00.0802272203270.22527@racer.site","subject":"Re: msgmft segfaulting on tiger","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-27T22:14:01Z","receivedAt":"2008-02-27T22:14:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> $ msgfmt --tcl; echo $?\n>> msgfmt: unrecognized option `--tcl'\n>> Try `msgfmt --help' for more information.\n>> 1\n>\n> Darn.  I think that's the same exit code as for any other invocation \n> without filename.\n>\n> So it seems that there is no easy way to tell a --tcl aware msgfmt from \n> the other.\n\nHow about...\n\n    $ msgfmt --tcl -l C -d . /dev/null; echo $?\n"},{"id":"70187","messageId":"20080228003212.GP8410@spearce.org","threadId":"12252","inReplyTo":"7vablmqc7q.fsf@gitster.siamese.dyndns.org","subject":"Re: msgmft segfaulting on tiger","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-02-28T00:32:12Z","receivedAt":"2008-02-28T00:32:12Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> >> $ msgfmt --tcl; echo $?\n> >> msgfmt: unrecognized option `--tcl'\n> >> Try `msgfmt --help' for more information.\n> >> 1\n> >\n> > Darn.  I think that's the same exit code as for any other invocation \n> > without filename.\n> \n> How about...\n> \n>     $ msgfmt --tcl -l C -d . /dev/null; echo $?\n\n\nI can't test this, my msgfmt --tcl works properly.  Can someone\nwho has a msgfmt lacking tcl support confirm this will work?\n\n--8<--\n[PATCH] git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails\n\nMac OS X Tiger may have a msgfmt available but it doesn't understand\nhow to implement --tcl.  Falling back to po2msg.sh on such systems\nis a reasonable behavior.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n Makefile |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 01e0a46..1bd11eb 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -224,6 +224,11 @@ else\n \tifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)\n \t\tMSGFMT := $(TCL_PATH) po/po2msg.sh\n \tendif\n+\tifeq (msgfmt,$(MSGFMT))\n+\tifeq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null || echo $?),1)\n+\t\tMSGFMT := $(TCL_PATH) po/po2msg.sh\n+\tendif\n+\tendif\n endif\n \n msgsdir     = $(gg_libdir)/msgs\n-- \n1.5.4.3.295.g6b554\n\n\n-- \nShawn.\n"},{"id":"70289","messageId":"47C7000C.1000809@gmail.com","threadId":"12252","inReplyTo":"7vablmqc7q.fsf@gitster.siamese.dyndns.org","subject":"Re: msgmft segfaulting on tiger","fromName":"Gabriel Saldaña","fromEmail":"gsaldana@gmail.com","sentAt":"2008-02-28T18:40:12Z","receivedAt":"2008-02-28T18:40:12Z","isPatch":false,"sender":{"key":"gsaldana@gmail.com","avatar":"https://gravatar.com/avatar/ebcc06825afa22ddfc5c90e535690d2bebfb481f173ca612e7d86103c351f20e?d=mp&s=160"},"body":"Here's the output, hope it helps:\n\n$ msgfmt --tcl -l C -d . /dev/null; echo $?\nmsgfmt: unrecognized option `--tcl'\nTry `msgfmt --help' for more information.\n1\n\nsomehow msgfmt doesn't recognize the --tcl flag.\n\nGabriel Saldana\n\nJunio C Hamano wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n>>> $ msgfmt --tcl; echo $?\n>>> msgfmt: unrecognized option `--tcl'\n>>> Try `msgfmt --help' for more information.\n>>> 1\n>> Darn.  I think that's the same exit code as for any other invocation \n>> without filename.\n>>\n>> So it seems that there is no easy way to tell a --tcl aware msgfmt from \n>> the other.\n> \n> How about...\n> \n>     $ msgfmt --tcl -l C -d . /dev/null; echo $?\n> \n"},{"id":"70893","messageId":"47CCF40C.2070203@gmail.com","threadId":"12252","inReplyTo":"20080228003212.GP8410@spearce.org","subject":"msgmft segfaulting on ubuntu gutsy (clean)","fromName":"Gabriel Saldaña","fromEmail":"gsaldana@gmail.com","sentAt":"2008-03-04T07:02:36Z","receivedAt":"2008-03-04T07:02:36Z","isPatch":false,"sender":{"key":"gsaldana@gmail.com","avatar":"https://gravatar.com/avatar/ebcc06825afa22ddfc5c90e535690d2bebfb481f173ca612e7d86103c351f20e?d=mp&s=160"},"body":"I'm getting the msgmft error message when compiling git 1.5.4.3 on a \nclean install of Ubuntu Gutsy. Installed dependencies using \"apt-get \nbuild-dep git-core\".\n\nHere's make output:\n\nGITGUI_VERSION = 0.9.2.7.g3bae\n     * new locations or Tcl/Tk interpreter\n     GEN git-gui\n     INDEX lib/\n     MSGFMT    po/de.msg 371 translated.\n     MSGFMT    po/fr.msg 371 translated.\n     MSGFMT    po/hu.msg 371 translated.\n     MSGFMT    po/it.msg 370 translated, 1 untranslated.\n     MSGFMT    po/ja.msg 371 translated.\n     MSGFMT    po/ru.msg 367 translated, 4 untranslated.\n     MSGFMT    po/sv.msg 371 translated.\n     MSGFMT po/zh_cn.msg 53 translated, 57 fuzzy, 253 untranslated.\n     SUBDIR gitk-git\n     GEN gitk-wish\nGenerating catalog po/de.msg\nmsgfmt --statistics --tcl po/de.po -l de -d po/\nmake[1]: msgfmt: Command not found\nmake[1]: *** [po/de.msg] Error 127\nmake: *** [all] Error 2\n\nIt is very similar to Tiger's error message.\n\nGabriel Saldana\n"},{"id":"70894","messageId":"20080304070735.GU8410@spearce.org","threadId":"12252","inReplyTo":"47CCF40C.2070203@gmail.com","subject":"Re: msgmft segfaulting on ubuntu gutsy (clean)","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-03-04T07:07:35Z","receivedAt":"2008-03-04T07:07:35Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Gabriel Saldaa <gsaldana@gmail.com> wrote:\n> I'm getting the msgmft error message when compiling git 1.5.4.3 on a \n> clean install of Ubuntu Gutsy. Installed dependencies using \"apt-get \n> build-dep git-core\".\n> \n> Here's make output:\n> \n> GITGUI_VERSION = 0.9.2.7.g3bae\n>     * new locations or Tcl/Tk interpreter\n>     GEN git-gui\n>     INDEX lib/\n>     MSGFMT    po/de.msg 371 translated.\n>     MSGFMT    po/fr.msg 371 translated.\n>     MSGFMT    po/hu.msg 371 translated.\n>     MSGFMT    po/it.msg 370 translated, 1 untranslated.\n>     MSGFMT    po/ja.msg 371 translated.\n>     MSGFMT    po/ru.msg 367 translated, 4 untranslated.\n>     MSGFMT    po/sv.msg 371 translated.\n>     MSGFMT po/zh_cn.msg 53 translated, 57 fuzzy, 253 untranslated.\n>     SUBDIR gitk-git\n>     GEN gitk-wish\n> Generating catalog po/de.msg\n> msgfmt --statistics --tcl po/de.po -l de -d po/\n> make[1]: msgfmt: Command not found\n> make[1]: *** [po/de.msg] Error 127\n> make: *** [all] Error 2\n> \n> It is very similar to Tiger's error message.\n\nRebuild with \"NO_MSGFMT=1\", or install GNU msgfmt first.\n\nThe issue is gitk's Makefile is missing the fallback rule that\ngit-gui has, which is use our Tcl based msgfmt work-a-like if msgfmt\nis not found.  That's exactly what you see above; git-gui fell back\nautomatically to its work-a-like but gitk did not.\n\n-- \nShawn.\n"},{"id":"71038","messageId":"20080305071915.GI8410@spearce.org","threadId":"12252","inReplyTo":"47C7000C.1000809@gmail.com","subject":"Re: msgmft segfaulting on tiger","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-03-05T07:19:15Z","receivedAt":"2008-03-05T07:19:15Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Gabriel Saldaa <gsaldana@gmail.com> wrote:\n> Here's the output, hope it helps:\n> \n> $ msgfmt --tcl -l C -d . /dev/null; echo $?\n> msgfmt: unrecognized option `--tcl'\n> Try `msgfmt --help' for more information.\n> 1\n> \n> somehow msgfmt doesn't recognize the --tcl flag.\n\nJust to revive a nearly dead thead...  I have a workaround now in\ngit-gui maint that looks for this case and falls into our po2msg\nscript when msgfmt doesn't see --tcl.\n\nI also set Paul Mackerras a patch for gitk, so it can do the\nsame thing.  Maybe Git 1.5.4.4 will include both patches.\n \n> Junio C Hamano wrote:\n> >Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> >\n> >>>$ msgfmt --tcl; echo $?\n> >>>msgfmt: unrecognized option `--tcl'\n> >>>Try `msgfmt --help' for more information.\n> >>>1\n> >>Darn.  I think that's the same exit code as for any other invocation \n> >>without filename.\n> >>\n> >>So it seems that there is no easy way to tell a --tcl aware msgfmt from \n> >>the other.\n> >\n> >How about...\n> >\n> >    $ msgfmt --tcl -l C -d . /dev/null; echo $?\n\n-- \nShawn.\n"},{"id":"71211","messageId":"7v63w0gs87.fsf@gitster.siamese.dyndns.org","threadId":"12252","inReplyTo":"20080305071915.GI8410@spearce.org","subject":"Re: msgmft segfaulting on tiger","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-06T08:40:56Z","receivedAt":"2008-03-06T08:40:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> Just to revive a nearly dead thead...  I have a workaround now in\n> git-gui maint that looks for this case and falls into our po2msg\n> script when msgfmt doesn't see --tcl.\n>\n> I also set Paul Mackerras a patch for gitk, so it can do the\n> same thing.  Maybe Git 1.5.4.4 will include both patches.\n\nI looked at what you have in your Makefile.  \n\nIt makes me wonder, however, if it makes more sense to squash the two\ninvocations of msgfmt you make into one, like the attached patch.\n\nThe point is that msgfmt you guys want to use _must_ understand --tcl,\nand a msgfmt new enough to be usable would exit with 0 on the above\ncommand line.\n\n-- >8 --\ngitk i18n: Fall back to po2msg.sh if msgfmt --tcl fails\n\nSome platforms may have a msgfmt that doesn't understand --tcl.  Mac OS X\nTiger is an example.\n\nFalling back to po2msg.sh on such systems is a reasonable behavior.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Makefile |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex ae2b80b..c72e7f7 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -22,6 +22,9 @@ ifdef NO_MSGFMT\n \tMSGFMT ?= $(TCL_PATH) po/po2msg.sh\n else\n \tMSGFMT ?= msgfmt\n+\tifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $?),0)\n+\t\tMSGFMT = $(TCL_PATH) po/po2msg.sh \n+\tendif\n endif\n \n PO_TEMPLATE = po/gitk.pot\n\n"},{"id":"71781","messageId":"7vr6eg7bn3.fsf_-_@gitster.siamese.dyndns.org","threadId":"12252","inReplyTo":"7v63w0gs87.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] Simplify MSGFMT setting in Makefile","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-12T05:29:52Z","receivedAt":"2008-03-12T05:29:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"To prepare msg files for Tcl scripts, the command that is set to MSGFMT\nmake variable needs to be able to grok \"--tcl -l <lang> -d <here>\" options\ncorrectly.  This patch simplifies the tests done in git-gui's Makefile to\ndirectly test this condition.  If the test run does not exit properly with\nzero status (either because you do not have \"msgfmt\" itself, or your\n\"msgfmt\" is too old to grok --tcl option --- the reason does not matter),\nhave it fall back to po/po2msg.sh\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * I am planning to close 'master' for -rc1 by the end of this week, so\n   please plan to tell me to pull if you have accumulated changes,\n   thanks.\n\n Makefile |    7 +------\n 1 files changed, 1 insertions(+), 6 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 4e32174..95e99f2 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -221,14 +221,9 @@ ifdef NO_MSGFMT\n \tMSGFMT ?= $(TCL_PATH) po/po2msg.sh\n else\n \tMSGFMT ?= msgfmt\n-\tifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)\n+\tifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $?),0)\n \t\tMSGFMT := $(TCL_PATH) po/po2msg.sh\n \tendif\n-\tifeq (msgfmt,$(MSGFMT))\n-\tifeq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null || echo $?),1)\n-\t\tMSGFMT := $(TCL_PATH) po/po2msg.sh\n-\tendif\n-\tendif\n endif\n \n msgsdir     = $(gg_libdir)/msgs\n"},{"id":"71784","messageId":"20080312055153.GS8410@spearce.org","threadId":"12252","inReplyTo":"7vr6eg7bn3.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Simplify MSGFMT setting in Makefile","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-03-12T05:51:53Z","receivedAt":"2008-03-12T05:51:53Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> To prepare msg files for Tcl scripts, the command that is set to MSGFMT\n...\n\nThanks.\n\n>  * I am planning to close 'master' for -rc1 by the end of this week, so\n>    please plan to tell me to pull if you have accumulated changes,\n>    thanks.\n\nPlease pull.  What is in my master right now (7276607 which is\nthis patch) will likely be gitgui-0.10.0.  I'm unlikely to have\nany further changes (beyond perhaps updated po files) between now\nand 1.5.5 final.\n\n>  Makefile |    7 +------\n>  1 files changed, 1 insertions(+), 6 deletions(-)\n> \n> diff --git a/Makefile b/Makefile\n> index 4e32174..95e99f2 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -221,14 +221,9 @@ ifdef NO_MSGFMT\n>  \tMSGFMT ?= $(TCL_PATH) po/po2msg.sh\n>  else\n>  \tMSGFMT ?= msgfmt\n> -\tifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)\n> +\tifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $?),0)\n\nMissing a $ here, it should be $$? not $?.  Fixed up when I applied.\n\n-- \nShawn.\n"},{"id":"71797","messageId":"20080312101912.GB5530@hashpling.org","threadId":"12252","inReplyTo":"7vr6eg7bn3.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Simplify MSGFMT setting in Makefile","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2008-03-12T10:19:12Z","receivedAt":"2008-03-12T10:19:12Z","isPatch":true,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"On Tue, Mar 11, 2008 at 10:29:52PM -0700, Junio C Hamano wrote:\n> To prepare msg files for Tcl scripts, the command that is set to MSGFMT\n> make variable needs to be able to grok \"--tcl -l <lang> -d <here>\" options\n> correctly.  This patch simplifies the tests done in git-gui's Makefile to\n> directly test this condition.  If the test run does not exit properly with\n> zero status (either because you do not have \"msgfmt\" itself, or your\n> \"msgfmt\" is too old to grok --tcl option --- the reason does not matter),\n> have it fall back to po/po2msg.sh\n> \n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\nTested-by: Charles Bailey <charles@hashpling.org>\n\nThis looks good to me on Mac OS X 10.5.2, would anyone like me to\nprepare a patch for gitk as without it we still need to manually\nspecifiy NO_MSGFMT to the top level git make in any case?\n\nCharles.\n"},{"id":"72027","messageId":"18394.671.630499.836160@cargo.ozlabs.ibm.com","threadId":"12252","inReplyTo":"7vr6eg7bn3.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Simplify MSGFMT setting in Makefile","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2008-03-14T04:44:15Z","receivedAt":"2008-03-14T04:44:15Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Junio C Hamano writes:\n\n>  * I am planning to close 'master' for -rc1 by the end of this week, so\n>    please plan to tell me to pull if you have accumulated changes,\n>    thanks.\n\nI have a few commits for you to pull, but I am about to push a patch\nfor gitk like the one you sent for git-gui, so I'll send you a pull\nrequest when I've done that.  However, I found that in this line:\n\n>  else\n>  \tMSGFMT ?= msgfmt\n> -\tifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)\n> +\tifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $?),0)\n\nI had to put \"echo $$?\" for it to work rather than \"echo $?\".\n\nPaul.\n"},{"id":"72030","messageId":"7vabl1vrh7.fsf@gitster.siamese.dyndns.org","threadId":"12252","inReplyTo":"18394.671.630499.836160@cargo.ozlabs.ibm.com","subject":"Re: [PATCH] Simplify MSGFMT setting in Makefile","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-14T04:50:44Z","receivedAt":"2008-03-14T04:50:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paul Mackerras <paulus@samba.org> writes:\n\n> I have a few commits for you to pull, but I am about to push a patch\n> for gitk like the one you sent for git-gui, so I'll send you a pull\n> request when I've done that.\n\nThanks.\n\n>>  else\n>>  \tMSGFMT ?= msgfmt\n>> -\tifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)\n>> +\tifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $?),0)\n>\n> I had to put \"echo $$?\" for it to work rather than \"echo $?\".\n\nYeah, very sorry about this; Shawn already has pointed it out to me.\n"},{"id":"72076","messageId":"47DA788F.6070406@op5.se","threadId":"12252","inReplyTo":"18394.671.630499.836160@cargo.ozlabs.ibm.com","subject":"Re: [PATCH] Simplify MSGFMT setting in Makefile","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-03-14T13:07:27Z","receivedAt":"2008-03-14T13:07:27Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Paul Mackerras wrote:\n> Junio C Hamano writes:\n> \n>>  * I am planning to close 'master' for -rc1 by the end of this week, so\n>>    please plan to tell me to pull if you have accumulated changes,\n>>    thanks.\n> \n> I have a few commits for you to pull, but I am about to push a patch\n> for gitk like the one you sent for git-gui, so I'll send you a pull\n> request when I've done that.  However, I found that in this line:\n> \n>>  else\n>>  \tMSGFMT ?= msgfmt\n>> -\tifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)\n>> +\tifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $?),0)\n> \n> I had to put \"echo $$?\" for it to work rather than \"echo $?\".\n> \n\n$$ is the way to pass a literal $ to the shell in Makefiles, so that\nseems in order.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"}]}