Your message dated Fri, 21 Aug 2015 16:08:29 +0000
with message-id <e1zsorl-0006bf...@franck.debian.org>
and subject line Bug#795437: fixed in lierolibre 0.5-1.1
has caused the Debian Bug report #795437,
regarding lierolibre: FTBFS with libconfig 1.5
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
795437: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795437
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
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 libcon...@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
From: Simon McVittie <s...@debian.org>
Date: Fri, 14 Aug 2015 00:27:56 +0100
Subject: Adapt to libconfig 1.5

Setting::operator[](const std::string &) is no longer available.
---
 src/common.cpp       | 18 ++++++++++++------
 src/configCompat.cpp |  6 +++---
 src/configHelper.cpp | 12 +++++-------
 src/constants.cpp    |  6 +++---
 src/gfx/palette.cpp  |  9 ++++++---
 5 files changed, 29 insertions(+), 22 deletions(-)

diff --git a/src/common.cpp b/src/common.cpp
index 2d6ada5..9508a37 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -162,7 +162,8 @@ void Texts::loadFromCFG(std::string cfgFilePath)
 	const libconfig::Setting &sgmodes = texts["gameModes"];
 	for(int i = 0; i < 4; ++i)
 	{
-		gameModes[i] = (char const*)sgmodes["gameModes" + to_string(i)];
+		std::string key("gameModes" + to_string(i));
+		gameModes[i] = (char const*)sgmodes[key.c_str()];
 	}
 
 	const libconfig::Setting &sgmspec = texts["gameModeSpec"];
@@ -181,13 +182,15 @@ void Texts::loadFromCFG(std::string cfgFilePath)
 	const libconfig::Setting &swstates = texts["weapStates"];
 	for(int i = 0; i < 3; ++i)
 	{
-		 weapStates[i] = (char const*)swstates["weapStates" + to_string(i)];
+		 std::string key("weapStates" + to_string(i));
+		 weapStates[i] = (char const*)swstates[key.c_str()];
 	}
 
 	const libconfig::Setting &sknames = texts["keyNames"];
 	for(int i = 1; i < 177; ++i) // First key starts at 1
 	{
-		keyNames[i] = (char const*)sknames["keyNames" + to_string(i)];
+		std::string key("keyNames" + to_string(i));
+		keyNames[i] = (char const*)sknames[key.c_str()];
 	}
 
 	selWeap = (char const*)texts["selWeap"];
@@ -315,8 +318,10 @@ void Common::loadPaletteFromCFG(std::string cfgFilePath)
 	const libconfig::Setting &scanim = palette["colorAnim"];
 	for(int i = 0; i < 4; ++i)
 	{
-		colorAnim[i].from = (int)scanim["colorAnim" + to_string(i) + "from"];
-		colorAnim[i].to = (int)scanim["colorAnim" + to_string(i) + "to"];
+		std::string key("colorAnim" + to_string(i) + "from");
+		colorAnim[i].from = (int)scanim[key.c_str()];
+		key = "colorAnim" + to_string(i) + "to";
+		colorAnim[i].to = (int)scanim[key.c_str()];
 	}
 }
 
@@ -383,7 +388,8 @@ void Common::loadMaterialsFromCFG(std::string cfgFilePath)
 
 	for(int i = 0; i < 256; ++i)
 	{
-		const libconfig::Setting &smflags = smaterials["flags" + to_string(i)];
+		std::string key("flags" + to_string(i));
+		const libconfig::Setting &smflags = smaterials[key.c_str()];
 		materials[i].flags = smflags;
 	}
 }
diff --git a/src/configCompat.cpp b/src/configCompat.cpp
index 1aeb262..a72c40f 100644
--- a/src/configCompat.cpp
+++ b/src/configCompat.cpp
@@ -160,19 +160,19 @@ void Common::loadConstantsFromCFGVer0(string cfgFilePath)
 	const Setting &vconstants = constants["Values"];
 	for(int i = 0; i < MaxC; ++i)
 	{
-		C[i] = (int)vconstants[valueConstantsNamesCFGVer0[i]];
+		C[i] = (int)vconstants[valueConstantsNamesCFGVer0[i].c_str()];
 	}
 
 	const Setting &sconstants = constants["Strings"];
 	for(int i = 0; i < MaxS; ++i)
 	{
-		S[i]= (char const*)sconstants[stringConstantsNamesCFGVer0[i]];
+		S[i]= (char const*)sconstants[stringConstantsNamesCFGVer0[i].c_str()];
 	}
 
 	const Setting &hconstants = constants["Hacks"];
 	for(int i = 0; i < MaxH; ++i)
 	{
-		H[i] = (bool)hconstants[hackConstantsNamesVer0[i]];
+		H[i] = (bool)hconstants[hackConstantsNamesVer0[i].c_str()];
 	}
 }
 
