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

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

From
Christian Couder <christian.couder@gmail.com>
Date
Nov 26, 2017, 14:00 UTC
Message-ID
<CAP8UFD2sWE9cZe=OO1UQjf6Boih=Go9xJg=gDgEUzbXNuood5w@mail.gmail.com>
In-Reply-To
<xmqqbmjpitl2.fsf@gitster.mtv.corp.google.com>
On Sun, Nov 26, 2017 at 4:53 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> Christian Couder <christian.couder@gmail.com> writes:
>
>> On Mon, Nov 20, 2017 at 6:15 PM, Christian Couder
>> <christian.couder@gmail.com> wrote:
>>> 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.
>>
>> Has this patch fallen through the cracks or is there an unresolved issue?
>
> I had an impression that the conclusion was that the existing error
> message at runtime already does an adequate job and there is no
> issue to be addressed by this patch.  Am I mistaken?

This patch is mostly about what happens at the build step. Its goal is not much to improve what happens at runtime, though that is improved a bit too. If the build step was good enough, then I would agree that what happens at run time is adequate.

Let's consider only people installing git using "make install" to use it on their machine, as I think I already discussed the case of packagers and added the BYPASS_TCLTK_CHECK variable for them.

When those users run "make install", let's suppose they don't have Tcl/Tk installed. (If it is already installed my patch changes nothing.) Let's also suppose that NO_TCLTK is not set. (If it is set my patch changes nothing.)

Then there are 2 cases:
- msgfmt is already installed

Without my patch, the "make install" step works and installs git, git-gui and gitk. But the user might not want to have git-gui and gitk installed in the first place. As Jeff says there are a lot of other graphical tools, that are more advanced these days, so there is a big chance that they just forgot to set NO_TCLTK or just didn't know about this variable. Now if they actually want to use git-gui and gitk, they will get an error at run time (which is adequate) and they will have to install Tck/Tk then before they can git-gui and gitk.

With my patch, the "make install" step fails right away telling them to either set NO_TCLTK or install Tcl/Tk. If they don't want to use git-gui and gitk, they will set NO_TCLTK and then run "make install" again and things will be exactly as they want. If they do want to use git-gui and gitk, they will install Tcl/Tk and then run "make install" again and then things will be exactly as they want and there will be no error at runtime.

So my opinion is that whether they actually want to use git-gui and gitk or not, forcing them to decide is probably a good thing because it ensures that when "make install" succeeds things are exactly how they want them to be. The only case when it might not be a good thing is if they don't know yet if they will actually want to use gitk and git-gui. But even in this case, which is not the most common, they are not much worse.

- msgfmt is not installed

Without my patch, the "make install" step produces an error message while building git-gui. Debugging and fixing the error is quite difficult especially for new comers. They will have to either set NO_GETTEXT or install gettext, and to either set NO_TCLTK or to install Tcl/Tk before the build can fully succeed.

With my patch, the "make install" step fails right away telling them to either set NO_TCLTK or install Tcl/Tk. Then the build will fail again and they will have to either set NO_GETTEXT or install gettext, but this error is easier to understand and to fix than without my patch.

Previous: Junio C HamanoNext: Ramsay Jones
Message 23 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.