{"thread":{"id":"61894","subject":"Git and gettext","startedAt":"2024-08-03T08:19:03Z","lastAt":"2024-08-12T14:48:07Z","messageCount":8,"participants":["Kim Scarborough","brian m. carlson","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"499997","messageId":"bf5a7771-f616-47d9-a014-f9d3e0afaa08@scarborough.kim","threadId":"61894","inReplyTo":null,"subject":"Git and gettext","fromName":"Kim Scarborough","fromEmail":"kim@scarborough.kim","sentAt":"2024-08-03T07:58:55Z","receivedAt":"2024-08-03T08:19:03Z","isPatch":false,"sender":{"key":"kim@scarborough.kim","avatar":null},"body":"Hi folks,\n\nWas wondering why I need gettext to compile git, even if I tell it I \ndon't need NLS. I've not needed it to compile anything else. Is this \nreally necessary to run git?\n\nIf it *is* absolutely needed for some reason, can at least the configure \nscript give a warning and error out when msgfmt isn't found, rather than \nletting you go through two-thirds of the make before crashing?\n\n-- \nKim Scarborough\n"},{"id":"500006","messageId":"Zq5UFYnWL1jdgDaH@tapette.crustytoothpaste.net","threadId":"61894","inReplyTo":"bf5a7771-f616-47d9-a014-f9d3e0afaa08@scarborough.kim","subject":"Re: Git and gettext","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-08-03T16:00:21Z","receivedAt":"2024-08-03T16:00:30Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-08-03 at 07:58:55, Kim Scarborough wrote:\n> Hi folks,\n> \n> Was wondering why I need gettext to compile git, even if I tell it I don't\n> need NLS. I've not needed it to compile anything else. Is this really\n> necessary to run git?\n\nI believe you can use NO_GETTEXT=1 and NO_MSGFMT=1 (both must be set) to\nremove the need for gettext and msgfmt.  The latter can be omitted if\nyou're not building git-gui.  You can see other configuration options at\nthe top of the Makefile.\n\nI will note that both of these commands are required as of POSIX\n1003.1-2024, though.\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"},{"id":"500008","messageId":"7d507ea2-08e1-4597-bff8-8a2b40a01747@scarborough.kim","threadId":"61894","inReplyTo":"Zq5UFYnWL1jdgDaH@tapette.crustytoothpaste.net","subject":"Re: Git and gettext","fromName":"Kim Scarborough","fromEmail":"kim@scarborough.kim","sentAt":"2024-08-03T17:24:43Z","receivedAt":"2024-08-03T17:24:45Z","isPatch":false,"sender":{"key":"kim@scarborough.kim","avatar":null},"body":"> I believe you can use NO_GETTEXT=1 and NO_MSGFMT=1 (both must be set) to\n> remove the need for gettext and msgfmt.  The latter can be omitted if\n> you're not building git-gui.  You can see other configuration options at\n> the top of the Makefile.\n\nI tried setting both but it still errors out. A little later in the \nbuild, though.\n\n-- \nKim Scarborough\n"},{"id":"500009","messageId":"Zq5qNwmTpL1H5LH0@tapette.crustytoothpaste.net","threadId":"61894","inReplyTo":"7d507ea2-08e1-4597-bff8-8a2b40a01747@scarborough.kim","subject":"Re: Git and gettext","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-08-03T17:34:47Z","receivedAt":"2024-08-03T17:34:50Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-08-03 at 17:24:43, Kim Scarborough wrote:\n> > I believe you can use NO_GETTEXT=1 and NO_MSGFMT=1 (both must be set) to\n> > remove the need for gettext and msgfmt.  The latter can be omitted if\n> > you're not building git-gui.  You can see other configuration options at\n> > the top of the Makefile.\n> \n> I tried setting both but it still errors out. A little later in the build,\n> though.\n\nHmm, I can't remove msgfmt from my system, but if I put a `msgfmt`\nscript in `$TMP/path` that contains just a shebang and `exit 1` and do\nthis, the build succeeds:\n\n---\nPATH=\"$TMP/path:$PATH\" make -j12 NO_GETTEXT=1 NO_MSGFMT=1\n---\n\nNote that `config.mak` is not read by git-gui, so you do really have\nto set `NO_MSGFMT=1` on the command line.\n\nCan you show exactly the commands you're running and exactly the output\nyou're getting?  Also, what OS and version are you running this on?\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"},{"id":"500041","messageId":"1d6e0fef-9b9a-4239-aced-d20cd5c3434c@scarborough.kim","threadId":"61894","inReplyTo":"Zq5qNwmTpL1H5LH0@tapette.crustytoothpaste.net","subject":"Re: Git and gettext","fromName":"Kim Scarborough","fromEmail":"kim@scarborough.kim","sentAt":"2024-08-04T21:26:19Z","receivedAt":"2024-08-04T21:26:27Z","isPatch":false,"sender":{"key":"kim@scarborough.kim","avatar":null},"body":"On 8/3/24 12:34 PM, brian m. carlson wrote:\n> \n> Hmm, I can't remove msgfmt from my system, but if I put a `msgfmt`\n> script in `$TMP/path` that contains just a shebang and `exit 1` and do\n> this, the build succeeds:\n> \n> ---\n> PATH=\"$TMP/path:$PATH\" make -j12 NO_GETTEXT=1 NO_MSGFMT=1\n> ---\n> \n> Note that `config.mak` is not read by git-gui, so you do really have\n> to set `NO_MSGFMT=1` on the command line.\n> \n> Can you show exactly the commands you're running and exactly the output\n> you're getting?  Also, what OS and version are you running this on?\n\nNot working for me. I ran \"make NO_GETTEXT=1 NO_MSGFMT=1\" and it dies \nthusly:\n\n     BUILTIN git-version\n     BUILTIN git-whatchanged\n     SUBDIR git-gui\nGITGUI_VERSION = 0.21.0.128.g2864e\n     * new locations or Tcl/Tk interpreter\n     MSGFMT    po/bg.msg     MSGFMT    po/de.msg     MSGFMT    po/el.msg \n     MSGFMT    po/fr.msg make[1]: *** [Makefile:239: po/bg.msg] Error 127\nmake[1]: *** Waiting for unfinished jobs....\nmake[1]: *** [Makefile:239: po/de.msg] Error 127\nmake[1]: *** [Makefile:239: po/el.msg] Error 127\n     MSGFMT    po/hu.msg make[1]: *** [Makefile:239: po/fr.msg] Error 127\n     MSGFMT    po/it.msg make[1]: *** [Makefile:239: po/hu.msg] Error 127\n     MSGFMT    po/ja.msg make[1]: *** [Makefile:239: po/it.msg] Error 127\n     MSGFMT    po/nb.msg make[1]: *** [Makefile:239: po/ja.msg] Error 127\nmake[1]: *** [Makefile:239: po/nb.msg] Error 127\nmake: *** [Makefile:2365: all] Error 2\n\nThis is a recently-built Linux from Scratch box.\n"},{"id":"500042","messageId":"20240805005311.GA66003@coredump.intra.peff.net","threadId":"61894","inReplyTo":"1d6e0fef-9b9a-4239-aced-d20cd5c3434c@scarborough.kim","subject":"Re: Git and gettext","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2024-08-05T00:53:11Z","receivedAt":"2024-08-05T00:53:19Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Aug 04, 2024 at 04:26:19PM -0500, Kim Scarborough wrote:\n\n> > Note that `config.mak` is not read by git-gui, so you do really have\n> > to set `NO_MSGFMT=1` on the command line.\n> > \n> > Can you show exactly the commands you're running and exactly the output\n> > you're getting?  Also, what OS and version are you running this on?\n> \n> Not working for me. I ran \"make NO_GETTEXT=1 NO_MSGFMT=1\" and it dies\n> thusly:\n> \n>     BUILTIN git-version\n>     BUILTIN git-whatchanged\n>     SUBDIR git-gui\n> GITGUI_VERSION = 0.21.0.128.g2864e\n>     * new locations or Tcl/Tk interpreter\n>     MSGFMT    po/bg.msg     MSGFMT    po/de.msg     MSGFMT    po/el.msg\n> MSGFMT    po/fr.msg make[1]: *** [Makefile:239: po/bg.msg] Error 127\n> make[1]: *** Waiting for unfinished jobs....\n> make[1]: *** [Makefile:239: po/de.msg] Error 127\n> make[1]: *** [Makefile:239: po/el.msg] Error 127\n>     MSGFMT    po/hu.msg make[1]: *** [Makefile:239: po/fr.msg] Error 127\n>     MSGFMT    po/it.msg make[1]: *** [Makefile:239: po/hu.msg] Error 127\n>     MSGFMT    po/ja.msg make[1]: *** [Makefile:239: po/it.msg] Error 127\n>     MSGFMT    po/nb.msg make[1]: *** [Makefile:239: po/ja.msg] Error 127\n> make[1]: *** [Makefile:239: po/nb.msg] Error 127\n> make: *** [Makefile:2365: all] Error 2\n\nIf we don't have msgfmt, I think git-gui invokes a custom script via\ntclsh. If you also don't have that, it will fail. Running with \"make\nV=1\" makes this more obvious, since it shows the fallback command name\ninstead of \"MSGFMT\".\n\nIf you don't need git-gui at all, the simplest thing is to just run\n\"make NO_GETTEXT=1 NO_TCLTK=1\". That's what I do, and I have neither\nmsgfmt nor gettext on my system.\n\nIf you do need git-gui, you'll probably need to make sure your tcl\ninstall works (and has tclsh in the path).\n\n-Peff\n"},{"id":"500191","messageId":"97f1ca52-85b1-443d-a52c-67fce2e25f98@scarborough.kim","threadId":"61894","inReplyTo":"20240805005311.GA66003@coredump.intra.peff.net","subject":"Re: Git and gettext","fromName":"Kim Scarborough","fromEmail":"kim@scarborough.kim","sentAt":"2024-08-06T09:52:39Z","receivedAt":"2024-08-06T09:52:46Z","isPatch":false,"sender":{"key":"kim@scarborough.kim","avatar":null},"body":"On 8/4/24 7:53 PM, Jeff King wrote:\n> If we don't have msgfmt, I think git-gui invokes a custom script via\n> tclsh. If you also don't have that, it will fail. Running with \"make\n> V=1\" makes this more obvious, since it shows the fallback command name\n> instead of \"MSGFMT\".\n> \n> If you don't need git-gui at all, the simplest thing is to just run\n> \"make NO_GETTEXT=1 NO_TCLTK=1\". That's what I do, and I have neither\n> msgfmt nor gettext on my system.\n\nThat did it. Thanks!\n\nWould it be possible to modify the configure script so that it checks \nfor this stuff?\n\n-- \nKim Scarborough\n"},{"id":"500637","messageId":"20240812144806.GB3800004@coredump.intra.peff.net","threadId":"61894","inReplyTo":"97f1ca52-85b1-443d-a52c-67fce2e25f98@scarborough.kim","subject":"Re: Git and gettext","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2024-08-12T14:48:06Z","receivedAt":"2024-08-12T14:48:07Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Aug 06, 2024 at 04:52:39AM -0500, Kim Scarborough wrote:\n\n> On 8/4/24 7:53 PM, Jeff King wrote:\n> > If we don't have msgfmt, I think git-gui invokes a custom script via\n> > tclsh. If you also don't have that, it will fail. Running with \"make\n> > V=1\" makes this more obvious, since it shows the fallback command name\n> > instead of \"MSGFMT\".\n> > \n> > If you don't need git-gui at all, the simplest thing is to just run\n> > \"make NO_GETTEXT=1 NO_TCLTK=1\". That's what I do, and I have neither\n> > msgfmt nor gettext on my system.\n> \n> That did it. Thanks!\n> \n> Would it be possible to modify the configure script so that it checks for\n> this stuff?\n\nProbably. It looks like the configure script knows about both gettext\nand tcl paths, but running \"autoconf && ./configure\" on my machine\ndoesn't disable either.\n\nLooks like the NO_GETTEXT test is checking to compile against libintl.\nWhich I do have (it comes with glibc), but I don't have the other tools.\n\nFor tcl, you can say \"--without-tcltk\" manually. But if you don't, it\njust assumes \"wish\" is present without checking.\n\nSo I'd imagine that both tests could be made more robust. I don't use\nautoconf myself (in the Git project, it is an optional layer that sits\non top of the Makefile knobs), so I'll leave that to somebody more\nmotivated (and hopefully more familiar with the usual autoconf solutions\nto these kinds of things).\n\n-Peff\n"}]}