Package: lasi Version: 1.1.0-2 Followup-For: Bug #984083 User: [email protected] Usertags: origin-ubuntu ubuntu-patch X-Debbugs-Cc: [email protected] Control: tags -1 patch
Dear Maintainer, lasi fails to build from source with GCC-11. Fix FTFBFS with C++17/GCC-11, by avoiding dynamic exception specification. GCC 11 defaults to C++17 which does not allow dynamic exception specifications anymore. Replace "throw(std::runtime_error)" with "noexcept(false)" as described in https://gcc.gnu.org/gcc-11/porting_to.html In Ubuntu, the attached patch was applied to achieve the following: * Fix FTBFS with C++17/GCC-11 (Closes: #984083) + debian/patches/fix-gcc11-throw-ftbfs.patch Thanks for considering the patch. Cheers, Lukas -- System Information: Debian Release: 11.0 APT prefers impish APT policy: (500, 'impish') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.13.0-16-generic (SMP w/4 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:en_GB:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru lasi-1.1.0/debian/patches/fix-gcc11-throw-ftbfs.patch lasi-1.1.0/debian/patches/fix-gcc11-throw-ftbfs.patch --- lasi-1.1.0/debian/patches/fix-gcc11-throw-ftbfs.patch 1970-01-01 01:00:00.000000000 +0100 +++ lasi-1.1.0/debian/patches/fix-gcc11-throw-ftbfs.patch 2021-10-15 14:20:05.000000000 +0200 @@ -0,0 +1,22 @@ +Description: Avoid dynamic exception spec, to fix build with C++17 (GCC-11) + GCC 11 defaults to C++17 which does not allow dynamic exception + specifications anymore. Replace "throw(std::runtime_error)" with + "noexcept(false)" as described in https://gcc.gnu.org/gcc-11/porting_to.html +Author: Lukas Märdian <[email protected]> +Origin: vendor, Ubuntu +Bug-Debian: https://bugs.debian.org/984083 +Forwarded: no +Last-Update: 2021-10-15 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- lasi-1.1.0.orig/src/util.h ++++ lasi-1.1.0/src/util.h +@@ -27,7 +27,7 @@ std::ostream& operator<<(std::ostream&, + + /** Converts a freetype return code into an exception. + */ +-inline void evalReturnCode(const int errCode, const char* funcName) throw (std::runtime_error) { ++inline void evalReturnCode(const int errCode, const char* funcName) noexcept(false) { + if (errCode) + throw std::runtime_error(std::string("Error returned from ") + funcName); + } diff -Nru lasi-1.1.0/debian/patches/series lasi-1.1.0/debian/patches/series --- lasi-1.1.0/debian/patches/series 2014-06-19 13:47:21.000000000 +0200 +++ lasi-1.1.0/debian/patches/series 2021-10-15 14:12:42.000000000 +0200 @@ -1 +1,2 @@ fix-freetype-ftbfs +fix-gcc11-throw-ftbfs.patch

