comprna/RATTLE

Compile error 'is not a member of std'

dn-ra opened this issue · 5 comments

dn-ra commented

Hello,

Keen to try out this new tool. Thanks for your efforts.
I am having an error while compiling, it's throwing an error:
error: 'invalid_argument' is not a member of 'std'

Full error is here:

-- Configuring done
-- Generating done
-- Build files have been written to: /data/projects/punim1068/rattle/RATTLE/spoa/build
(base) [danrawlinson@spartan-login2 build]$ make
[ 20%] Building CXX object CMakeFiles/spoa.dir/src/alignment_engine.cpp.o
/data/projects/punim1068/rattle/RATTLE/spoa/src/alignment_engine.cpp: In function 'std::unique_ptr<spoa::AlignmentEngine> spoa::createAlignmentEngine(spoa::AlignmentType, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t)':
/data/projects/punim1068/rattle/RATTLE/spoa/src/alignment_engine.cpp:37:20: error: 'invalid_argument' is not a member of 'std'
   37 |         throw std::invalid_argument("[spoa::createAlignmentEngine] error: "
      |                    ^~~~~~~~~~~~~~~~
/data/projects/punim1068/rattle/RATTLE/spoa/src/alignment_engine.cpp:41:20: error: 'invalid_argument' is not a member of 'std'
   41 |         throw std::invalid_argument("[spoa::createAlignmentEngine] error: "
      |                    ^~~~~~~~~~~~~~~~
/data/projects/punim1068/rattle/RATTLE/spoa/src/alignment_engine.cpp:45:20: error: 'invalid_argument' is not a member of 'std'
   45 |         throw std::invalid_argument("[spoa::createAlignmentEngine] error: "
      |                    ^~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/spoa.dir/src/alignment_engine.cpp.o] Error 1
make[1]: *** [CMakeFiles/spoa.dir/all] Error 2
make: *** [all] Error 2

OS version:

NAME="Red Hat Enterprise Linux Server"
VERSION="7.8 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.8"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.8:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.8
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.8"

And module versions:

Currently Loaded Modules:
  1) slurm/latest   2) showq/0.15   3) spartan/2016-03   4) gcccore/10.1.0   5) zlib/1.2.11   6) binutils/2.34   7) gcc/10.1.0   8) ncurses/6.2   9) bzip2/1.0.8  10) curl/7.69.1  11) cmake/3.16.4

Any idea what the problem might be?

Hello,

this looks like a problem of the spoa library. Try to add the following line to the spoa/include/spoa/graph.hpp file right after the last include (line 14):
#include <stdexcept>

Then try to compile again and see if that fixes the problem.

Best,
Ivan

Hello,
Thank you for developing this tool. I have installed it on my computer and the installation worked fine. But I am currently trying to install it on a server and I am encountering the same problem as dn-ra even after trying the suggested solution. When I try to build spoa outside of RATTLE directory, it works. Does someone have an idea of what is happening?
I apologize in advance if I should not have posted here.
Thank you in advance,
Lan Anh

Hello,
Yes I did. It still did not work. However, I tried downgrading gcc and g++ from 11.2 to 9.4.0 and it worked.
Thank you,
Lan Anh