Bug#795813: kodi: FTBFS with g++-5: multiple definitions of argument-parsing stuff

2015-08-17 Thread Simon McVittie
Source: kodi
Version: 14.2+dfsg1-2
Severity: serious
Justification: fails to build from source (but built successfully in the past)
Tags: patch

kodi fails to build from source when binNMU'd for the libstdc++ transitions:


There are lots of errors like this:

../../lib/libmisc.a(argp-parse.o): In function `argp_usage':
/«BUILDDIR»/kodi-14.2+dfsg1/xbmc/screensavers/rsxs-0.9/lib/argp.h:568: multiple 
definition of `argp_usage'
../../lib/libmisc.a(argp-help.o):/«BUILDDIR»/kodi-14.2+dfsg1/xbmc/screensavers/rsxs-0.9/lib/argp.h:568:
 first defined here
../../lib/libmisc.a(argp-parse.o): In function `_option_is_short':
/«BUILDDIR»/kodi-14.2+dfsg1/xbmc/screensavers/rsxs-0.9/lib/argp.h:574: multiple 
definition of `_option_is_short'
../../lib/libmisc.a(argp-help.o):/«BUILDDIR»/kodi-14.2+dfsg1/xbmc/screensavers/rsxs-0.9/lib/argp.h:574:
 first defined here

I believe this is because g++-5 changed the default interpretation of
"inline T foo() { ... }" from historical GNU behaviour to Standard C++.


In Ubuntu, Matthias Klose patched kodi to use historical GNU inline
semantics :

diff -pruN 14.2+dfsg1-2/debian/rules 14.2+dfsg1-2ubuntu1/debian/rules
--- 14.2+dfsg1-2/debian/rules   2015-06-04 08:33:30.0 +
+++ 14.2+dfsg1-2ubuntu1/debian/rules2015-08-10 19:42:58.0 +
@@ -37,6 +37,7 @@ DEB_CFLAGS ?=  $(shell dpkg-buildflags -
 DEB_CXXFLAGS ?= $(shell dpkg-buildflags --get CPPFLAGS) \
   $(filter-out -g -O2, $(shell dpkg-buildflags --get CXXFLAGS))
 DEB_LDFLAGS ?= $(shell dpkg-buildflags --get LDFLAGS) $(shell pkg-config 
--libs ftgl)
+DEB_CFLAGS += -fgnu89-inline
 ENV_OPTIONS = CFLAGS="$(DEB_CFLAGS)" CXXFLAGS="$(DEB_CXXFLAGS)" \
   LDFLAGS="$(DEB_LDFLAGS)"
 

This is probably an appropriate change for kodi in Debian too.

Regards,
S

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#795813: kodi: FTBFS with g++-5: multiple definitions of argument-parsing stuff

2015-08-17 Thread Bálint Réczey
Hi Simon,

2015-08-17 9:31 GMT+02:00 Simon McVittie :
> Source: kodi
> Version: 14.2+dfsg1-2
> Severity: serious
> Justification: fails to build from source (but built successfully in the past)
> Tags: patch
>
> kodi fails to build from source when binNMU'd for the libstdc++ transitions:
> 
>
> There are lots of errors like this:
>
> ../../lib/libmisc.a(argp-parse.o): In function `argp_usage':
> /«BUILDDIR»/kodi-14.2+dfsg1/xbmc/screensavers/rsxs-0.9/lib/argp.h:568: 
> multiple definition of `argp_usage'
> ../../lib/libmisc.a(argp-help.o):/«BUILDDIR»/kodi-14.2+dfsg1/xbmc/screensavers/rsxs-0.9/lib/argp.h:568:
>  first defined here
> ../../lib/libmisc.a(argp-parse.o): In function `_option_is_short':
> /«BUILDDIR»/kodi-14.2+dfsg1/xbmc/screensavers/rsxs-0.9/lib/argp.h:574: 
> multiple definition of `_option_is_short'
> ../../lib/libmisc.a(argp-help.o):/«BUILDDIR»/kodi-14.2+dfsg1/xbmc/screensavers/rsxs-0.9/lib/argp.h:574:
>  first defined here
>
> I believe this is because g++-5 changed the default interpretation of
> "inline T foo() { ... }" from historical GNU behaviour to Standard C++.
> 
>
> In Ubuntu, Matthias Klose patched kodi to use historical GNU inline
> semantics :
>
> diff -pruN 14.2+dfsg1-2/debian/rules 14.2+dfsg1-2ubuntu1/debian/rules
> --- 14.2+dfsg1-2/debian/rules   2015-06-04 08:33:30.0 +
> +++ 14.2+dfsg1-2ubuntu1/debian/rules2015-08-10 19:42:58.0 +
> @@ -37,6 +37,7 @@ DEB_CFLAGS ?=  $(shell dpkg-buildflags -
>  DEB_CXXFLAGS ?= $(shell dpkg-buildflags --get CPPFLAGS) \
>$(filter-out -g -O2, $(shell dpkg-buildflags --get CXXFLAGS))
>  DEB_LDFLAGS ?= $(shell dpkg-buildflags --get LDFLAGS) $(shell pkg-config 
> --libs ftgl)
> +DEB_CFLAGS += -fgnu89-inline
>  ENV_OPTIONS = CFLAGS="$(DEB_CFLAGS)" CXXFLAGS="$(DEB_CXXFLAGS)" \
>LDFLAGS="$(DEB_LDFLAGS)"
>
>
> This is probably an appropriate change for kodi in Debian too.
Thank you for the bug report and also for the patch.
I'm packaging Kodi 15 right now and it FTBFS-s multiple ways and some
of them are due to the embedded outdated gnulib files.
Instead of passing the cflag I plan removing the gnulib usage in the
next upload but for this particular problem the proposed patch would
be a solution indeed.

Cheers,
Balint

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers