From: Christian Couder <christian.couder@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
Jeff King <peff@peff.net>, Dominik Mahrer <teddy@teddy.ch>,
git-packagers@googlegroups.com, Todd Zullinger <tmz@pobox.com>,
Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH] Makefile: check that tcl/tk is installed
Date: Tue, 21 Nov 2017 00:58:17 +0100 [thread overview]
Message-ID: <CAP8UFD0d9zM9F3tLrTMiLdfoJQsOPELtmudVB6e83DiLPN5DEA@mail.gmail.com> (raw)
In-Reply-To: <20171120191931.okxejqyqayjvxpbc@aiede.mtv.corp.google.com>
Hi,
On Mon, Nov 20, 2017 at 8:19 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Hi,
>
> Christian Couder 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.
>>
>> 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?
Yeah, if you know how it all works and want to decide after installing
gitk and git-gui if you actually want to use them, then things are a
bit less straightforward with this patch, though you can still do what
you want by setting the BYPASS_TCLTK_CHECK variable.
But I doubt that many people who are actually building Git are in this case.
> Can you say more about where this comes up?
The original discussion is:
https://public-inbox.org/git/b6b12040-100f-5965-6dfd-344c84dddf96@teddy.ch/
and here are discussions related to version 1 of this patch:
https://public-inbox.org/git/20171115125200.17006-1-chriscool@tuxfamily.org/
As Peff mentions in the original discussion, at the Bloomberg Git
sprint, we saw someone struggling to compile Git, because of these
msgfmt and Tcl/Tk issues.
> 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; }
I think Peff already gave his opinion about this in the above discussions.
>> 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.
This is the issue as well as the above thread that prompted me to take
a look at this.
>> 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,
Yeah that is also my opinion.
> so I am not *against* this patch, just interested in more
> background.
Thanks for taking a look at this,
Christian.
next prev parent reply other threads:[~2017-11-20 23:58 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 17:15 [PATCH] Makefile: check that tcl/tk is installed Christian Couder
2017-11-20 17:17 ` Christian Couder
2017-11-20 19:19 ` Jonathan Nieder
2017-11-20 23:58 ` Christian Couder [this message]
2017-11-26 19:15 ` Jeff King
2017-11-26 20:57 ` Christian Couder
2017-11-27 15:31 ` Jeff King
2017-11-27 1:13 ` Junio C Hamano
2017-11-27 4:31 ` Junio C Hamano
2017-11-27 4:35 ` Jeff King
2017-11-27 5:22 ` Todd Zullinger
2017-11-27 8:24 ` Christian Couder
2017-11-27 15:27 ` Jeff King
2017-11-27 23:42 ` Junio C Hamano
2017-11-28 4:35 ` Junio C Hamano
2017-11-28 14:37 ` [PATCH] travis-ci: avoid new tcl/tk build requirement Todd Zullinger
2017-11-28 15:03 ` Christian Couder
2017-11-28 16:02 ` Todd Zullinger
2017-11-28 23:47 ` Junio C Hamano
2017-11-27 9:08 ` [PATCH] Makefile: check that tcl/tk is installed Junio C Hamano
2017-11-25 20:46 ` Christian Couder
2017-11-26 3:53 ` Junio C Hamano
2017-11-26 14:00 ` Christian Couder
2017-11-26 17:43 ` Ramsay Jones
2017-11-26 18:34 ` Christian Couder
-- strict thread matches above, loose matches on Subject: below --
2017-11-15 12:52 Christian Couder
2017-11-16 1:35 ` Junio C Hamano
2017-11-17 15:35 ` Christian Couder
2017-11-17 17:42 ` Todd Zullinger
2017-11-17 22:02 ` Jeff King
2017-11-20 17:25 ` Christian Couder
2017-11-20 18:12 ` Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP8UFD0d9zM9F3tLrTMiLdfoJQsOPELtmudVB6e83DiLPN5DEA@mail.gmail.com \
--to=christian.couder@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git-packagers@googlegroups.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=teddy@teddy.ch \
--cc=tmz@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).