Giter VIP home page Giter VIP logo

Comments (10)

dancooke avatar dancooke commented on August 30, 2024

This is weird. I can replicate this in a CentOS 7 Docker container. It looks like the wrong libstdc++ ABI is getting selected for some reason. I'll look into it!

from octopus.

ink1 avatar ink1 commented on August 30, 2024

Daniel, thank you for looking into this.

from octopus.

dancooke avatar dancooke commented on August 30, 2024

The problem is that the GCC you're using wasn't configured to use a C++11 compatible ABI by default. Probably because you obtained GCC from RPM, which for reasons I don't quite understand, wasn't configured with the new C++ ABI (see my Stack Overflow question).

Unfortunately, the only way I've managed to resolve this is to install GCC 7 manually from source. You will also need to reinstall Boost and make sure it's compiled with the new GCC install. I've put together a Dockerfile (see below) which installs octopus on a fresh Centos 7 image. You should be able use this as a guide. In particular, it shows how to manually install GCC 7 with the correct ABI, and also how to install Boost correctly. Don't forget to remove the GCC 7 (including the packaged libstdc++) and Boost libraries you previously installed. Let me know if you need any help.

You will need the latest develop branch version if you want to use the install.py helper script as shown here; I've only just added the c_compiler option to this. It turns out specifying the C compiler, in addition to the C++ compiler, is important on some systems (as you were already doing, but with cmake directly).

# Dockerfile to install octopus, including any dependencies, on a fresh Centos 7 image.

FROM centos:latest

# Install all packaged dependencies
RUN yum -y update
RUN yum -y install \
    which \
    yum-utils \
    gcc \
    gcc-c++ \
    make \
    wget \
    git \
    autoconf \
    openssl \
    bzip2.x86_64 \
    bzip2-devel.x86_64 \
    xz-devel.x86_64 \
    zlib-devel.x86_64 \
    libcurl-devel.x86_64

# Install GCC 7
WORKDIR /tmp
RUN wget ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-7.2.0/gcc-7.2.0.tar.gz
RUN tar -xvzf gcc-7.2.0.tar.gz
WORKDIR /tmp/gcc-7.2.0
RUN contrib/download_prerequisites
WORKDIR /tmp
RUN mkdir mkdir gcc-7.2.0-build
WORKDIR /tmp/gcc-7.2.0-build
RUN ../gcc-7.2.0/configure \
    --enable-bootstrap \
    --enable-languages=c,c++,fortran,lto \
    --with-bugurl=http://bugzilla.redhat.com/bugzilla \
    --enable-shared \
    --enable-threads=posix \
    --enable-checking=release \
    --disable-multilib \
    --with-system-zlib \
    --enable-__cxa_atexit \
    --disable-libunwind-exceptions \
    --enable-gnu-unique-object \
    --enable-linker-build-id \
    --with-gcc-major-version-only \
    --enable-plugin \
    --with-linker-hash-style=gnu \
    --enable-initfini-array \
    --enable-libmpx \
    --enable-gnu-indirect-function \
    --with-tune=generic \
    --build=x86_64-redhat-linux
RUN make -j4
RUN make install
ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64

# Install Python3
WORKDIR /tmp
RUN yum-builddep -y python
RUN curl -O https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
RUN tar xf Python-3.5.0.tgz
WORKDIR /tmp/Python-3.5.0
RUN ./configure
RUN make -j2
RUN make install

# Install CMake
WORKDIR /tmp
RUN wget https://cmake.org/files/v3.9/cmake-3.9.6.tar.gz
RUN tar -xzvf cmake-3.9.6.tar.gz
WORKDIR /tmp/cmake-3.9.6
RUN ./bootstrap --prefix=/usr/local
RUN make -j2
RUN make install

