Bug#795437: lierolibre: FTBFS with libconfig 1.5

Simon McVittie smcv at debian.org
Thu Aug 13 23:30:01 UTC 2015


Source: lierolibre
Version: 0.5-1
Severity: serious
Justification: fails to build from source (but built successfully in the past)
Tags: patch

[X-Debbugs-Cc to libconfig at packages.debian.org]

A binNMU of lierolibre was attempted for the libconfig C++ ABI transition.
Unfortunately, this failed, with a lot of errors like this:

src/common.cpp: In member function 'void Texts::loadFromCFG(std::__cxx11::string)':
src/common.cpp:165:38: error: no match for 'operator[]' (operand types are 'const libconfig::Setting' and 'std::__cxx11::basic_string<char>')
   gameModes[i] = (char const*)sgmodes["gameModes" + to_string(i)];
                                      ^
In file included from src/common.hpp:41:0,
                 from src/common.cpp:28:
/usr/include/libconfig.h++:223:13: note: candidate: libconfig::Setting& libconfig::Setting::operator[](const char*) const
   Setting & operator[](const char *name) const;
             ^
/usr/include/libconfig.h++:223:13: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>' to 'const char*'
/usr/include/libconfig.h++:224:13: note: candidate: libconfig::Setting& libconfig::Setting::operator[](int) const
   Setting & operator[](int index) const;
             ^
/usr/include/libconfig.h++:224:13: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>' to 'int'

This seems to be a deliberate change in libconfig 1.5. There used to be
an inline operator[](const std::string &), but it was removed:

> Note: `operator[]` had to remain as `const char*` to avoid ambiguities
>       in some situations.
<https://github.com/hyperrealm/libconfig/commit/1ff9b7f9a2df1abbb5781b78d4065fa22bc5fad6>

I'm not sure why the NMU of libconfig included a new upstream version,
but it's happened now.

I attach a patch which compiles. I have not tested it.

Regards,
    S
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Adapt-to-libconfig-1.5.patch
Type: text/x-diff
Size: 7128 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20150814/c27ff9f8/attachment-0001.patch>


More information about the Pkg-games-devel mailing list