git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: msgmft segfaulting on tiger

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 6, 2008, 08:40 UTC
Message-ID
<7v63w0gs87.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080305071915.GI8410@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 6 quoted lines
> Just to revive a nearly dead thead...  I have a workaround now in
> git-gui maint that looks for this case and falls into our po2msg
> script when msgfmt doesn't see --tcl.
>
> I also set Paul Mackerras a patch for gitk, so it can do the
> same thing.  Maybe Git 1.5.4.4 will include both patches.
I looked at what you have in your Makefile.  

It makes me wonder, however, if it makes more sense to squash the two invocations of msgfmt you make into one, like the attached patch.

The point is that msgfmt you guys want to use _must_ understand --tcl, and a msgfmt new enough to be usable would exit with 0 on the above command line.

-- >8 -- gitk i18n: Fall back to po2msg.sh if msgfmt --tcl fails

Some platforms may have a msgfmt that doesn't understand --tcl. Mac OS X Tiger is an example.

Falling back to po2msg.sh on such systems is a reasonable behavior.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index ae2b80b..c72e7f7 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,9 @@ ifdef NO_MSGFMT
 	MSGFMT ?= $(TCL_PATH) po/po2msg.sh
 else
 	MSGFMT ?= msgfmt
+	ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $?),0)
+		MSGFMT = $(TCL_PATH) po/po2msg.sh 
+	endif
 endif
 
 PO_TEMPLATE = po/gitk.pot
Previous: Shawn O. PearceNext: Junio C Hamano
Message 15 of 21 in “msgmft segfaulting on tiger”
  1. Martin LanghoffFeb 21, 2008
  2. Martin LanghoffFeb 21, 2008
  3. Shawn O. PearceFeb 22, 2008
  4. Martin LanghoffFeb 22, 2008
  5. Gabriel SaldañaFeb 27, 2008
  6. Johannes SchindelinFeb 27, 2008
  7. Gabriel SaldañaFeb 27, 2008
  8. Johannes SchindelinFeb 27, 2008
  9. Junio C HamanoFeb 27, 2008
  10. Shawn O. PearceFeb 28, 2008
  11. msgmft segfaulting on ubuntu gutsy (clean)Gabriel Saldaña, Mar 4, 2008
  12. Shawn O. PearceMar 4, 2008
  13. Gabriel SaldañaFeb 28, 2008
  14. Shawn O. PearceMar 5, 2008
  15. Junio C HamanoMar 6, 2008
  16. Simplify MSGFMT setting in MakefileJunio C Hamano, Mar 12, 2008
  17. Shawn O. PearceMar 12, 2008
  18. Charles BaileyMar 12, 2008
  19. Paul MackerrasMar 14, 2008
  20. Junio C HamanoMar 14, 2008
  21. Andreas EricssonMar 14, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.