melissa-da and boost issue
I tried to install melissa-da using some boost headers. During the compilation I got errors like:
"/vol0004/apps/oss/spack-v0.16.2/opt/spack/linux-rhel8-a64fx/fj-4.6.1/boost-1.74.0-5nqmsljg2xnxsp5tyr2xynbfm3da5ugv/include/boost/throw_exception.hpp", line 171: error: a cast to abstract class "boost::wrapexcept<std::runtime_error>" is not allowed:
pure virtual function "boost::exception_detail::clone_base::clone" has no overrider
pure virtual function "boost::exception_detail::clone_base::rethrow" has no overrider
throw wrapexcept<E>( e, loc );
^
detected during instantiation of "void boost::throw_exception(const E &, const boost::source_location &) [with E=std::runtime_error]" at line 192 of "/vol0004/apps/oss/spack-v0.16.2/opt/spack/linux-rhel8-a64fx/fj-4.6.1/boost-1.74.0-5nqmsljg2xnxsp5tyr2xynbfm3da5ugv/include/boost/uuid/string_generator.hpp"
The issue is that boost uses E and some other capital characters for typenames etc. A possible solution is to replace the defined macros by other names. For instance like this (replaces the macros in all files in repository [no guarantee for correctness])
$> export DBG_FILES=`grep -F "D(" * -nr 2>&1 | egrep -v "No such file or directory" | egrep -v "Binary file" | awk -F":" '{print $1}' | uniq | egrep -v cscope`
$> for f in $DBG_FILES; do export PAT=D; export REP=MDBG; sed -i "s/\( \)$PAT(\|^\(\)\($PAT(\)/\1$REP(/g" $f; unset PAT; unset REP; done
$> export DBG_FILES=`grep -F "L(" * -nr 2>&1 | egrep -v "No such file or directory" | egrep -v "Binary file" | awk -F":" '{print $1}' | uniq | egrep -v cscope`
$> for f in $DBG_FILES; do export PAT=L; export REP=MPRT; sed -i "s/\( \)$PAT(\|^\(\)\($PAT(\)/\1$REP(/g" $f; unset PAT; unset REP; done
$> export DBG_FILES=`grep -F "E(" * -nr 2>&1 | egrep -v "No such file or directory" | egrep -v "Binary file" | awk -F":" '{print $1}' | uniq | egrep -v cscope`
$> for f in $DBG_FILES; do export PAT=E; export REP=MERR; sed -i "s/\( \)$PAT(\|^\(\)\($PAT(\)/\1$REP(/g" $f; unset PAT; unset REP; done