forwarded 984114 https://github.com/lastfm/liblastfm/issues/39
tags 984114 + patch
thanks

On Wed, Mar 03, 2021 at 04:14:30PM +0000, Matthias Klose wrote:
> [...]
> /<<PKGBUILDDIR>>/src/fingerprint/Fingerprint.cpp:97:60: error: ISO C++17 does 
> not allow dynamic exception specifications
>    97 | lastfm::Fingerprint::generate( FingerprintableSource* ms ) throw( 
> Error )
>       |                                                            ^~~~~
> /<<PKGBUILDDIR>>/src/fingerprint/Fingerprint.cpp:309:91: error: ISO C++17 
> does not allow dynamic exception specifications
>   309 | lastfm::Fingerprint::decode( QNetworkReply* reply, bool* 
> complete_fingerprint_requested ) throw( Error )
>       |                                                                       
>                     ^~~~~
> make[4]: *** 
> [src/fingerprint/CMakeFiles/lastfm_fingerprint5.dir/build.make:111: 
> src/fingerprint/CMakeFiles/lastfm_fingerprint5.dir/Fingerprint.cpp.o] Error 1
> [...]

FWIW, I can confirm that 1.0.9-1.1 still FTBFS in the manner originally
reported in this bug, but with the attached debdiff implementing the fix
from upstream I was able to build it again.

This is referenced in https://github.com/lastfm/liblastfm/issues/39 from
where I extracted the patch.

HTH, and please feel free to adjust to your liking.

Cheers,
Florian
diff -Nru liblastfm-1.0.9/debian/changelog liblastfm-1.0.9/debian/changelog
--- liblastfm-1.0.9/debian/changelog    2019-08-23 23:37:23.000000000 +0200
+++ liblastfm-1.0.9/debian/changelog    2022-01-14 22:30:53.000000000 +0100
@@ -1,3 +1,11 @@
+liblastfm (1.0.9-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS with GCC-11 by removing dynamic exception specifications,
+    patch taken from upstream. (Closes: #984114)
+
+ -- Florian Ernst <florian_er...@gmx.net>  Fri, 14 Jan 2022 22:30:53 +0100
+
 liblastfm (1.0.9-1.1) unstable; urgency=medium

   * Non-maintainer upload.
diff -Nru liblastfm-1.0.9/debian/patches/fix_gcc11_ftbfs.patch 
liblastfm-1.0.9/debian/patches/fix_gcc11_ftbfs.patch
--- liblastfm-1.0.9/debian/patches/fix_gcc11_ftbfs.patch        1970-01-01 
01:00:00.000000000 +0100
+++ liblastfm-1.0.9/debian/patches/fix_gcc11_ftbfs.patch        2022-01-14 
22:30:47.000000000 +0100
@@ -0,0 +1,46 @@
+Description: Fix GCC-11 build issue
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984114
+Index: liblastfm-1.0.9/src/fingerprint/Fingerprint.cpp
+===================================================================
+--- liblastfm-1.0.9.orig/src/fingerprint/Fingerprint.cpp
++++ liblastfm-1.0.9/src/fingerprint/Fingerprint.cpp
+@@ -94,7 +94,7 @@ lastfm::Fingerprint::data() const
+
+
+ void
+-lastfm::Fingerprint::generate( FingerprintableSource* ms ) throw( Error )
++lastfm::Fingerprint::generate( FingerprintableSource* ms )
+ {
+     //TODO throw if we can't get required metadata from the track object
+
+@@ -306,7 +306,7 @@ lastfm::Fingerprint::submit() const
+
+
+ void
+-lastfm::Fingerprint::decode( QNetworkReply* reply, bool* 
complete_fingerprint_requested ) throw( Error )
++lastfm::Fingerprint::decode( QNetworkReply* reply, bool* 
complete_fingerprint_requested )
+ {
+     // The response data will consist of a number and a string.
+     // The number is the fpid and the string is either FOUND or NEW
+Index: liblastfm-1.0.9/src/fingerprint/Fingerprint.h
+===================================================================
+--- liblastfm-1.0.9.orig/src/fingerprint/Fingerprint.h
++++ liblastfm-1.0.9/src/fingerprint/Fingerprint.h
+@@ -71,7 +71,7 @@ namespace lastfm
+         };
+
+         /** This is CPU intensive, do it in a thread in your GUI application 
*/
+-        void generate( FingerprintableSource* ) throw( Error );
++        void generate( FingerprintableSource* );
+
+         /** Submits the fingerprint data to Last.fm in order to get a 
FingerprintId
+           * back. You need to wait for the QNetworkReply to finish before you 
can
+@@ -82,7 +82,7 @@ namespace lastfm
+           * will be valid. Otherwise we will throw. You always get a valid id
+           * or a throw.
+           */
+-        void decode( QNetworkReply*, bool* 
lastfm_needs_a_complete_fingerprint = 0 ) throw( Error );
++        void decode( QNetworkReply*, bool* 
lastfm_needs_a_complete_fingerprint = 0 );
+     };
+
+
diff -Nru liblastfm-1.0.9/debian/patches/series 
liblastfm-1.0.9/debian/patches/series
--- liblastfm-1.0.9/debian/patches/series       2015-11-20 16:42:23.000000000 
+0100
+++ liblastfm-1.0.9/debian/patches/series       2022-01-14 22:27:26.000000000 
+0100
@@ -1,2 +1,3 @@
 change_target-name.patch
 strip_README.patch
+fix_gcc11_ftbfs.patch

Reply via email to