Hi everyone,
looks like upstream fixed this already [0]. The fix is easily imported
into packaging, see attached debdiff.
I would be happy to NMU this within a week or so if there is no action
by the maintainer to avoid mysql++ to be removed from testing. Please
let me know if this is not wanted. Also addressing this mail to the
previous uploader of the package.
mysql++ is a dependency of my augustus package, which I would prefer not
to be removed from testing.
Thanks
Sascha
[0]
https://github.com/tangentsoft/mysqlpp/commit/df890798c8017dee79d5e4ee0867e2dae44ca5b5
diff -Nru mysql++-3.2.5/debian/changelog mysql++-3.2.5/debian/changelog
--- mysql++-3.2.5/debian/changelog 2020-04-23 03:37:47.0 +0200
+++ mysql++-3.2.5/debian/changelog 2021-11-22 13:01:43.0 +0100
@@ -1,3 +1,11 @@
+mysql++ (3.2.5-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Incorporate patch from upstream to fix build on newer GCC versions.
+(Closes: #997248)
+
+ -- Sascha Steinbiss Mon, 22 Nov 2021 13:01:43 +0100
+
mysql++ (3.2.5-2) unstable; urgency=medium
* Update to Standards-Version 4.5.0 (no changes)
diff -Nru mysql++-3.2.5/debian/patches/rvalue_fix_example.patch mysql++-3.2.5/debian/patches/rvalue_fix_example.patch
--- mysql++-3.2.5/debian/patches/rvalue_fix_example.patch 1970-01-01 01:00:00.0 +0100
+++ mysql++-3.2.5/debian/patches/rvalue_fix_example.patch 2021-11-22 12:55:30.0 +0100
@@ -0,0 +1,57 @@
+From df890798c8017dee79d5e4ee0867e2dae44ca5b5 Mon Sep 17 00:00:00 2001
+From: tangent
+Date: Sat, 19 Sep 2020 17:24:45 +
+Subject: [PATCH] Exchanged the "file slurp" idiom used in
+ examples/load_jpeg.cpp for one that also works in C++11, which complains of
+ "address to rvalue" with the original formulation.
+
+FossilOrigin-Name: b062e656cc2ed9356c6f757837580a2145251c5294e382f8e2c1ad3e74a91cdd
+---
+ examples/load_jpeg.cpp | 18 ++
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+--- a/examples/load_jpeg.cpp
b/examples/load_jpeg.cpp
+@@ -2,9 +2,9 @@
+ load_jpeg.cpp - Example showing how to insert BLOB data into the
+ database from a file.
+
+- Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
+- (c) 2004-2009 by Educational Technology Resources, Inc. Others may
+- also hold copyrights on code in this file. See the CREDITS.txt file
++ Copyright © 1998 by Kevin Atkinson, © 1999-2001 by MySQL AB, and
++ © 2004-2009 by Educational Technology Resources, Inc. Others may
++ also hold copyrights on code in this file. See the CREDITS.md file
+ in the top directory of the distribution for details.
+
+ This file is part of MySQL++.
+@@ -80,14 +80,16 @@
+ img_name = cmdline.extra_args()[0];
+ ifstream img_file(img_name.c_str(), ios::binary);
+ if (img_file) {
+- // Slurp file contents into RAM with minimum copying. (Idiom
+- // explained here: http://stackoverflow.com/questions/116038/)
++ // Slurp file contents into RAM with only a single copy, per
++ // https://stackoverflow.com/a/116220 It also explains why
++// there is no concise zero-copy option here.
+ //
+ // By loading the file into a C++ string (stringstream::str())
+ // and assigning that directly to a mysqlpp::sql_blob, we avoid
+ // truncating the binary data at the first null character.
+- img.data.data = static_cast(
+-&(stringstream() << img_file.rdbuf()))->str();
++stringstream ss;
++ss << img_file.rdbuf();
++ img.data.data = ss.str();
+
+ // Check JPEG data for sanity.
+ const char* error;
+@@ -130,7 +132,7 @@
+ // as C strings, thus causing null-truncation. The fact
+ // that we're using SSQLS here is a side issue, simply
+ // demonstrating that mysqlpp::Null is
+- // now legal in SSQLS, as of MySQL++ 3.0.7.
++// now legal in SSQLS, as of MySQL++ 3.0.7.
+ Query query = con.query();
+ query.insert(img);
+ SimpleResult res = query.execute();
diff -Nru mysql++-3.2.5/debian/patches/series mysql++-3.2.5/debian/patches/series
--- mysql++-3.2.5/debian/patches/series 2020-04-23 03:37:47.0 +0200
+++ mysql++-3.2.5/debian/patches/series 2021-11-22 12:54:57.0 +0100
@@ -1,2 +1,3 @@
do_not_link_against_libmysqlclient_r.patch
discover_localtime_r_with_AC_TRY_COMPILE.patch
+rvalue_fix_example.patch