diff --git a/src/configHelper.cpp b/src/configHelper.cpp
index fcd1f3f..6d9244e 100644
--- a/src/configHelper.cpp
+++ b/src/configHelper.cpp
@@ -54,14 +54,12 @@ template Uint8 ConfigHelper::getValue<Uint8, const Setting, int>(const Setting &
 
 template Uint8 ConfigHelper::getValue<Uint8, const Setting, char const*>(const Setting &node, char const* index);
 
-template Uint8 ConfigHelper::getValue<Uint8, const Setting, string>(const Setting &node, string index);
 
 // Non-const
 template Uint8 ConfigHelper::getValue<Uint8, Setting, int>(Setting &node, int index);
 
 template Uint8 ConfigHelper::getValue<Uint8, Setting, char const*>(Setting &node, char const* index);
 
-template Uint8 ConfigHelper::getValue<Uint8, Setting, string>(Setting &node, string index);
 
 
 // Since we still need specialisation per value type (Setting::Type),
@@ -72,7 +70,7 @@ void ConfigHelper::put(Setting &node, string variable, string value)
 	{
 		node.add(variable, Setting::TypeString) = value;
 	} else {
-		Setting &var = node[variable];
+		Setting &var = node[variable.c_str()];
 		var = value;
 	}
 }
@@ -83,7 +81,7 @@ void ConfigHelper::put(Setting &node, string variable, int value)
 	{
 		node.add(variable, Setting::TypeInt) = value;
 	} else {
-		Setting &var = node[variable];
+		Setting &var = node[variable.c_str()];
 		var = value;
 	}
 }
@@ -94,7 +92,7 @@ void ConfigHelper::put(Setting &node, string variable, Uint8 value)
 	{
 		node.add(variable, Setting::TypeInt) = value;
 	} else {
-		Setting &var = node[variable];
+		Setting &var = node[variable.c_str()];
 		var = value;
 	}
 }
@@ -105,7 +103,7 @@ void ConfigHelper::put(Setting &node, string variable, bool value)
 	{
 		node.add(variable, Setting::TypeBoolean) = value;
 	} else {
-		Setting &var = node[variable];
+		Setting &var = node[variable.c_str()];
 		var = value;
 	}
 }
@@ -135,6 +133,6 @@ Setting& ConfigHelper::getSubgroup(Setting &node, string groupName)
 	{
 		node.add(groupName, Setting::TypeGroup);
 	}
-	return node[groupName];
+	return node[groupName.c_str()];
 }
 
diff --git a/src/constants.cpp b/src/constants.cpp
index 7fced6a..cf7bbfc 100644
--- a/src/constants.cpp
+++ b/src/constants.cpp
@@ -523,19 +523,19 @@ void Common::loadConstantsFromCFG(std::string cfgFilePath)
 	const libconfig::Setting &vconstants = constants["Values"];
 	for(int i = 0; i < MaxC; ++i)
 	{
-		C[i] = (int)vconstants[valueConstantsNames[i]];
+		C[i] = (int)vconstants[valueConstantsNames[i].c_str()];
 	}
 
 	const libconfig::Setting &sconstants = constants["Strings"];
 	for(int i = 0; i < MaxS; ++i)
 	{
-		S[i]= (char const*)sconstants[stringConstantsNames[i]];
+		S[i]= (char const*)sconstants[stringConstantsNames[i].c_str()];
 	}
 
 	const libconfig::Setting &hconstants = constants["Hacks"];
 	for(int i = 0; i < MaxH; ++i)
 	{
-		H[i] = (bool)hconstants[hackConstantsNames[i]];
+		H[i] = (bool)hconstants[hackConstantsNames[i].c_str()];
 	}
 }
 
diff --git a/src/gfx/palette.cpp b/src/gfx/palette.cpp
index 3fd08c4..cde0267 100644
--- a/src/gfx/palette.cpp
+++ b/src/gfx/palette.cpp
@@ -124,9 +124,12 @@ void Palette::readFromCFG(std::string cfgFilePath)
 
 	for(int i = 0; i < 256; ++i)
 	{
-		entries[i].r = cfgHelp.getValue<Uint8>(spentries, "entries" + to_string(i) + "r");
-		entries[i].g = cfgHelp.getValue<Uint8>(spentries, "entries" + to_string(i) + "g");
-		entries[i].b = cfgHelp.getValue<Uint8>(spentries, "entries" + to_string(i) + "b");
+		std::string idx("entries" + to_string(i) + "r");
+		entries[i].r = cfgHelp.getValue<Uint8>(spentries, idx.c_str());
+		idx = "entries" + to_string(i) + "g";
+		entries[i].g = cfgHelp.getValue<Uint8>(spentries, idx.c_str());
+		idx = "entries" + to_string(i) + "b";
+		entries[i].b = cfgHelp.getValue<Uint8>(spentries, idx.c_str());
 	}
 }
 

--- End Message ---
--- Begin Message ---
Source: lierolibre
Source-Version: 0.5-1.1

