Illumina / strelka

Strelka2 germline and somatic small variant caller
GNU General Public License v3.0
357 stars 103 forks source link

Compile error when building version 2.9.0 #31

Closed dancooke closed 6 years ago

dancooke commented 6 years ago

I'm trying to build Strelka 2.9.0 from source, but I get a compile error:

$ git clone https://github.com/Illumina/strelka.git && cd strelka
$ mkdir bin
$ mkdir build && cd build
$ export CC=gcc-7
$ export CXX=g++-7
$ ../configure --jobs=4 --prefix=../bin

cmake version 3.9.6 (>= 2.8.12) is already installed
Using existing cmake: cmake
-- ==== Initializing project cmake configuration ====
-- BUILD_TYPE: Release
-- CMAKE_PARALLEL: 4
-- TARGET_ARCHITECTURE: x86_64
-- install prefix: /data/apps/strelka/bin
-- Boost version: 1.65.1
-- Building external tools
-- zlib found
-- Verifying target directories access
-- No ccache found
-- Using compiler: g++ version 7
-- Building in developer mode: treating compiler warnings as errors
-- Adding c++ library subdirectory: blt_util
-- Adding c++ test subdirectory:    blt_util/test
-- Adding c++ library subdirectory: common
-- Adding c++ library subdirectory: htsapi
-- Adding c++ test subdirectory:    htsapi/test
-- Adding c++ library subdirectory: appstats
-- Adding c++ library subdirectory: options
-- Adding c++ library subdirectory: errorAnalysis
-- Adding c++ library subdirectory: calibration
-- Adding c++ library subdirectory: blt_common
-- Adding c++ test subdirectory:    blt_common/test
-- Adding c++ library subdirectory: assembly
-- Adding c++ test subdirectory:    assembly/test
-- Adding c++ library subdirectory: alignment
-- Adding c++ test subdirectory:    alignment/test
-- Adding c++ library subdirectory: starling_common
-- Adding c++ test subdirectory:    starling_common/test
-- Adding c++ library subdirectory: strelka_common
-- Adding c++ library subdirectory: DumpSequenceErrorCounts
-- Adding c++ library subdirectory: EstimateParametersFromErrorCounts
-- Adding c++ library subdirectory: EstimateVariantErrorRates
-- Adding c++ library subdirectory: GetChromDepth
-- Adding c++ library subdirectory: GetRegionDepth
-- Adding c++ library subdirectory: GetSequenceErrorCounts
-- Adding c++ library subdirectory: MergeRunStats
-- Adding c++ library subdirectory: MergeSequenceErrorCounts
-- Adding c++ library subdirectory: starling
-- Adding c++ test subdirectory:    starling/test
-- Adding c++ library subdirectory: strelka
-- Adding c++ test subdirectory:    strelka/test
-- Adding c++ library subdirectory: strelkaNoiseExtractor
-- Adding c++ program subdirectory: bin
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Doxygen: DOXYGEN_EXECUTABLE-NOTFOUND. Dot: DOXYGEN_DOT_EXECUTABLE-NOTFOUND.
-- Configuring done
-- Generating done
-- Build files have been written to: /data/apps/strelka/build

The build directory /data/apps/strelka/build was configured successfully

Type "make -C /data/apps/strelka/build" to build

$ make -j4 install

...

[ 30%] Building CXX object src/c++/lib/errorAnalysis/CMakeFiles/strelka_errorAnalysis.dir/SequenceErrorCounts.cpp.o
In file included from /usr/local/include/boost/serialization/map.hpp:25:0,
                 from /data/apps/strelka/src/c++/lib/errorAnalysis/BasecallErrorCounts.hh:27,
                 from /data/apps/strelka/src/c++/lib/errorAnalysis/SequenceErrorCounts.hh:26,
                 from /data/apps/strelka/src/c++/lib/errorAnalysis/SequenceErrorCounts.cpp:24:
