XenC icon indicating copy to clipboard operation
XenC copied to clipboard

error: ISO C++17 does not allow dynamic exception specifications

Open jiaohuix opened this issue 1 year ago • 0 comments

Error Message: root@dsw-252469-64d6fd99c7-hfsns:/mnt/workspace/XenC# make Consolidate compiler generated dependencies of target XenC [ 1%] Building CXX object CMakeFiles/XenC.dir/src/Xen.cpp.o In file included from /mnt/workspace/XenC/src/../include/utils/../kenlm/lm/model.hh:13, from /mnt/workspace/XenC/src/../include/utils/../XenLMken.h:43, from /mnt/workspace/XenC/src/../include/utils/../eval.h:41, from /mnt/workspace/XenC/src/../include/utils/xenio.h:37, from /mnt/workspace/XenC/src/../include/Xen.h:39, from /mnt/workspace/XenC/src/Xen.cpp:31: /mnt/workspace/XenC/src/../include/utils/../kenlm/lm/vocab.hh:214:43: error: ISO C++17 does not allow dynamic exception specifications 214 | void MissingUnknown(const Config &config) throw(SpecialWordMissingException); | ^~~~~ /mnt/workspace/XenC/src/../include/utils/../kenlm/lm/vocab.hh:215:67: error: ISO C++17 does not allow dynamic exception specifications 215 | void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException); | ^~~~~ /mnt/workspace/XenC/src/../include/utils/../kenlm/lm/vocab.hh:217:85: error: ISO C++17 does not allow dynamic exception specifications 217 | template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) throw(SpecialWordMissingException) { | ^~~~~ make[2]: *** [CMakeFiles/XenC.dir/build.make:76:CMakeFiles/XenC.dir/src/Xen.cpp.o] 错误 1 make[1]: *** [CMakeFiles/Makefile2:83:CMakeFiles/XenC.dir/all] 错误 2 make: *** [Makefile:91:all] 错误 2

Solution:


sed -i "s/throw(SpecialWordMissingException)//g" include/kenlm/lm/vocab.hh 

sed -i "s/throw(SpecialWordMissingException)//g" src/kenlm/lm/vocab.cc

jiaohuix avatar Jan 15 '24 04:01 jiaohuix