[Pkg-kde-extras] Bug#997118: kmplayer: FTBFS: type_traits:44:3: error: template with C linkage

Simon McVittie smcv at debian.org
Fri Nov 12 10:57:42 GMT 2021


Control: tags -1 + patch upstream

On Sat, 23 Oct 2021 at 20:38:16 +0200, Lucas Nussbaum wrote:
> > /usr/include/c++/11/type_traits:44:3: error: template with C linkage
> >    44 |   template<typename... _Elements>
> >       |   ^~~~~~~~
> > /<<PKGBUILDDIR>>/src/npplayer.cpp:24:1: note: ‘extern "C"’ linkage started here
> >    24 | extern "C" {
> >       | ^~~~~~~~~~

This is caused by a behaviour change in GLib 2.68, which now uses inline
C++ in some headers when they are compiled as C++, for better type-safety
for C++ callers.

Since knpplayer seems to be a standalone host for NPAPI browser plugins
(which are an obsolete technology) and depends on the obsolete libraries
GTK 2 and dbus-glib, I would personally suggest disabling/removing the
knpplayer part of this package instead of fixing it: see #999459 for
details and a patch (builds successfully, otherwise untested).

Or, if that's not considered acceptable, there are two strategies that
kmplayer could use to solve this: it can either ask GLib to behave more
like the older GLib versions for which this module was developed, or
move the header inclusion out from under the extern "C" guards. See the
attached patches for more information.

Either one of the attached patches is sufficient to make this package
build (again, compiled successfully but otherwise untested), but it would
be most robust to do both.

    smcv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: npplayer-Don-t-wrap-third-party-headers-in-extern-C.patch
Type: text/x-diff
Size: 1312 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-kde-extras/attachments/20211112/923728b2/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: npplayer-Target-a-specific-GLib-API-version.patch
Type: text/x-diff
Size: 1748 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-kde-extras/attachments/20211112/923728b2/attachment-0001.patch>


More information about the pkg-kde-extras mailing list