Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile without errors #14

Closed
MaestSi opened this issue Feb 19, 2019 · 6 comments
Closed

Unable to compile without errors #14

MaestSi opened this issue Feb 19, 2019 · 6 comments

Comments

@MaestSi
Copy link

MaestSi commented Feb 19, 2019

Dear paragraph developers,
I am trying to compile paragraph on Ubuntu 14.04 using g++ 7.3.0 and cmake 3.14.0.
When I run:

cd /mnt/cifs01/simone/software/paragraph-build
/mnt/cifs01/simone/software/cmake-3.14.0/bin/cmake ../paragraph
make

I get error message:

[ 22%] Building CXX object src/c++/lib/CMakeFiles/grmpy_common.dir/grm/GraphAligner.cpp.o
In file included from /home/simone/home_disk/software/paragraph/external/gssw/gssw.h:19:0,
                 from /home/simone/home_disk/software/paragraph/src/c++/lib/grm/GraphAligner.cpp:30:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/smmintrin.h:31:3: error: #error "SSE4.1 instruction set not enabled"
 # error "SSE4.1 instruction set not enabled"
   ^
In file included from /home/simone/home_disk/software/paragraph/src/c++/lib/grm/GraphAligner.cpp:30:0:
/home/simone/home_disk/software/paragraph/external/gssw/gssw.h:67:5: error: ‘__m128i’ does not name a type
     __m128i* pvE;
     ^
/home/simone/home_disk/software/paragraph/external/gssw/gssw.h:68:5: error: ‘__m128i’ does not name a type
     __m128i* pvHStore;
     ^
/home/simone/home_disk/software/paragraph/external/gssw/gssw.h:138:2: error: ‘__m128i’ does not name a type
  __m128i* profile_byte; // 0: none
  ^
/home/simone/home_disk/software/paragraph/external/gssw/gssw.h:140:2: error: ‘__m128i’ does not name a type
  __m128i* profile_word; // 0: none
  ^
