* [Buildroot] [PATCH] libsvgtiny: disable -Werror
@ 2014-12-10 14:59 Vicente Olivert Riera
2014-12-10 16:00 ` Thomas Petazzoni
2014-12-10 20:40 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Vicente Olivert Riera @ 2014-12-10 14:59 UTC (permalink / raw)
To: buildroot
glibc-2.20 includes some changes to the include/features.h file
introduced by this commit:
https://sourceware.org/git/?p=glibc.git;a=commit;h=ade40b10ff5fa59a318cf55b9d8414b758e8df78
Those changes make libsvgtiny fail because some warnings are thrown and
the build system is using the -Werror option. We disable this to be able
to build it, or otherwise we will see errors like this one:
GPERF: src/colors.gperf
COMPILE: build-Linux-Linux-release-lib-static/src_colors.c
In file included from
/br/output/host/usr/mipsel-buildroot-linux-gnu/sysroot/usr/include/string.h:25:0,
from src/colors.gperf:16:
/br/output/host/usr/mipsel-buildroot-linux-gnu/sysroot/usr/include/features.h:148:3:
error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
_DEFAULT_SOURCE" [-Werror=cpp]
and this one:
In file included from src/colors.gperf:18:0:
/home/ldap/vriera/work/mips-buildroots/mips32/output/build/libsvgtiny-12121/src/svgtiny_internal.h:71:0:
error: "strndup" redefined [-Werror]
Fixes:
http://autobuild.buildroot.net/results/3dd/3dd700405055750262738f867eb5aa08531f5781/
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Markos Chandras <Markos.Chandras@imgtec.com>
---
package/libsvgtiny/libsvgtiny.mk | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/package/libsvgtiny/libsvgtiny.mk b/package/libsvgtiny/libsvgtiny.mk
index a2d494e..2c33f79 100644
--- a/package/libsvgtiny/libsvgtiny.mk
+++ b/package/libsvgtiny/libsvgtiny.mk
@@ -25,4 +25,9 @@ define LIBSVGTINY_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) PREFIX=/usr DESTDIR=$(TARGET_DIR) install
endef
+define LIBSVGTINY_DISABLE_WERROR
+ $(SED) 's/-Werror//' $(@D)/Makefile
+endef
+LIBSVGTINY_POST_CONFIGURE_HOOKS += LIBSVGTINY_DISABLE_WERROR
+
$(eval $(generic-package))
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] libsvgtiny: disable -Werror
2014-12-10 14:59 [Buildroot] [PATCH] libsvgtiny: disable -Werror Vicente Olivert Riera
@ 2014-12-10 16:00 ` Thomas Petazzoni
2014-12-10 20:40 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2014-12-10 16:00 UTC (permalink / raw)
To: buildroot
Dear Vicente Olivert Riera,
On Wed, 10 Dec 2014 14:59:32 +0000, Vicente Olivert Riera wrote:
> glibc-2.20 includes some changes to the include/features.h file
> introduced by this commit:
>
> https://sourceware.org/git/?p=glibc.git;a=commit;h=ade40b10ff5fa59a318cf55b9d8414b758e8df78
>
> Those changes make libsvgtiny fail because some warnings are thrown and
> the build system is using the -Werror option. We disable this to be able
> to build it, or otherwise we will see errors like this one:
>
> GPERF: src/colors.gperf
> COMPILE: build-Linux-Linux-release-lib-static/src_colors.c
> In file included from
> /br/output/host/usr/mipsel-buildroot-linux-gnu/sysroot/usr/include/string.h:25:0,
> from src/colors.gperf:16:
> /br/output/host/usr/mipsel-buildroot-linux-gnu/sysroot/usr/include/features.h:148:3:
> error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
> _DEFAULT_SOURCE" [-Werror=cpp]
>
> and this one:
>
> In file included from src/colors.gperf:18:0:
> /home/ldap/vriera/work/mips-buildroots/mips32/output/build/libsvgtiny-12121/src/svgtiny_internal.h:71:0:
> error: "strndup" redefined [-Werror]
>
> Fixes:
> http://autobuild.buildroot.net/results/3dd/3dd700405055750262738f867eb5aa08531f5781/
>
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> Reviewed-by: Markos Chandras <Markos.Chandras@imgtec.com>
If you have some time, it would be good to report upstream that they
shouldn't use -Werror, and to fix the warnings themselves.
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] libsvgtiny: disable -Werror
2014-12-10 14:59 [Buildroot] [PATCH] libsvgtiny: disable -Werror Vicente Olivert Riera
2014-12-10 16:00 ` Thomas Petazzoni
@ 2014-12-10 20:40 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2014-12-10 20:40 UTC (permalink / raw)
To: buildroot
Dear Vicente Olivert Riera,
On Wed, 10 Dec 2014 14:59:32 +0000, Vicente Olivert Riera wrote:
> +define LIBSVGTINY_DISABLE_WERROR
> + $(SED) 's/-Werror//' $(@D)/Makefile
> +endef
> +LIBSVGTINY_POST_CONFIGURE_HOOKS += LIBSVGTINY_DISABLE_WERROR
As discussed on IRC, I would prefer this to be done using a patch
rather than a $(SED) command, for several reasons:
* A $(SED) command that replaces some random string can start breaking
when we bump the libsvgtiny Makefile, as it might start replacing
other things than what was intended.
* We will never notice when the $(SED) command will no longer be
useful. With a patch, when we'll bump libsvgtiny, we'll get some
conflict when re-applying the patch on the new version of
libsvgtiny, and so we'll see if we can drop the patch, or if we need
to re-adjust the patch.
Care to resend as a patch instead?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-10 20:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10 14:59 [Buildroot] [PATCH] libsvgtiny: disable -Werror Vicente Olivert Riera
2014-12-10 16:00 ` Thomas Petazzoni
2014-12-10 20:40 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox