build error since today (invalid UTF-8)

57 views
Skip to first unread message

M Kelly

unread,
Jun 6, 2019, 2:47:03 PM6/6/19
to vim_dev
Hi,

I typically build daily and its been fine until today -

msgfmt --desktop -d . --template gvim.desktop.in -o tmp_gvim.desktop
rm -f LINGUAS
if command -v desktop-file-validate; then desktop-file-validate tmp_gvim.desktop; fi
/usr/bin/desktop-file-validate
tmp_gvim.desktop: warning: file contains lines that are not UTF-8 encoded. There is no guarantee the validator will correctly work.
[Invalid UTF-8] tmp_gvim.desktop: error: value "\xe0\xac\xaa\xe0\xac\xbe\xe0\xac\xa0\xe0\xad\x8d\xe0\xac\xaf \xe0\xac\xab\xe0\xac\xbe\xe0\xac\x87\xe0\xac\xb2\xe0\xac\x97\xe0\xad\x81\xe0\xac\xa1\xe0\xac\xbc\xe0\xac\xbf\xe0\xac\x95\xe0\xad\x81 \xe0\xac\xb8\xe0\xac\xae\xe0\xad\x8d\xe0\xac\xaa\xe0\xac\xbe\xe0\xac\xa6\xe0\xac\xa8 \xe0\xac\x95\xe0\xac\xb0\xe0\xac\xa8\xe0\xad\x8d\xe0\xac\xa4\xe0\xad" for locale string key "Comment[or]" in group "Desktop Entry" contains y characters, locale string values should be encoded in UTF-8

I'm on
linux 4.15.0-51-generic
gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
msgfmt (GNU gettext-tools) 0.19.7
GDM_LANG=en_US
LANG=en_US.UTF-8
LANGUAGE=en_US

Any ideas ?

thx,
-m

M Kelly

unread,
Jun 6, 2019, 2:50:01 PM6/6/19
to vim_dev
git rev is latest master since a few minutes ago:

* 2019-06-06 773a97c25 (HEAD -> master, origin/master, origin/HEAD) Update runtime files - Add typescript syntax and indent. (Bram Moolenaar)

M Kelly

unread,
Jun 6, 2019, 3:45:37 PM6/6/19
to vim_dev
Hi,

I see someone else posted earlier about the same issue.
But those suggestions and also latest git rev do not resolve issue for me.

-m

Bram Moolenaar

unread,
Jun 6, 2019, 4:51:02 PM6/6/19
to vim...@googlegroups.com, M Kelly

> I see someone else posted earlier about the same issue.
> But those suggestions and also latest git rev do not resolve issue for me.

The problem appears to be a broken version of msgfmt.
We can't fix that in Vim. And it appears to be a real problem, thus
ignoring it also doesn't appear to be a good idea.

Is this a build error or an error for "make install"?

--
hundred-and-one symptoms of being an internet addict:
106. When told to "go to your room" you inform your parents that you
can't...because you were kicked out and banned.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Ken Takata

unread,
Jun 6, 2019, 11:05:15 PM6/6/19
to vim_dev
Hi,

2019/6/7 Fri 5:51:02 UTC+9 Bram Moolenaar wrote:
> > I see someone else posted earlier about the same issue.
> > But those suggestions and also latest git rev do not resolve issue for me.
>
> The problem appears to be a broken version of msgfmt.
> We can't fix that in Vim. And it appears to be a real problem, thus
> ignoring it also doesn't appear to be a good idea.
>
> Is this a build error or an error for "make install"?

This is an error for "make".

How about checking the version of broken msgfmt?
It seems that v0.19.7 is broken.

--- a/src/configure.ac
+++ b/src/configure.ac
@@ -4302,8 +4302,13 @@ if test "$enable_nls" = "yes"; then
AC_MSG_CHECKING([if msgfmt supports --desktop])
MSGFMT_DESKTOP=
if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
- AC_MSG_RESULT([yes])
- MSGFMT_DESKTOP="gvim.desktop vim.desktop"
+ if "$MSGFMT" --version | grep '0.19.7$' >/dev/null; then
+ dnl GNU gettext 0.19.7's --desktop is broken.
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([yes])
+ MSGFMT_DESKTOP="gvim.desktop vim.desktop"
+ fi
else
AC_MSG_RESULT([no])
fi

Regards,
Ken Takata

Christian Brabandt

unread,
Jun 7, 2019, 1:44:36 AM6/7/19
to vim_dev
Yeah, it looks like Ubuntus msgfmt is seriously broken. Open a bug
report at their issue tracker please.

For the time being, you can either install an updated msgfmt from here:
https://launchpad.net/~ricotz/+archive/ubuntu/toolchain

