bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't compile gettext 0.18.1.1 due to format string issues in libcro


From: Bruno Haible
Subject: Re: Can't compile gettext 0.18.1.1 due to format string issues in libcroco and libgrep
Date: Sat, 29 Jan 2011 16:17:10 +0100
User-agent: KMail/1.9.9

Hello,

> I can't compile gettext 0.18.1.1 due to format string issues in libcroco and 
> libgrep:
> 
> libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" 
> -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 
> -DDEPENDS_ON_LIBINTL=1 -I../intl -I///usr/include/libxml2 -I./libcroco -g3 
> -pipe -O0 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter 
> -Wold-style-definition -Wmissing-declarations -Wredundant-decls -Wshadow 
> -Wwrite-strings -Winline -Wformat -Wformat-nonliteral -Wformat-security 
> -Werror=format-security -Wfatal-errors -Winit-self -Wmissing-include-dirs 
> -Wundef -Waggregate-return -Wmissing-format-attribute -Wnested-externs -c 
> libcroco/cr-statement.c  -fPIC -DPIC -o 
> libcroco/.libs/libcroco_rpl_la-cr-statement.o
> ...
> compilation terminated due to -Wfatal-errors.

Just remove the options -Werror=format-security -Wfatal-errors from the
CFLAGS or CPPFLAGS when you configure gettext. Then the compilation will go
through nicely.

> The attached patches helped me to compile, but I don't know whether they are
> semantically correct. 

I will not apply gettext-formatstring.patch because libcroco is from GNOME
and I want to minimize the deviation of gettext's libcroco copy from the
official one. But you're welcome to help fixing the numerous warnings in
libcroco with the upstream maintainers in the GNOME project.

I will not apply gettext-formatstring-libgrep-fgrep.patch and
gettext-formatstring-libgrep-regex.patch because the format strings in
question are fetched from message catalogs via the gettext() function,
and the 'msgfmt' program already has a protection against undesired
format directives which would not correspond to arguments.

Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]