# Install Boost
WORKDIR /tmp
RUN wget -O boost_1_65_1.tar.gz http://sourceforge.net/projects/boost/files/boost/1.65.1/boost_1_65_1.tar.gz/download
RUN tar xzvf boost_1_65_1.tar.gz
WORKDIR /tmp/boost_1_65_1
RUN ./bootstrap.sh --prefix=/usr/local --without-libraries=python,mpi
RUN ./b2 cxxflags="-std=c++11"
RUN ./b2 install

# Install htslib
WORKDIR /tmp
RUN git clone https://github.com/samtools/htslib.git
WORKDIR /tmp/htslib
RUN autoheader
RUN autoconf
RUN ./configure
RUN make -j4
RUN make install

# Install Octopus
WORKDIR /tmp
RUN git clone https://github.com/luntergroup/octopus.git
WORKDIR /tmp/octopus
RUN ./install.py --root --threads=2 --cxx_compiler=/usr/local/bin/g++ --c_compiler=/usr/local/bin/gcc

WORKDIR /home
RUN octopus --help

from octopus.

ink1 avatar ink1 commented on August 30, 2024

Thank you for providing the Dockerfile. This is helpful. I did build gcc 7.2 from source myself but selected compatible ABI because I wanted to avoid rebuilding the full software stack required for Octopus. Selecting incompatible ABI could be messy and error prone path so wanted to avoid this. Docker is one way to tackle this but we don't support it on our HPC cluster. Do you think Singularity can be used to wrap this up?

from octopus.

dancooke avatar dancooke commented on August 30, 2024

The only thing that would need rebuilding is Boost. You could even have a separate Boost installation if you don't want to overwrite your existing one. You may need to set the boost root path for cmake (either with DBOOST_ROOT with cmake directly, or --boost with the python installer) if you do so. I don't really understand the rational of having GCC 7 configured with a non-C++11 ABI - it severely limits the functionality of the compiler. The Ubuntu maintained GCC package doesn't do this.

I wouldn't recommend using Docker for production runs anyway as it will likely run much slower the a native install - I just use it for debugging. I'm afraid I don't have any experience with Singularity.

from octopus.

dancooke avatar dancooke commented on August 30, 2024

I'm going to close this as there isn't really anything I can do - essentially the issue is an unmet requirement. Perhaps I'll look at providing pre-compiled binaries in future releases.

from octopus.

lachlansimpson avatar lachlansimpson commented on August 30, 2024

Hmmm. I also seem to have run into this problem. As noted elsewhere, I used devtoolset-7 install rather than install gcc 7 myself.

./scripts/install.py --boost /config/binaries/boost/1.68.0/

