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

Re: [PATCH] Makefile: check that tcl/tk is installed

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 20, 2017, 19:19 UTC
Message-ID
<20171120191931.okxejqyqayjvxpbc@aiede.mtv.corp.google.com>
In-Reply-To
<20171120171517.6365-1-chriscool@tuxfamily.org>
Hi,
Christian Couder wrote:
Show 9 quoted lines
> By default running `make install` in the root directory of the
> project will set TCLTK_PATH to `wish` and then go into the "git-gui"
> and "gitk-git" sub-directories to build and install these 2
> sub-projects.
>
> When Tcl/Tk is not installed, the above will succeed if gettext
> is installed, as Tcl/Tk is only required as a substitute for msgfmt
> when msgfmt is not installed. But then running the installed gitk
> and git-gui will fail.

Hm, I am not sure I understand the point of this change. E.g. if I run "make install" for git and install tk later, wouldn't I want gitk to work?

Can you say more about where this comes up? gitk is a wrapper script

	#!/bin/sh
	# Tcl ignores the next line -*- tcl -*- \
	exec wish "$0" -- "$@"
Would some error handling there help?  E.g. something like
	#!/bin/sh
	# Tcl ignores the next line -*- tcl -*- \
	exec wish "$0" -- "$@" || \
	{ echo >&2 "Cannot run gitk without tk"; exit 127; }
Show 6 quoted lines
> If neither Tcl/Tk nor gettext are installed, then processing po
> files will fail in the git-gui directory. The error message when
> this happens is very confusing to new comers as it is difficult
> to understand that we tried to use Tcl/Tk as a substitute for
> msgfmt, and that the solution is to either install gettext or
> Tcl/Tk, or to set both NO_GETTEXT and NO_TCLTK.

Hm, is this the motivating problem? This is a condition where the rationale for failing the build seems clearer.

> To improve the current behavior when Tcl/Tk is not installed,
> let's just check that TCLTK_PATH points to something and error
> out right away if this is not the case.

At first glance I had thought this might set NO_TCLTK automatically, which I think would be problematic for the reasons mentioned above.

Erroring out like this patch does and asking the user to explicitly confirm that they want to install gitk without Tcl/Tk is less problematic, so I am not *against* this patch, just interested in more background.

Thanks and hope that helps, Jonathan

Previous: Christian CouderNext: Christian Couder
Message 3 of 25 in “Makefile: check that tcl/tk is installed”
  1. Makefile: check that tcl/tk is installedChristian Couder, Nov 20, 2017
  2. Christian CouderNov 20, 2017
  3. Jonathan NiederNov 20, 2017
  4. Christian CouderNov 20, 2017
  5. Jeff KingNov 26, 2017
  6. Christian CouderNov 26, 2017
  7. Jeff KingNov 27, 2017
  8. Junio C HamanoNov 27, 2017
  9. Junio C HamanoNov 27, 2017
  10. Jeff KingNov 27, 2017
  11. Todd ZullingerNov 27, 2017
  12. Christian CouderNov 27, 2017
  13. Jeff KingNov 27, 2017
  14. Junio C HamanoNov 27, 2017
  15. Junio C HamanoNov 28, 2017
  16. travis-ci: avoid new tcl/tk build requirementTodd Zullinger, Nov 28, 2017
  17. Christian CouderNov 28, 2017
  18. Todd ZullingerNov 28, 2017
  19. Junio C HamanoNov 28, 2017
  20. Junio C HamanoNov 27, 2017
  21. Christian CouderNov 25, 2017
  22. Junio C HamanoNov 26, 2017
  23. Christian CouderNov 26, 2017
  24. Ramsay JonesNov 26, 2017
  25. Christian CouderNov 26, 2017

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.