or simply ignore the error and apply a local patch, like this one:
https://groups.google.com/d/msg/vim_dev/yYGCsJJPlA0/oPYsDxBRAgAJ

Best,
Christian
--
"Arden von Deversham", Shakespeares Jugendarbeit. Es ist der
ganze rein-treue Ernst des Auffassens und Wiedergebens, ohne Spur von
Rücksicht auf den Effekt, vollkommen dramatisch, ganz untheatralisch.
-- Goethe, Maximen und Reflektionen, Nr. 495

Christian Brabandt

unread,
Jun 7, 2019, 1:44:59 AM6/7/19
to vim...@googlegroups.com

On Do, 06 Jun 2019, Bram Moolenaar wrote:

>
> > I see someone else posted earlier about the same issue.
> > But those suggestions and also latest git rev do not resolve issue for me.
>
> The problem appears to be a broken version of msgfmt.
> We can't fix that in Vim. And it appears to be a real problem, thus
> ignoring it also doesn't appear to be a good idea.
>
> Is this a build error or an error for "make install"?

It is a build error

Best,
Christian
--
Schfleck, Knut:
Verkünder der befleckten Empfängnis

Ken Takata

unread,
Jun 7, 2019, 1:54:01 AM6/7/19
to vim_dev
Hi,

Or, should we also mark gettext v0.19 to v0.19.6 as broken?
If so:

--- a/src/configure.ac
+++ b/src/configure.ac
@@ -4302,8 +4302,13 @@ if test "$enable_nls" = "yes"; then
AC_MSG_CHECKING([if msgfmt supports --desktop])
MSGFMT_DESKTOP=
if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
- AC_MSG_RESULT([yes])
- MSGFMT_DESKTOP="gvim.desktop vim.desktop"

+ if "$MSGFMT" --version | grep '0.19$\|0.19.[[1-7]]$' >/dev/null; then


+ dnl GNU gettext 0.19.7's --desktop is broken.

+ AC_MSG_RESULT([broken])

Christian Brabandt

unread,
Jun 7, 2019, 2:12:59 AM6/7/19
to vim_dev

On Do, 06 Jun 2019, Ken Takata wrote:

> Or, should we also mark gettext v0.19 to v0.19.6 as broken?

I believe, when I tried to git bisect the issue yesterday, the first bad
commit was around 0.19.3

But I don't think it matters much, Ubuntu 14.04 has version 0.18.3 and
is already end-of-life for standard support. That leaves us with Ubuntu
16.04 which is at version 0.19.7 However the version might look like
this for non-tagged releases: 0.19.7-<sha_hash>

So I would just check for 0.19.7 (without '$')

Best,
Christian
--
Kommt das Häschen zum Rechtsanwalt
"Haddu Vollmacht?"
Sagt der Rechtsanwalt: "Ja, klar!"
Häschen: "Muddu Windeln wechseln!"

Ken Takata

unread,
Jun 7, 2019, 2:38:11 AM6/7/19
to vim_dev
Hi,

2019/6/7 Fri 15:12:59 UTC+9 Christian Brabandt wrote:
> On Do, 06 Jun 2019, Ken Takata wrote:
>
> > Or, should we also mark gettext v0.19 to v0.19.6 as broken?
>
> I believe, when I tried to git bisect the issue yesterday, the first bad
> commit was around 0.19.3
>
> But I don't think it matters much, Ubuntu 14.04 has version 0.18.3 and
> is already end-of-life for standard support. That leaves us with Ubuntu
> 16.04 which is at version 0.19.7 However the version might look like
> this for non-tagged releases: 0.19.7-<sha_hash>

Even it is a non-tagged version, `msgfmt --version` on Ubuntu 16.04 returns
0.19.7.

> So I would just check for 0.19.7 (without '$')

So I think we can keep '$'.
Checking 0.19.3 to 0.19.6 might be not so useful, but checking them doesn't
have any penalty, I think.

--- a/src/configure.ac
+++ b/src/configure.ac
@@ -4302,8 +4302,13 @@ if test "$enable_nls" = "yes"; then
AC_MSG_CHECKING([if msgfmt supports --desktop])
MSGFMT_DESKTOP=
if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
- AC_MSG_RESULT([yes])
- MSGFMT_DESKTOP="gvim.desktop vim.desktop"

+ if "$MSGFMT" --version | grep '0.19.[[3-7]]$' >/dev/null; then

Mike Williams

unread,
Jun 7, 2019, 5:38:57 AM6/7/19
to vim...@googlegroups.com
On 07/06/2019 06:44, Christian Brabandt wrote:
>
> On Do, 06 Jun 2019, M Kelly wrote:
>
>> Hi,
>>
>> I see someone else posted earlier about the same issue.
>> But those suggestions and also latest git rev do not resolve issue for me.
>
> Yeah, it looks like Ubuntus msgfmt is seriously broken. Open a bug
> report at their issue tracker please.