/usr/local/include/boost/serialization/access.hpp: In instantiation of ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = boost::array<unsigned int, 6>]’:
/usr/local/include/boost/serialization/serialization.hpp:68:22:   required from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = boost::array<unsigned int, 6>]’
/usr/local/include/boost/serialization/serialization.hpp:126:14:   required from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = boost::array<unsigned int, 6>]’
/usr/local/include/boost/archive/detail/iserializer.hpp:188:40:   required from ‘void boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::archive::binary_iarchive; T = boost::array<unsigned int, 6>]’
/usr/local/include/boost/archive/detail/iserializer.hpp:120:1:   required from ‘class boost::archive::detail::iserializer<boost::archive::binary_iarchive, boost::array<unsigned int, 6> >’
/usr/local/include/boost/archive/detail/iserializer.hpp:410:13:   required from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_standard::invoke(Archive&, const T&) [with T = boost::array<unsigned int, 6>; Archive = boost::archive::binary_iarchive]’
/usr/local/include/boost/archive/detail/iserializer.hpp:462:22:   [ skipping 175 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/local/include/boost/archive/detail/iserializer.hpp:625:18:   required from ‘void boost::archive::load(Archive&, T&) [with Archive = boost::archive::binary_iarchive; T = IndelErrorCounts]’
/usr/local/include/boost/archive/detail/common_iarchive.hpp:66:22:   required from ‘void boost::archive::detail::common_iarchive<Archive>::load_override(T&) [with T = IndelErrorCounts; Archive = boost::archive::binary_iarchive]’
/usr/local/include/boost/archive/basic_binary_iarchive.hpp:75:7:   required from ‘void boost::archive::basic_binary_iarchive<Archive>::load_override(T&) [with T = IndelErrorCounts; Archive = boost::archive::binary_iarchive]’
/usr/local/include/boost/archive/binary_iarchive_impl.hpp:58:9:   required from ‘void boost::archive::binary_iarchive_impl<Archive, Elem, Tr>::load_override(T&) [with T = IndelErrorCounts; Archive = boost::archive::binary_iarchive; Elem = char; Tr = std::char_traits<char>]’
/usr/local/include/boost/archive/detail/interface_iarchive.hpp:68:9:   required from ‘Archive& boost::archive::detail::interface_iarchive<Archive>::operator>>(T&) [with T = IndelErrorCounts; Archive = boost::archive::binary_iarchive]’
/data/apps/strelka/src/c++/lib/errorAnalysis/SequenceErrorCounts.cpp:88:11:   required from here
/usr/local/include/boost/serialization/access.hpp:116:11: error: ‘class boost::array<unsigned int, 6>’ has no member named ‘serialize’
         t.serialize(ar, file_version);
         ~~^~~~~~~~~
/usr/local/include/boost/serialization/access.hpp: In instantiation of ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive; T = boost::array<unsigned int, 6>]’:
/usr/local/include/boost/serialization/serialization.hpp:68:22:   required from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive; T = boost::array<unsigned int, 6>]’
/usr/local/include/boost/serialization/serialization.hpp:126:14:   required from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive; T = boost::array<unsigned int, 6>]’
/usr/local/include/boost/archive/detail/oserializer.hpp:150:40:   required from ‘void boost::archive::detail::oserializer<Archive, T>::save_object_data(boost::archive::detail::basic_oarchive&, const void*) const [with Archive = boost::archive::binary_oarchive; T = boost::array<unsigned int, 6>]’
/usr/local/include/boost/archive/detail/oserializer.hpp:103:1:   required from ‘class boost::archive::detail::oserializer<boost::archive::binary_oarchive, boost::array<unsigned int, 6> >’
/usr/local/include/boost/archive/detail/oserializer.hpp:255:13:   required from ‘static void boost::archive::detail::save_non_pointer_type<Archive>::save_standard::invoke(Archive&, const T&) [with T = boost::array<unsigned int, 6>; Archive = boost::archive::binary_oarchive]’
/usr/local/include/boost/archive/detail/oserializer.hpp:310:22:   [ skipping 177 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/local/include/boost/archive/detail/oserializer.hpp:534:18:   required from ‘void boost::archive::save(Archive&, T&) [with Archive = boost::archive::binary_oarchive; T = const IndelErrorCounts]’
/usr/local/include/boost/archive/detail/common_oarchive.hpp:70:22:   required from ‘void boost::archive::detail::common_oarchive<Archive>::save_override(T&) [with T = const IndelErrorCounts; Archive = boost::archive::binary_oarchive]’
/usr/local/include/boost/archive/basic_binary_oarchive.hpp:80:7:   required from ‘void boost::archive::basic_binary_oarchive<Archive>::save_override(const T&) [with T = IndelErrorCounts; Archive = boost::archive::binary_oarchive]’
/usr/local/include/boost/archive/binary_oarchive_impl.hpp:59:9:   required from ‘void boost::archive::binary_oarchive_impl<Archive, Elem, Tr>::save_override(T&) [with T = const IndelErrorCounts; Archive = boost::archive::binary_oarchive; Elem = char; Tr = std::char_traits<char>]’
/usr/local/include/boost/archive/detail/interface_oarchive.hpp:70:9:   required from ‘Archive& boost::archive::detail::interface_oarchive<Archive>::operator<<(const T&) [with T = IndelErrorCounts; Archive = boost::archive::binary_oarchive]’
/data/apps/strelka/src/c++/lib/errorAnalysis/SequenceErrorCounts.cpp:68:11:   required from here
/usr/local/include/boost/serialization/access.hpp:116:11: error: ‘class boost::array<unsigned int, 6>’ has no member named ‘serialize’
src/c++/lib/errorAnalysis/CMakeFiles/strelka_errorAnalysis.dir/build.make:110: recipe for target 'src/c++/lib/errorAnalysis/CMakeFiles/strelka_errorAnalysis.dir/SequenceErrorCounts.cpp.o' failed
make[2]: *** [src/c++/lib/errorAnalysis/CMakeFiles/strelka_errorAnalysis.dir/SequenceErrorCounts.cpp.o] Error 1
CMakeFiles/Makefile2:1094: recipe for target 'src/c++/lib/errorAnalysis/CMakeFiles/strelka_errorAnalysis.dir/all' failed
make[1]: *** [src/c++/lib/errorAnalysis/CMakeFiles/strelka_errorAnalysis.dir/all] Error 2

Am I doing something wrong?

ctsa commented 6 years ago

Thanks for checking on this. You aren't doing anything wrong, but this looks like a gcc and boost that aren't covered in test. Could you let us know:

  1. What is the OS?
  2. Where is this boost from: Is this an OS package installation or something you've compiled yourself? If the latter, which version of the compiler was used to build boost?
  3. Does compilation fail when using the default OS g++ version?

With these sorts of details we could probably reproduce the issue in docker without too much trouble.

dancooke commented 6 years ago
  1. OS is Ubuntu 16.04:
$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
  1. Boost installed from source with gcc version 7.2.0:
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
tar xzvf boost_1_65_1.tar.gz && cd boost_1_65_1
./bootstrap.sh --prefix=/usr/local
./b2 cxxflags="-std=c++11"
./b2 install
  1. Compilation also fails with default gcc (version 5.4.1).
ctsa commented 6 years ago

Thanks! Your build example for boost looks like it is using default gcc. Do you have gcc-7 aliased to gcc?

I think the details above are sufficient for us to try to recreate. The best suggestion I can make before then is to try to force strelka to use its vendored copy of boost by deleting the build dir and changing the configuration to:

BOOST_ROOT= ../configure --jobs=4 --prefix=../bin
ctsa commented 6 years ago

Looks like there were minor issues with both boost 1.64+ and gcc7+.

ctsa commented 6 years ago

Fixes are now on master. Please reopen if you're still having issues.

MariswamySavitha commented 2 years ago

Hi, using boost 1.66 and gcc8.3 still facing the same issue mentioned above. In file included from /opt/rbt_boost/include/boost/serialization/set.hpp:24, from smc/ripple/gossip.cc:1: /opt/rbt_boost/include/boost/serialization/access.hpp: In instantiation of 'static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = boost::array<unsigned char, 20>]': /opt/rbt_boost/include/boost/serialization/serialization.hpp:68:22: required from 'void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = boost::array<unsigned char, 20>]' /opt/rbt_boost/include/boost/serialization/serialization.hpp:126:14: required from 'void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = boost::array<unsigned char, 20>]' /opt/rbt_boost/include/boost/archive/detail/iserializer.hpp:189:40: required from 'void boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::archive::binary_iarchive; T = boost::array<unsigned char, 20>]' /opt/rbt_boost/include/boost/archive/detail/iserializer.hpp:121:1: required from 'class boost::archive::detail::iserializer<boost::archive::binary_iarchive, boost::array<unsigned char, 20> >' /opt/rbt_boost/include/boost/archive/detail/iserializer.hpp:411:13: required from 'static void boost::archive::detail::load_non_pointer_type::load_standard::invoke(Archive&, const T&) [with T = boost::array<unsigned char, 20>; Archive = boost::archive::binary_iarchive]' /opt/rbt_boost/include/boost/archive/detail/iserializer.hpp:463:22: [ skipping 3 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] /opt/rbt_boost/include/boost/archive/basic_binary_iarchive.hpp:75:7: required from 'void boost::archive::basic_binary_iarchive::load_override(T&) [with T = boost::array<unsigned char, 20>; Archive = boost::archive::binary_iarchive]' /opt/rbt_boost/include/boost/archive/binary_iarchive_impl.hpp:58:9: required from 'void boost::archive::binary_iarchive_impl<Archive, Elem, Tr>::load_override(T&) [with T = boost::array<unsigned char, 20>; Archive = boost::archive::binary_iarchive; Elem = char; Tr = std::char_traits]' /opt/rbt_boost/include/boost/archive/detail/interface_iarchive.hpp:68:9: required from 'Archive& boost::archive::detail::interface_iarchive::operator>>(T&) [with T = boost::array<unsigned char, 20>; Archive = boost::archive::binary_iarchive]' ./libs/dbi/serialize.h:70:16: required from 'T db::deserialize(const ByteA&) [with T = boost::array<unsigned char, 20>; db::ByteA = std::vector]' smc/ripple/gossip.cc:123:58: required from 'void rpl::core::Gossip::handle_update(boost::shared_ptr) [with Deps = rpl::test::Stubs]' smc/ripple/gossip.cc:263:16: required from here /opt/rbt_boost/include/boost/serialization/access.hpp:116:11: error: 'class boost::array<unsigned char, 20>' has no member named 'serialize'