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

Re: msgmft segfaulting on tiger

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 28, 2008, 00:32 UTC
Message-ID
<20080228003212.GP8410@spearce.org>
In-Reply-To
<7vablmqc7q.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> >> $ msgfmt --tcl; echo $?
> >> msgfmt: unrecognized option `--tcl'
> >> Try `msgfmt --help' for more information.
> >> 1
> >
> > Darn.  I think that's the same exit code as for any other invocation 
> > without filename.
> 
> How about...
> 
>     $ msgfmt --tcl -l C -d . /dev/null; echo $?

I can't test this, my msgfmt --tcl works properly. Can someone who has a msgfmt lacking tcl support confirm this will work?

--8<-- [PATCH] git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails

Mac OS X Tiger may have a msgfmt available but it doesn't understand how to implement --tcl. Falling back to po2msg.sh on such systems is a reasonable behavior.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 Makefile |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 01e0a46..1bd11eb 100644
--- a/Makefile
+++ b/Makefile
@@ -224,6 +224,11 @@ else
 	ifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)
 		MSGFMT := $(TCL_PATH) po/po2msg.sh
 	endif
+	ifeq (msgfmt,$(MSGFMT))
+	ifeq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null || echo $?),1)
+		MSGFMT := $(TCL_PATH) po/po2msg.sh
+	endif
+	endif
 endif
 
 msgsdir     = $(gg_libdir)/msgs
-- 
1.5.4.3.295.g6b554


-- 
Shawn.
Previous: Junio C HamanoNext: Gabriel Saldaña
Message 10 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.