make[2]: *** [src/c++/lib/CMakeFiles/grmpy_common.dir/build.make:414: src/c++/lib/CMakeFiles/grmpy_common.dir/grm/GraphAligner.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:486: src/c++/lib/CMakeFiles/grmpy_common.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

I saw a post on Github (vgteam/vg#99) where a similar error was solved setting CXXFLAGS environment variable, so I tried it out.

export CXXFLAGS=-msse4.1
/mnt/cifs01/simone/software/cmake-3.14.0/bin/cmake ../paragraph
make

That error seems to be partially solved, but then it stops again:

[ 26%] Building CXX object src/c++/lib/CMakeFiles/grmpy_common.dir/grmpy/AlignSamples.cpp.o
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp: In function ‘void grmpy::writeAlignments(Json::Value&, const grmpy::Parameters&, const paragraph::Parameters&, const string&, genotyping::SampleInfo&)’:
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:76:105: error: no matching function for call to ‘regex_replace(const string&, const regex&, const char [2])’
     const std::string safe_sample_name = std::regex_replace(sample.sample_name(), unsafe_characters, "_");
                                                                                                         ^
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:76:105: note: candidates are:
In file included from /usr/include/c++/4.8/regex:62:0,
                 from /home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:49:
/usr/include/c++/4.8/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
     ^
/usr/include/c++/4.8/bits/regex.h:2162:5: note:   template argument deduction/substitution failed:
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:76:105: note:   deduced conflicting types for parameter ‘_Bi_iter’ (‘std::basic_regex<char>’ and ‘const char*’)
     const std::string safe_sample_name = std::regex_replace(sample.sample_name(), unsafe_characters, "_");
                                                                                                         ^
In file included from /usr/include/c++/4.8/regex:62:0,
                 from /home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:49:
/usr/include/c++/4.8/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(const basic_string<_Ch_type>& __s,
     ^
/usr/include/c++/4.8/bits/regex.h:2182:5: note:   template argument deduction/substitution failed:
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:76:105: note:   mismatched types ‘const std::basic_string<_Ch_type>’ and ‘const char [2]’
     const std::string safe_sample_name = std::regex_replace(sample.sample_name(), unsafe_characters, "_");
                                                                                                         ^
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:82:31: error: no matching function for call to ‘regex_replace(boost::iterators::iterator_value<boost::iterators::transform_iterator<boost::range_detail::default_constructible_unary_fn_wrapper<grmpy::writeAlignments(Json::Value&, const grmpy::Parameters&, const paragraph::Parameters&, const string&, genotyping::SampleInfo&)::__lambda3, std::basic_string<char> >, std::_List_const_iterator<common::Region>, boost::iterators::use_default, boost::iterators::use_default> >::type, const regex&, const char [2])’
         unsafe_characters, "_");
                               ^
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:82:31: note: candidates are:
In file included from /usr/include/c++/4.8/regex:62:0,
                 from /home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:49:
/usr/include/c++/4.8/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
     ^
/usr/include/c++/4.8/bits/regex.h:2162:5: note:   template argument deduction/substitution failed:
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:82:31: note:   deduced conflicting types for parameter ‘_Bi_iter’ (‘std::basic_regex<char>’ and ‘const char*’)
         unsafe_characters, "_");
                               ^
In file included from /usr/include/c++/4.8/regex:62:0,
                 from /home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:49:
/usr/include/c++/4.8/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(const basic_string<_Ch_type>& __s,
     ^
/usr/include/c++/4.8/bits/regex.h:2182:5: note:   template argument deduction/substitution failed:
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:82:31: note:   mismatched types ‘const std::basic_string<_Ch_type>’ and ‘const char [2]’
         unsafe_characters, "_");
                               ^
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:99:90: error: no matching function for call to ‘regex_replace(std::string&, const regex&, const char [2])’
     const std::string safe_graph_id = std::regex_replace(graph_id, unsafe_characters, "_");
                                                                                          ^
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:99:90: note: candidates are:
In file included from /usr/include/c++/4.8/regex:62:0,
                 from /home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:49:
/usr/include/c++/4.8/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
     ^
/usr/include/c++/4.8/bits/regex.h:2162:5: note:   template argument deduction/substitution failed:
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:99:90: note:   deduced conflicting types for parameter ‘_Bi_iter’ (‘std::basic_regex<char>’ and ‘const char*’)
     const std::string safe_graph_id = std::regex_replace(graph_id, unsafe_characters, "_");
                                                                                          ^
In file included from /usr/include/c++/4.8/regex:62:0,
                 from /home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:49:
/usr/include/c++/4.8/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(const basic_string<_Ch_type>& __s,
     ^
/usr/include/c++/4.8/bits/regex.h:2182:5: note:   template argument deduction/substitution failed:
/home/simone/home_disk/software/paragraph/src/c++/lib/grmpy/AlignSamples.cpp:99:90: note:   mismatched types ‘const std::basic_string<_Ch_type>’ and ‘const char [2]’
     const std::string safe_graph_id = std::regex_replace(graph_id, unsafe_characters, "_");
                                                                                          ^
make[2]: *** [src/c++/lib/CMakeFiles/grmpy_common.dir/build.make:492: src/c++/lib/CMakeFiles/grmpy_common.dir/grmpy/AlignSamples.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:486: src/c++/lib/CMakeFiles/grmpy_common.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

I know Ubuntu 14.04 is not amongst the distributions you have tested paragraph on.
Do you have any ideas about how I could solve it? Thanks.
Simone

@pkrusche
Copy link
Contributor

Are you sure the correct version of g++ is being used? From the include paths in the errors it looks like the compiler being used is g++ 4.8. The right compiler version can be set using update-alternatives in Ubuntu: https://stackoverflow.com/questions/7832892/how-to-change-the-default-gcc-compiler-in-ubuntu (or using the CXX environment variable before running cmake, also it is important to reset the CMake cache / empty the build folder after changing this).

@MaestSi
Copy link
Author

MaestSi commented Feb 21, 2019

You were right, I was using the old g++ version; I thought it was enough to have the new one in the PATH environment variable before the other version, and that when performing which g++ I had the correct version, but that is not true.
So, I set:
export CXX=/mnt/cifs01/simone/software/gcc-7.3.0/bin/g++
and I emptied the build folder; I had already exported the Boost library with:
export BOOST_ROOT=/mnt/cifs01/simone/software/boost_1_58_0/
However, another error occurs:

[ 66%] Linking CXX executable ../../../bin/paragraph
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::__cxx11::basic_st ring<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)': paragraph.cpp:(.text._ZN5boost15program_options16validation_errorC2ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i[_ZN5boost15program_options16validation_errorC5E NS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i]+0x32): undefined reference to boost::program_options::validation_error::get_template[abi:cxx11](boost::program_op
tions::validation_error::kind_t)'
paragraph.cpp:(.text._ZN5boost15program_options16validation_errorC2ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i[_ZN5boost15program_options16validation_errorC5ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i]+0x4f): undefined reference to boost::program_options::error_with_option_name::error_with_option_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' CMakeFiles/paragraph.dir/paragraph.cpp.o: In function boost::program_options::variables_map::operator[](std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const':
paragraph.cpp:(.text._ZNK5boost15program_options13variables_mapixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5boost15program_options13variables_mapixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1f): undefined reference to boost::program_options::abstract_variables_map::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost15program_options11typed_valueIfcEE[_ZTVN5boost15program_options11typed_valueIfcEE]+0x38): undefined reference to boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, bool) const'
CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost15program_options11typed_valueIicEE[_ZTVN5boost15program_options11typed_valueIicEE]+0x38): undefined reference to boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const' CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost15program_options11typed_valueIbcEE[_ZTVN5boost15program_options11typed_valueIbcEE]+0x38): undefined reference to boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, bool) const'
CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE[_ZTVN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE]+0x38): undefined reference to boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const' CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost15program_options11typed_valueISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEcEE[_ZTVN5boost15program_options11typed_valueISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEcEE]+0x38): undefined reference to boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, bool) const'
CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost15program_options20invalid_option_valueE[_ZTVN5boost15program_options20invalid_option_valueE]+0x30): undefined reference to boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost15program_options16validation_errorE[_ZTVN5boost15program_options16validation_errorE]+0x30): undefined reference to boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const'
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function boost::program_options::typed_value<float, char>::name[abi:cxx11]() const': paragraph.cpp:(.text._ZNK5boost15program_options11typed_valueIfcE4nameB5cxx11Ev[_ZNK5boost15program_options11typed_valueIfcE4nameB5cxx11Ev]+0x32): undefined reference to boost::program_options::arg[abi:cxx11]'
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function boost::program_options::typed_value<int, char>::name[abi:cxx11]() const': paragraph.cpp:(.text._ZNK5boost15program_options11typed_valueIicE4nameB5cxx11Ev[_ZNK5boost15program_options11typed_valueIicE4nameB5cxx11Ev]+0x32): undefined reference to boost::program_options::arg[abi:cxx11]'
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function boost::program_options::typed_value<bool, char>::name[abi:cxx11]() const': paragraph.cpp:(.text._ZNK5boost15program_options11typed_valueIbcE4nameB5cxx11Ev[_ZNK5boost15program_options11typed_valueIbcE4nameB5cxx11Ev]+0x32): undefined reference to boost::program_options::arg[abi:cxx11]'
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function boost::program_options::typed_value<bool, char>::xparse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const': paragraph.cpp:(.text._ZNK5boost15program_options11typed_valueIbcE6xparseERNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EE[_ZNK5boost15program_options11typed_valueIbcE6xparseERNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EE]+0x7a): undefined reference to boost::program_options::validate(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, bool*, int)'
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>::name() const': paragraph.cpp:(.text._ZNK5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcE4nameEv[_ZNK5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcE4nameEv]+0x32): undefined reference to boost::program_options::arg[abi:cxx11]'
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>::xparse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const': paragraph.cpp:(.text._ZNK5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcE6xparseERNS_3anyERKSt6vectorIS7_SaIS7_EE[_ZNK5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcE6xparseERNS_3anyERKSt6vectorIS7_SaIS7_EE]+0x7a): undefined reference to boost::program_options::validate(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, int)'
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function boost::program_options::typed_value<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, char>::name() const': paragraph.cpp:(.text._ZNK5boost15program_options11typed_valueISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEcE4nameEv[_ZNK5boost15program_options11typed_valueISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEcE4nameEv]+0x32): undefined reference to boost::program_options::arg[abi:cxx11]'
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function void boost::program_options::validate<float, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, float*, long)': paragraph.cpp:(.text._ZN5boost15program_options8validateIfcEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l[_ZN5boost15program_options8validateIfcEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l]+0xfe): undefined reference to boost::program_options::invalid_option_value::invalid_option_value(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function void boost::program_options::validate<int, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int*, long)': paragraph.cpp:(.text._ZN5boost15program_options8validateIicEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l[_ZN5boost15program_options8validateIicEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l]+0xfa): undefined reference to boost::program_options::invalid_option_value::invalid_option_value(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
CMakeFiles/paragraph.dir/paragraph.cpp.o: In function void boost::program_options::validate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, int)': paragraph.cpp:(.text._ZN5boost15program_options8validateINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEEvRNS_3anyERKSt6vectorINS3_IT0_S4_ISB_ESaISB_EEESaISE_EEPSA_IT_SaISJ_EEi[_ZN5boost15program_options8validateINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEEvRNS_3anyERKSt6vectorINS3_IT0_S4_ISB_ESaISB_EEESaISE_EEPSA_IT_SaISJ_EEi]+0x160): undefined reference to boost::program_options::validate(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >
, int)'
paragraph.cpp:(.text._ZN5boost15program_options8validateINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEEvRNS_3anyERKSt6vectorINS3_IT0_S4_ISB_ESaISB_EEESaISE_EEPSA_IT_SaISJ_EEi[_ZN5boost15program_options8validateINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEEvRNS_3anyERKSt6vectorINS3_IT0_S4_ISB_ESaISB_EEESaISE_EEPSA_IT_SaISJ_EEi]+0x267): undefined reference to boost::program_options::invalid_option_value::invalid_option_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE]+0x38): undefined reference to boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const'
CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE]+0x30): undefined reference to boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE]+0x38): undefined reference to boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const'
CMakeFiles/paragraph.dir/paragraph.cpp.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE]+0x30): undefined reference to boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' ../../../lib/libgrm.a(Program.cpp.o): In function common::Options::parse(char const*, int, char const* const*)':
Program.cpp:(.text+0x1a51): undefined reference to boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)' ../../../lib/libgrm.a(Program.cpp.o): In function common::compareOptionName(boost::shared_ptrboost::program_options::option_description const&, boost::shared_ptrboost::program_options::option_description const&)':
Program.cpp:(.text+0x2c31): undefined reference to boost::program_options::option_description::long_name[abi:cxx11]() const' Program.cpp:(.text+0x2c48): undefined reference to boost::program_options::option_description::long_nameabi:cxx11 const'
../../../lib/libgrm.a(Program.cpp.o): In function common::Options::helpDefaults[abi:cxx11](std::vector<boost::shared_ptr<boost::program_options::option_description>, std::allocator<boost::shared_ptr<boost::program_options::option_description> > > const&) const': Program.cpp:(.text+0x2dda): undefined reference to boost::program_options::option_description::format_parameterabi:cxx11 const'
Program.cpp:(.text+0x2dee): undefined reference to boost::program_options::option_description::long_name[abi:cxx11]() const' ../../../lib/libgrm.a(Program.cpp.o): In function common::Options::help[abi:cxx11](std::vector<boost::shared_ptrboost::program_options::option_description, std::allocator<boost::shared_ptrboost::program_options::option_description > > const&, bool) const':
Program.cpp:(.text+0x30b2): undefined reference to boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)' ../../../lib/libgrm.a(Program.cpp.o): In function boost::program_options::error_with_option_name::get_option_nameabi:cxx11 const':
Program.cpp:(.text._ZNK5boost15program_options22error_with_option_name15get_option_nameB5cxx11Ev[_ZNK5boost15program_options22error_with_option_name15get_option_nameB5cxx11Ev]+0x1f): undefined reference to boost::program_options::error_with_option_name::get_canonical_option_name[abi:cxx11]() const' ../../../lib/libgrm.a(Program.cpp.o): In function boost::program_options::basic_command_line_parser::basic_command_line_parser(int, char const* const*)':
Program.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcEC2EiPKPKc[_ZN5boost15program_options25basic_command_line_parserIcEC5EiPKPKc]+0x72): undefined reference to boost::program_options::detail::cmdline::cmdline(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)' ../../../lib/libgrm.a(Program.cpp.o): In function boost::program_options::basic_command_line_parser::basic_command_line_parser(std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&)':
Program.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcEC2ERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EE[_ZN5boost15program_options25basic_command_line_parserIcEC5ERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EE]+0x33): undefined reference to boost::program_options::detail::cmdline::cmdline(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)' ../../../lib/libgrm.a(Program.cpp.o): In function std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > boost::program_options::to_internal<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >(std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&)':
Program.cpp:(.text._ZN5boost15program_options11to_internalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt6vectorIS7_SaIS7_EERKS8_IT_SaISB_EE[_ZN5boost15program_options11to_internalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt6vectorIS7_SaIS7_EERKS8_IT_SaISB_EE]+0x5d): undefined reference to `boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [src/c++/main/CMakeFiles/paragraph.dir/build.make:95: bin/paragraph] Error 1
make[1]: *** [CMakeFiles/Makefile2:607: src/c++/main/CMakeFiles/paragraph.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Any other suggestions?
Thanks

@pkrusche
Copy link
Contributor

If you compiled Boost with the old compiler version then you will need to rebuild it with gcc 7 and use that one. Gcc 4 and 7 are not compatible when it comes to linking (see https://github.com/Illumina/paragraph#library-dependencies for some help on building Boost).

@MaestSi
Copy link
Author

MaestSi commented Feb 21, 2019

Thank you again, there was a problem in my Boost library. When using the embedded one with -DUSE_SYSTEM_BOOST=FALSE all went smoothly.
Simone

@MaestSi MaestSi closed this as completed Feb 21, 2019
@MaestSi
Copy link
Author

MaestSi commented Feb 21, 2019

Maybe not a consequence of compilation errors (I didn't get any), but while when I run ./bin/paragraph -h the help message is printed out, when I try the example instruction I get some errors.
In particular, the command is:
python3 ./bin/multigrmpy.py -i share/test-data/round-trip-genotyping/candidates.json -m share/test-data/round-trip-genotyping/samples.txt -r share/test-data/round-trip-genotyping/dummy.fa -o ./test
And the error is:

File "./bin/multigrmpy.py", line 302
raise Exception(f"Cannot create alignment output directory: {alignment_directory}")
^
SyntaxError: invalid syntax

I also tried with absolute path but nothing changed.
Thanks,

@MaestSi MaestSi reopened this Feb 21, 2019
@MaestSi
Copy link
Author

MaestSi commented Feb 21, 2019

I tried with another python version (the previous one was 3.4.3). I had to pip install intervaltree module on the newer python version, but now everything works.
Thanks again.

@MaestSi MaestSi closed this as completed Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants