Npm install fails: terminate_handler not declared within "std"

Hi,
I am trying to compile Mailspring on Fedora 34. I installed all dependencies as per the documentation.
npm install 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 I am getting this error 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?

Thanks!

Best,
Martin

I found that the issue is caused by version 2.6.0 of cld that is pulled in as a dependency. Upgrading cld to 2.7.0 solves the issue for me.

2 Likes

@mfs I am facing the same issue now (after switching to Ubuntu 21.10). How exactly did you resolve the cld dependency? Whenever I try to upgrade cld it still runs a node-gyp rebuild against the 2.6.0 version that breaks.