不使用gettext编译Git
我试图在Debian(Linux的Windows子系统)上编译一个静态Git 2.17.1: 但我得到了错误不使用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
...
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
- 在运行
之前修补Makefile。将变量make
设置为空看起来很有希望MOFILES
make NO_GETTEXT=YesPlease
这不是您获得有关NO_GETTEXT
的信息的地方,也不是您为makefile定义变量的方式。@jthill好吧,那么问题是如何正确地做。
# Define NO_GETTEXT if you don't want Git output to be translated.
NO_GETTEXT=1