"using std::terminate_handler" fails

I am trying to compile Mailspring on Fedora 34. I installed all dependencies as per the Mailspring documentation. Compilation fails with

npm ERR! ../src/cld.cc:5:12: Fehler: »terminate_handler« wurde nicht innerhalb von »std« deklariert
npm ERR!     5 | using std::terminate_handler;
npm ERR!       |            ^~~~~~~~~~~~~~~~~

The first line roughly translates to “terminate_handler not declared within std”. It’s weird because libstdc++ is installed according to dnf:

Installierte Pakete
libstdc++.i686                                                                       11.1.1-3.fc34                                                               @updates
libstdc++.x86_64                                                                     11.1.1-3.fc34                                                               @updates
libstdc++-devel.i686                                                                 11.1.1-3.fc34                                                               @updates
libstdc++-devel.x86_64                                                               11.1.1-3.fc34                                                               @updates

Do you have any suggestions on what else I have to install/configure to make compilation work?



1 Like

They actually provide an RPM package:

I know. I was trying to compile it from sources because I wanted to fix a bug.

Maybe the code in question forgot to #include <exception>?

1 Like

The problem turned out to be caused by cld 2.6.0 (a dependency of Mailspring) which seems to miss #include <exception>. Upgrading the dependency to 2.7.0 fixed the issue.

1 Like