Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
不使用gettext编译Git_Git_Gettext_Msgfmt - Fatal编程技术网

不使用gettext编译Git

不使用gettext编译Git,git,gettext,msgfmt,Git,Gettext,Msgfmt,我试图在Debian(Linux的Windows子系统)上编译一个静态Git 2.17.1: 但我得到了错误 ... MSGFMT po/build/locale/pt_PT/LC_MESSAGES/git.mo /bin/sh: 1: msgfmt: not found Makefile:2309: recipe for target 'po/build/locale/pt_PT/LC_MESSAGES/git.mo' failed make: *** [po/build/locale

我试图在Debian(Linux的Windows子系统)上编译一个静态Git 2.17.1:

但我得到了错误

...
    MSGFMT po/build/locale/pt_PT/LC_MESSAGES/git.mo
/bin/sh: 1: msgfmt: not found
Makefile:2309: recipe for target 'po/build/locale/pt_PT/LC_MESSAGES/git.mo' failed
make: *** [po/build/locale/pt_PT/LC_MESSAGES/git.mo] Error 127
我从配置文件中获得的有关
NO\u GETTEXT
的信息:

# Define NO_GETTEXT if you don't want Git output to be translated.

它是否仍然需要
msgfmt

尝试使用1而不是true


变量NO_GETTEXT由configure脚本设置。如果生成主机具有gettext运行时,则将其设置为false

您有几个选项可以解决此问题:

  • 在构建主机上安装gettext工具(包括msgfmt)
  • 安装一个只创建空输出文件的虚拟msgfmt
  • /usr/bin/touch
    所有
    .mo
    文件在运行
    之前,请确保其上次修改时间比
    .po
    文件的最近时间
  • 在运行
    make
    之前修补Makefile。将变量
    MOFILES
    设置为空看起来很有希望
无论如何,您可能都必须修补Makefile,所以可能只需使用最后一个选项。

这对我来说很有效


make NO_GETTEXT=YesPlease

这不是您获得有关
NO_GETTEXT
的信息的地方,也不是您为makefile定义变量的方式。@jthill好吧,那么问题是如何正确地做。
# Define NO_GETTEXT if you don't want Git output to be translated.
NO_GETTEXT=1