In the process of doing this - first one for me so a learning process.
Should be added by COB today UK time.

> For the time being, you can either install an updated msgfmt from here:
> https://launchpad.net/~ricotz/+archive/ubuntu/toolchain

Custom tool chains to build VIM doesn't feel right but that is just a
grumble from me.

> or simply ignore the error and apply a local patch, like this one:
> https://groups.google.com/d/msg/vim_dev/yYGCsJJPlA0/oPYsDxBRAgAJ

I tired disturbing the file - moving the line, adding ASCII chars,
rearranging chars but to now avail. This one may run for a while :(

TTFN

Mike
--
When you're arguing with a fool, make sure he isn't doing the same thing.

Christian Brabandt

unread,
Jun 7, 2019, 6:18:10 AM6/7/19
to vim...@googlegroups.com
If you want to try building a local fixed package, here is what I did yesterday:

mkdir -p ~/build-gettext && cd ~/build-gettext
sudo apt-get build-dep gettext && sudo apt-get install devscripts
apt-get source gettext
cd gettext-0.19.7/debian/patches
# download the patch http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=68ab0dafa99f1941b3ebb47b7cf969381e7310f4
wget -c 'https://www.256bit.org/~chrisbra/0001-desktop-Fix-invalid-memory-access.patch'
echo 0001-desktop-Fix-invalid-memory-access.patch >> series
cd ../../
dch --local $USER
** mention fixe in the changelog **
debuild -us -uc
cd ..
sudo dpkg -i gettext_0.19.7-2ubuntu3.1${USER}1_amd64.deb

# go to your vim source directory
cd ~/code/vim/src/po
make clean && make gvim.desktop


Best,
Christian

Bram Moolenaar

unread,
Jun 7, 2019, 6:29:52 AM6/7/19
to vim...@googlegroups.com, Christian Brabandt

Christian wrote:

> On Do, 06 Jun 2019, Bram Moolenaar wrote:
>
> >
> > > I see someone else posted earlier about the same issue.
> > > But those suggestions and also latest git rev do not resolve issue for me.
> >
> > The problem appears to be a broken version of msgfmt.
> > We can't fix that in Vim. And it appears to be a real problem, thus
> > ignoring it also doesn't appear to be a good idea.
> >
> > Is this a build error or an error for "make install"?
>
> It is a build error

Since there are the .desktop files in the distribution, best would be to
just keep these, instead of building a new one. So we try to build a
fresh version, but if it fails then we don't put the broken one over an
older but working one.

--
hundred-and-one symptoms of being an internet addict:
108. While reading a magazine, you look for the Zoom icon for a better
look at a photograph.

Christian Brabandt

unread,
Jun 7, 2019, 7:40:29 AM6/7/19
to vim...@googlegroups.com

On Fr, 07 Jun 2019, Bram Moolenaar wrote:

> Since there are the .desktop files in the distribution, best would be to
> just keep these, instead of building a new one. So we try to build a
> fresh version, but if it fails then we don't put the broken one over an
> older but working one.

So how about the attached patch then?

Best,
Christian
--
Letzte Worte eines Handgranatenwerfers:
"Bis wieviel sagten Sie soll ich zählen?"
0001-desktop-ignore-errors-from-desktop-file-validate.patch

Bram Moolenaar

unread,
Jun 7, 2019, 2:45:08 PM6/7/19
to vim...@googlegroups.com, Christian Brabandt

Christian wrote:

> On Fr, 07 Jun 2019, Bram Moolenaar wrote:
>
> > Since there are the .desktop files in the distribution, best would be to
> > just keep these, instead of building a new one. So we try to build a
> > fresh version, but if it fails then we don't put the broken one over an
> > older but working one.
>
> So how about the attached patch then?

I prefer the solution with the configure check. It looks like the
appropriate thing to do, fewer exceptions. A broken msgfmt is like
there is no msgfmt. If checking the version is not suffucient, we could
add a more specific configure check. But let's assume that checking the
version solves it for now.

--
hundred-and-one symptoms of being an internet addict:
110. You actually volunteer to become your employer's webmaster.

Bram Moolenaar

unread,
Jun 7, 2019, 2:45:08 PM6/7/19
to vim...@googlegroups.com, Ken Takata
Thanks. This looks like the best solution. Let me include it and we
can see if this fixed it for everybody.

--
hundred-and-one symptoms of being an internet addict:
111. You and your friends get together regularly on IRC, even though
all of you live in the same city.

M Kelly

unread,
Jun 7, 2019, 3:12:02 PM6/7/19
to vim_dev
Hi,

Thank you all so much. 8.1.1487 builds fine :-)

-mark

Reply all
Reply to author
Forward
0 new messages