[ 35%] Building CXX object src/CMakeFiles/octopus.dir/core/callers/caller_builder.cpp.o
[ 36%] Building CXX object src/CMakeFiles/octopus.dir/core/callers/caller_factory.cpp.o
/config/source/octopus/src/utils/memory_footprint.cpp: In function ‘boost::optional<octopus::MemoryFootprint> octopus::parse_footprint(std::string)’:
/config/source/octopus/src/utils/memory_footprint.cpp:189:64: error: no matching function for call to ‘std::basic_string<char>::erase(__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >&, std::basic_string<char>::const_iterator)’
         footprint_str.erase(last_digit_itr, cend(footprint_str));
                                                                ^
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:52:0,
                 from /config/source/octopus/src/utils/memory_footprint.hpp:8,
                 from /config/source/octopus/src/utils/memory_footprint.cpp:4:
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::
size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       erase(size_type __pos = 0, size_type __n = npos)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note:   no known conversion for argument 1 from ‘__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >’ to ‘std::basic_string<char>::size_type {aka long unsigned int}’
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::
char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __position)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note:   candidate expects 1 argument, 2 provided
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator, std::basic_string<_CharT, _Traits, _
Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __first, iterator __last);
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note:   no known conversion for argument 1 from ‘__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >’ to ‘std::basic_string<char>::iterator {aka __gnu_cxx::__normal_iterator<char*, std::basic_st
ring<char> >}’
make[2]: *** [src/CMakeFiles/octopus.dir/build.make:752: src/CMakeFiles/octopus.dir/utils/memory_footprint.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/config/source/octopus/src/utils/genotype_reader.cpp: In function ‘boost::optional<octopus::BasicAllele<octopus::ContigRegion> > octopus::{anonymous}::make_allele(const octopus::VcfRecord&, octopus::VcfRecord::NucleotideSequence, int)’:
/config/source/octopus/src/utils/genotype_reader.cpp:127:75: error: no matching function for call to ‘std::basic_string<char>::erase(std::basic_string<char>::const_iterator, __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >&)’
         allele_sequence.erase(std::cbegin(allele_sequence), first_base_itr);
                                                                           ^
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:52:0,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/stdexcept:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/array:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/tuple:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/functional:54,
                 from /config/source/octopus/src/utils/genotype_reader.hpp:7,
                 from /config/source/octopus/src/utils/genotype_reader.cpp:4:
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::
size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       erase(size_type __pos = 0, size_type __n = npos)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note:   no known conversion for argument 1 from ‘std::basic_string<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >}’ to ‘std::basic_string<char>::size_type {aka lo
ng unsigned int}’
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::
char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __position)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note:   candidate expects 1 argument, 2 provided
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator, std::basic_string<_CharT, _Traits, _
Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __first, iterator __last);
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note:   no known conversion for argument 1 from ‘std::basic_string<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >}’ to ‘std::basic_string<char>::iterator {aka __g
nu_cxx::__normal_iterator<char*, std::basic_string<char> >}’
/config/source/octopus/src/utils/genotype_reader.cpp:132:69: error: no matching function for call to ‘std::basic_string<char>::erase(std::basic_string<char>::const_iterator, __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >&)’
         allele_sequence.erase(std::cbegin(allele_sequence), p.second);
                                                                     ^
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:52:0,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/stdexcept:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/array:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/tuple:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/functional:54,
                 from /config/source/octopus/src/utils/genotype_reader.hpp:7,
                 from /config/source/octopus/src/utils/genotype_reader.cpp:4:
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::
size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       erase(size_type __pos = 0, size_type __n = npos)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note:   no known conversion for argument 1 from ‘std::basic_string<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >}’ to ‘std::basic_string<char>::size_type {aka lo
ng unsigned int}’
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::
char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __position)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note:   candidate expects 1 argument, 2 provided
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator, std::basic_string<_CharT, _Traits, _
Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __first, iterator __last);
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note:   no known conversion for argument 1 from ‘std::basic_string<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >}’ to ‘std::basic_string<char>::iterator {aka __g
nu_cxx::__normal_iterator<char*, std::basic_string<char> >}’
/config/source/octopus/src/utils/genotype_reader.cpp: In function ‘std::pair<std::vector<octopus::BasicAllele<octopus::GenomicRegion> >, bool> octopus::get_called_alleles(const octopus::VcfRecord&, const SampleName&, bool)’:
/config/source/octopus/src/utils/genotype_reader.cpp:217:82: error: no matching function for call to ‘std::basic_string<char>::erase(std::basic_string<char>::const_iterator, __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >)’
             ref.erase(std::cbegin(ref), std::next(std::cbegin(ref), *max_ref_pad));
                                                                                  ^
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:52:0,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/stdexcept:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/array:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/tuple:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/functional:54,
                 from /config/source/octopus/src/utils/genotype_reader.hpp:7,
                 from /config/source/octopus/src/utils/genotype_reader.cpp:4:
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::
size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       erase(size_type __pos = 0, size_type __n = npos)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note:   no known conversion for argument 1 from ‘std::basic_string<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >}’ to ‘std::basic_string<char>::size_type {aka lo
ng unsigned int}’
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::
char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __position)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note:   candidate expects 1 argument, 2 provided
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator, std::basic_string<_CharT, _Traits, _
Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __first, iterator __last);
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note:   no known conversion for argument 1 from ‘std::basic_string<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >}’ to ‘std::basic_string<char>::iterator {aka __g
nu_cxx::__normal_iterator<char*, std::basic_string<char> >}’
/config/source/octopus/src/utils/genotype_reader.cpp:227:59: error: no matching function for call to ‘std::basic_string<char>::erase(std::basic_string<char>::const_iterator, __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >&)’
                 allele.erase(std::cbegin(allele), p.second);
                                                           ^
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:52:0,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/stdexcept:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/array:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/tuple:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/functional:54,
                 from /config/source/octopus/src/utils/genotype_reader.hpp:7,
                 from /config/source/octopus/src/utils/genotype_reader.cpp:4:
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::
size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       erase(size_type __pos = 0, size_type __n = npos)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note:   no known conversion for argument 1 from ‘std::basic_string<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >}’ to ‘std::basic_string<char>::size_type {aka lo
ng unsigned int}’
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::
char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __position)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note:   candidate expects 1 argument, 2 provided
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator, std::basic_string<_CharT, _Traits, _
Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __first, iterator __last);
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note:   no known conversion for argument 1 from ‘std::basic_string<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >}’ to ‘std::basic_string<char>::iterator {aka __g
nu_cxx::__normal_iterator<char*, std::basic_string<char> >}’
/config/source/octopus/src/utils/genotype_reader.cpp: In instantiation of ‘octopus::get_called_alleles(const octopus::VcfRecord&, const SampleName&, bool)::<lambda(auto:163&)> [with auto:163 = std::basic_string<char>]’:
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/stl_algo.h:3884:5:   required from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<std::basic_string<char>*, std::vector<std::basic_string<char> > >; _Funct = octopus::get_called_alleles(cons
t octopus::VcfRecord&, const SampleName&, bool)::<lambda(auto:163&)>]’
/config/source/octopus/src/utils/genotype_reader.cpp:211:10:   required from here
/config/source/octopus/src/utils/genotype_reader.cpp:199:17: error: no matching function for call to ‘std::basic_string<char>::erase(std::basic_string<char>::const_iterator, __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >)’
                 allele.erase(std::cbegin(allele), std::next(std::cbegin(allele), pad_size));
                 ^~~~~~
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:52:0,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/stdexcept:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/array:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/tuple:39,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/functional:54,
                 from /config/source/octopus/src/utils/genotype_reader.hpp:7,
                 from /config/source/octopus/src/utils/genotype_reader.cpp:4:
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::
size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       erase(size_type __pos = 0, size_type __n = npos)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4613:7: note:   no known conversion for argument 1 from ‘std::basic_string<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >}’ to ‘std::basic_string<char>::size_type {aka lo
ng unsigned int}’
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::
char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __position)
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4629:7: note:   candidate expects 1 argument, 2 provided
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator, std::basic_string<_CharT, _Traits, _
Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]
       erase(iterator __first, iterator __last);
       ^~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:4649:7: note:   no known conversion for argument 1 from ‘std::basic_string<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >}’ to ‘std::basic_string<char>::iterator {aka __g
nu_cxx::__normal_iterator<char*, std::basic_string<char> >}’
make[2]: *** [src/CMakeFiles/octopus.dir/build.make:778: src/CMakeFiles/octopus.dir/utils/genotype_reader.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:281: src/CMakeFiles/octopus.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

from octopus.

dancooke avatar dancooke commented on August 30, 2024

@datakid As noted in my post above, the GCC7 yum package was built using the pre-C++11 ABI, which basically makes it incompatible with the C++11 standard library without some code hacks. This seems like a very strange decision to me; it's not like this on the Ubunutu package. So your choices are to either build GCC7 (or even 8 now) yourself (also in my post above), or you could just use the Bioconda package.

from octopus.

lachlansimpson avatar lachlansimpson commented on August 30, 2024

Sorry, I see the same complaint elsewhere. Cheers

from octopus.

lachlansimpson avatar lachlansimpson commented on August 30, 2024

For those that come after me, here's the relevant answer on SO.

from octopus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.