We believe that the bug you reported is fixed in the latest version of
lierolibre, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 795...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Arturo Borrero Gonzalez <arturo.borrero.g...@gmail.com> (supplier of updated 
lierolibre package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 21 Aug 2015 17:25:00 +0200
Source: lierolibre
Binary: lierolibre lierolibre-data lierolibre-dbg
Architecture: source all amd64
Version: 0.5-1.1
Distribution: unstable
Urgency: low
Maintainer: Debian Games Team <pkg-games-de...@lists.alioth.debian.org>
Changed-By: Arturo Borrero Gonzalez <arturo.borrero.g...@gmail.com>
Description:
 lierolibre - old-school earthworm action game
 lierolibre-data - data files for lierolibre
 lierolibre-dbg - debugging symbols for lierolibre
Closes: 790363 795437
Changes:
 lierolibre (0.5-1.1) unstable; urgency=low
 .
   * NMU: fix FTBFS on mipsel (Closes: #790363)
   * NMU: fix FTBFS with libconfig 1.5 (Closes: #795437)
Checksums-Sha1:
 bbe41521ab68eb2a9c3bd11995f8fe7760f4535b 2191 lierolibre_0.5-1.1.dsc
 f1f5ed325bcc9fede3ca3256343eb034fb22e42a 7268 lierolibre_0.5-1.1.debian.tar.xz
 63da263c9eb3395ea17e66488874bee6ef07ed76 371730 lierolibre-data_0.5-1.1_all.deb
 91863cbc120198ffe5970099bf3081115cfc4204 1723308 
lierolibre-dbg_0.5-1.1_amd64.deb
 1712ed7aee2c42c86ec37f9b87cc845ec050da9c 265548 lierolibre_0.5-1.1_amd64.deb
Checksums-Sha256:
 8b2ad26d4c77806e3bcb653b6c404ea83695fe91c9f7688d32b7a75614ed3bba 2191 
lierolibre_0.5-1.1.dsc
 ab3d52e380f1adea44c09562ea48bc9cd09d7a1e056f07c930e5218541a6bf51 7268 
lierolibre_0.5-1.1.debian.tar.xz
 5063a05ad0a8ff405d61eea493847caa3ce1d2203454d026e28610b1a3963384 371730 
lierolibre-data_0.5-1.1_all.deb
 60eb05a78f7e06d5fc288709d19b7ff2d0c91aba4f3f432ad494a36e694640b5 1723308 
lierolibre-dbg_0.5-1.1_amd64.deb
 a65259015f23d2a10ff29537badbf4fc002e013bd9523e32b021bc118aa094fc 265548 
lierolibre_0.5-1.1_amd64.deb
Files:
 7d2db11e42094dc025e6452a2731cc55 2191 games optional lierolibre_0.5-1.1.dsc
 11b8abdaaa3ec74494de3d248cbec463 7268 games optional 
lierolibre_0.5-1.1.debian.tar.xz
 2945b249577f2b6d3fc449b53ea3d998 371730 games optional 
lierolibre-data_0.5-1.1_all.deb
 bff05ca0bcd4ac64331a2cff7d7353db 1723308 debug extra 
lierolibre-dbg_0.5-1.1_amd64.deb
 a2cce26221a1a097569fd88f2fa2c27f 265548 games optional 
lierolibre_0.5-1.1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJV10dEAAoJEHxWrP6UeJfYOa0QALt7jfz3evnXpUKwdRDfQJZU
9InCRJJMtCZTI5Kqv5DMlVLzk5bCaonYu+Nm/NLp3ZJqkxOT/LR47BZg3Ry4If1E
8Md5EvmP/slF5lCOm6tDk20ngaNfM/uDRO4dBRAChjGbXVd4Enk+pn2knv98qGyZ
usXrn1O0Rd0qYUK3BlDBTez6YKYkd/kPBirrMXrrxcrPkYW7xj7A0jJG+Y7EF7gq
/iYdbIqnlkVPjxxWl7CZUyqw38LuPDz8Hwi/0iT2xmX/vBCaety5k3Eoyb8VQ79E
RN8D8CHNoiuud5eq2IfVJfcJV2SwMEfy2Hnw/kVPqxq9YWVFeOB5XwXzl37S+KDJ
9twaqxS9kEL7mgurgxnJVcwzehd5CXm+XHLAdJREIXFufvkoBiqfAQeW/hkn8Y4i
h3VZpvkTBQAlScL3VSn6fujAbPoAOoORM2EQspSMi95S0HbiCBiVaJITaQtLwE+E
/qGzxEbHpFTYPla57+QqYi52QQgyFQnEc7S8wEqHv6NkoOF9dD5IyDHIlcZJVBpO
xXnhM1PVqdM2MuPSiWiXl7rO596yYi7qFoTHrBBjpqr+R4rjiTWR7KV4cFQy40NB
VfypA+D87oA7GGuPvfjppIG5dGgDWR0xlXgZUJSYVcX95ih1tT340AnmKuyE8Cdw
z0tB6iHUi8Bn0F3sPZw/
=THCj
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to