Subject: htmlcxx-0.87 fails to build
From: Arne Babenhauserheide <[email-masked]>
To: [email-masked]
Date: Thu, 18 May 2023 17:17:48 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

To reproduce: guix build htmlcxx — it blocks several dependents.

The relevant part of the error:

In file included from CharsetConverter.cc:5:
CharsetConverter.h:20:90: error: ISO C++17 does not allow dynamic exception specifications
   20 |                         CharsetConverter(const std::string &from, const std::string &to) throw (Exception);

These were deprecated in C++11 and removed in C++17: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html

So this may just need compiler parameters to set C++11 instead of C++17
as target.

A first step towards the fix might be

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 6e79fe99b8..9c1319f3af 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -8130,6 +8130,9 @@ (define-public htmlcxx
        (sha256
         (base32 "1j3mzjlczjrk4ahc43s6kzpvzypzjmqz4sillnca5yadrwwgjf2x"))))
     (build-system gnu-build-system)
+    (arguments
+     ;; ISO C++17 does not allow dynamic exception specifications
+     `(#:configure-flags '("CXXFLAGS=-std=c++11")))
     (home-page "https://htmlcxx.sourceforge.net/")
     (synopsis "Simple non-validating CSS1 and HTML parser for C++")
     (description "htmlcxx is a simple non-validating CSS1 and HTML parser for

The complete log is attached.

Best wishes,
Arne

-- 
unpolitisch sein
heißt politisch sein, 
ohne es zu merken. 
- ArneBab