* Git and gettext
@ 2024-08-03 7:58 Kim Scarborough
2024-08-03 16:00 ` brian m. carlson
0 siblings, 1 reply; 8+ messages in thread
From: Kim Scarborough @ 2024-08-03 7:58 UTC (permalink / raw)
To: git
Hi folks,
Was wondering why I need gettext to compile git, even if I tell it I
don't need NLS. I've not needed it to compile anything else. Is this
really necessary to run git?
If it *is* absolutely needed for some reason, can at least the configure
script give a warning and error out when msgfmt isn't found, rather than
letting you go through two-thirds of the make before crashing?
--
Kim Scarborough
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git and gettext
2024-08-03 7:58 Git and gettext Kim Scarborough
@ 2024-08-03 16:00 ` brian m. carlson
2024-08-03 17:24 ` Kim Scarborough
0 siblings, 1 reply; 8+ messages in thread
From: brian m. carlson @ 2024-08-03 16:00 UTC (permalink / raw)
To: Kim Scarborough; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
On 2024-08-03 at 07:58:55, Kim Scarborough wrote:
> Hi folks,
>
> Was wondering why I need gettext to compile git, even if I tell it I don't
> need NLS. I've not needed it to compile anything else. Is this really
> necessary to run git?
I believe you can use NO_GETTEXT=1 and NO_MSGFMT=1 (both must be set) to
remove the need for gettext and msgfmt. The latter can be omitted if
you're not building git-gui. You can see other configuration options at
the top of the Makefile.
I will note that both of these commands are required as of POSIX
1003.1-2024, though.
--
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git and gettext
2024-08-03 16:00 ` brian m. carlson
@ 2024-08-03 17:24 ` Kim Scarborough
2024-08-03 17:34 ` brian m. carlson
0 siblings, 1 reply; 8+ messages in thread
From: Kim Scarborough @ 2024-08-03 17:24 UTC (permalink / raw)
To: brian m. carlson, git
> I believe you can use NO_GETTEXT=1 and NO_MSGFMT=1 (both must be set) to
> remove the need for gettext and msgfmt. The latter can be omitted if
> you're not building git-gui. You can see other configuration options at
> the top of the Makefile.
I tried setting both but it still errors out. A little later in the
build, though.
--
Kim Scarborough
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git and gettext
2024-08-03 17:24 ` Kim Scarborough
@ 2024-08-03 17:34 ` brian m. carlson
2024-08-04 21:26 ` Kim Scarborough
0 siblings, 1 reply; 8+ messages in thread
From: brian m. carlson @ 2024-08-03 17:34 UTC (permalink / raw)
To: Kim Scarborough; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 971 bytes --]
On 2024-08-03 at 17:24:43, Kim Scarborough wrote:
> > I believe you can use NO_GETTEXT=1 and NO_MSGFMT=1 (both must be set) to
> > remove the need for gettext and msgfmt. The latter can be omitted if
> > you're not building git-gui. You can see other configuration options at
> > the top of the Makefile.
>
> I tried setting both but it still errors out. A little later in the build,
> though.
Hmm, I can't remove msgfmt from my system, but if I put a `msgfmt`
script in `$TMP/path` that contains just a shebang and `exit 1` and do
this, the build succeeds:
---
PATH="$TMP/path:$PATH" make -j12 NO_GETTEXT=1 NO_MSGFMT=1
---
Note that `config.mak` is not read by git-gui, so you do really have
to set `NO_MSGFMT=1` on the command line.
Can you show exactly the commands you're running and exactly the output
you're getting? Also, what OS and version are you running this on?
--
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git and gettext
2024-08-03 17:34 ` brian m. carlson
@ 2024-08-04 21:26 ` Kim Scarborough
2024-08-05 0:53 ` Jeff King
0 siblings, 1 reply; 8+ messages in thread
From: Kim Scarborough @ 2024-08-04 21:26 UTC (permalink / raw)
To: brian m. carlson, git
On 8/3/24 12:34 PM, brian m. carlson wrote:
>
> Hmm, I can't remove msgfmt from my system, but if I put a `msgfmt`
> script in `$TMP/path` that contains just a shebang and `exit 1` and do
> this, the build succeeds:
>
> ---
> PATH="$TMP/path:$PATH" make -j12 NO_GETTEXT=1 NO_MSGFMT=1
> ---
>
> Note that `config.mak` is not read by git-gui, so you do really have
> to set `NO_MSGFMT=1` on the command line.
>
> Can you show exactly the commands you're running and exactly the output
> you're getting? Also, what OS and version are you running this on?
Not working for me. I ran "make NO_GETTEXT=1 NO_MSGFMT=1" and it dies
thusly:
BUILTIN git-version
BUILTIN git-whatchanged
SUBDIR git-gui
GITGUI_VERSION = 0.21.0.128.g2864e
* new locations or Tcl/Tk interpreter
MSGFMT po/bg.msg MSGFMT po/de.msg MSGFMT po/el.msg
MSGFMT po/fr.msg make[1]: *** [Makefile:239: po/bg.msg] Error 127
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:239: po/de.msg] Error 127
make[1]: *** [Makefile:239: po/el.msg] Error 127
MSGFMT po/hu.msg make[1]: *** [Makefile:239: po/fr.msg] Error 127
MSGFMT po/it.msg make[1]: *** [Makefile:239: po/hu.msg] Error 127
MSGFMT po/ja.msg make[1]: *** [Makefile:239: po/it.msg] Error 127
MSGFMT po/nb.msg make[1]: *** [Makefile:239: po/ja.msg] Error 127
make[1]: *** [Makefile:239: po/nb.msg] Error 127
make: *** [Makefile:2365: all] Error 2
This is a recently-built Linux from Scratch box.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Git and gettext
2024-08-04 21:26 ` Kim Scarborough
@ 2024-08-05 0:53 ` Jeff King
2024-08-06 9:52 ` Kim Scarborough
0 siblings, 1 reply; 8+ messages in thread
From: Jeff King @ 2024-08-05 0:53 UTC (permalink / raw)
To: Kim Scarborough; +Cc: brian m. carlson, git
On Sun, Aug 04, 2024 at 04:26:19PM -0500, Kim Scarborough wrote:
> > Note that `config.mak` is not read by git-gui, so you do really have
> > to set `NO_MSGFMT=1` on the command line.
> >
> > Can you show exactly the commands you're running and exactly the output
> > you're getting? Also, what OS and version are you running this on?
>
> Not working for me. I ran "make NO_GETTEXT=1 NO_MSGFMT=1" and it dies
> thusly:
>
> BUILTIN git-version
> BUILTIN git-whatchanged
> SUBDIR git-gui
> GITGUI_VERSION = 0.21.0.128.g2864e
> * new locations or Tcl/Tk interpreter
> MSGFMT po/bg.msg MSGFMT po/de.msg MSGFMT po/el.msg
> MSGFMT po/fr.msg make[1]: *** [Makefile:239: po/bg.msg] Error 127
> make[1]: *** Waiting for unfinished jobs....
> make[1]: *** [Makefile:239: po/de.msg] Error 127
> make[1]: *** [Makefile:239: po/el.msg] Error 127
> MSGFMT po/hu.msg make[1]: *** [Makefile:239: po/fr.msg] Error 127
> MSGFMT po/it.msg make[1]: *** [Makefile:239: po/hu.msg] Error 127
> MSGFMT po/ja.msg make[1]: *** [Makefile:239: po/it.msg] Error 127
> MSGFMT po/nb.msg make[1]: *** [Makefile:239: po/ja.msg] Error 127
> make[1]: *** [Makefile:239: po/nb.msg] Error 127
> make: *** [Makefile:2365: all] Error 2
If we don't have msgfmt, I think git-gui invokes a custom script via
tclsh. If you also don't have that, it will fail. Running with "make
V=1" makes this more obvious, since it shows the fallback command name
instead of "MSGFMT".
If you don't need git-gui at all, the simplest thing is to just run
"make NO_GETTEXT=1 NO_TCLTK=1". That's what I do, and I have neither
msgfmt nor gettext on my system.
If you do need git-gui, you'll probably need to make sure your tcl
install works (and has tclsh in the path).
-Peff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git and gettext
2024-08-05 0:53 ` Jeff King
@ 2024-08-06 9:52 ` Kim Scarborough
2024-08-12 14:48 ` Jeff King
0 siblings, 1 reply; 8+ messages in thread
From: Kim Scarborough @ 2024-08-06 9:52 UTC (permalink / raw)
To: Jeff King; +Cc: brian m. carlson, git
On 8/4/24 7:53 PM, Jeff King wrote:
> If we don't have msgfmt, I think git-gui invokes a custom script via
> tclsh. If you also don't have that, it will fail. Running with "make
> V=1" makes this more obvious, since it shows the fallback command name
> instead of "MSGFMT".
>
> If you don't need git-gui at all, the simplest thing is to just run
> "make NO_GETTEXT=1 NO_TCLTK=1". That's what I do, and I have neither
> msgfmt nor gettext on my system.
That did it. Thanks!
Would it be possible to modify the configure script so that it checks
for this stuff?
--
Kim Scarborough
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git and gettext
2024-08-06 9:52 ` Kim Scarborough
@ 2024-08-12 14:48 ` Jeff King
0 siblings, 0 replies; 8+ messages in thread
From: Jeff King @ 2024-08-12 14:48 UTC (permalink / raw)
To: Kim Scarborough; +Cc: brian m. carlson, git
On Tue, Aug 06, 2024 at 04:52:39AM -0500, Kim Scarborough wrote:
> On 8/4/24 7:53 PM, Jeff King wrote:
> > If we don't have msgfmt, I think git-gui invokes a custom script via
> > tclsh. If you also don't have that, it will fail. Running with "make
> > V=1" makes this more obvious, since it shows the fallback command name
> > instead of "MSGFMT".
> >
> > If you don't need git-gui at all, the simplest thing is to just run
> > "make NO_GETTEXT=1 NO_TCLTK=1". That's what I do, and I have neither
> > msgfmt nor gettext on my system.
>
> That did it. Thanks!
>
> Would it be possible to modify the configure script so that it checks for
> this stuff?
Probably. It looks like the configure script knows about both gettext
and tcl paths, but running "autoconf && ./configure" on my machine
doesn't disable either.
Looks like the NO_GETTEXT test is checking to compile against libintl.
Which I do have (it comes with glibc), but I don't have the other tools.
For tcl, you can say "--without-tcltk" manually. But if you don't, it
just assumes "wish" is present without checking.
So I'd imagine that both tests could be made more robust. I don't use
autoconf myself (in the Git project, it is an optional layer that sits
on top of the Makefile knobs), so I'll leave that to somebody more
motivated (and hopefully more familiar with the usual autoconf solutions
to these kinds of things).
-Peff
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-08-12 14:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-03 7:58 Git and gettext Kim Scarborough
2024-08-03 16:00 ` brian m. carlson
2024-08-03 17:24 ` Kim Scarborough
2024-08-03 17:34 ` brian m. carlson
2024-08-04 21:26 ` Kim Scarborough
2024-08-05 0:53 ` Jeff King
2024-08-06 9:52 ` Kim Scarborough
2024-08-12 14:48 ` Jeff King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox