deepomicslab/SpecHLA

Install error

anabbi opened this issue · 11 comments

Hello,

I have not been able to install the SpecHLA on our HPC. I have got an error with gcc/12 that was similar to the previous post. When I downgraded to gcc/10.4.0 or gcc/6.2.0, I get the following error:

/usr/include/wchar.h:39:21: fatal error: stdarg.h: No such file or directory
include <stdarg.h>

Could you please help?
Thank you,

Hello, I suggest you install and use the GCC in the conda environment. Also, If you want to handle only long reads, there is no need to run index.sh.

Thank you for your response. I included gcc and gxx in the environment.yml to install both on the conda environment. gcc --version and gxx --version show conda version:

gcc (conda-forge gcc 12.1.0-17) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(/cluster/home/anabbi/SpecHLA/spechla_env) [anabbi@node114 SpecHLA]$ g++ --version
g++ (conda-forge gcc 12.1.0-17) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Below is my complete error. I suspect there is a problem with SpecHap, but I am not sure how to fix it.

Consolidate compiler generated dependencies of target SpecHap
[  8%] Building CXX object CMakeFiles/SpecHap.dir/hic_util.cpp.o
In file included from /usr/include/c++/4.8.2/set:60:0,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_tree.h: In instantiation of ‘std::_Rb_tree_node<_Val>::_Rb_tree_node(_Args&& ...) [with _Args = {unsigned int&, Fragment&}; _Val = std::pair<const unsigned int, HiCLinker>]’:
/usr/include/c++/4.8.2/ext/new_allocator.h:120:4:   required from ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::_Rb_tree_node<std::pair<const unsigned int, HiCLinker> >; _Args = {unsigned int&, Fragment&}; _Tp = std::_Rb_tree_node<std::pair<const unsigned int, HiCLinker> >]’
/usr/include/c++/4.8.2/bits/alloc_traits.h:254:4:   required from ‘static typename std::enable_if<std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::value, void>::type std::allocator_traits<_Alloc>::_S_construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp = std::_Rb_tree_node<std::pair<const unsigned int, HiCLinker> >; _Args = {unsigned int&, Fragment&}; _Alloc = std::allocator<std::_Rb_tree_node<std::pair<const unsigned int, HiCLinker> > >; typename std::enable_if<std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::value, void>::type = void]’
/usr/include/c++/4.8.2/bits/alloc_traits.h:393:57:   required from ‘static decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) std::allocator_traits<_Alloc>::construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp = std::_Rb_tree_node<std::pair<const unsigned int, HiCLinker> >; _Args = {unsigned int&, Fragment&}; _Alloc = std::allocator<std::_Rb_tree_node<std::pair<const unsigned int, HiCLinker> > >; decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) = <type error>]’
/usr/include/c++/4.8.2/bits/stl_tree.h:408:36:   required from ‘std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {unsigned int&, Fragment&}; _Key = unsigned int; _Val = std::pair<const unsigned int, HiCLinker>; _KeyOfValue = std::_Select1st<std::pair<const unsigned int, HiCLinker> >; _Compare = std::less<unsigned int>; _Alloc = std::allocator<std::pair<const unsigned int, HiCLinker> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const unsigned int, HiCLinker> >*]’
/usr/include/c++/4.8.2/bits/stl_tree.h:1648:64:   required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_equal(_Args&& ...) [with _Args = {unsigned int&, Fragment&}; _Key = unsigned int; _Val = std::pair<const unsigned int, HiCLinker>; _KeyOfValue = std::_Select1st<std::pair<const unsigned int, HiCLinker> >; _Compare = std::less<unsigned int>; _Alloc = std::allocator<std::pair<const unsigned int, HiCLinker> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const unsigned int, HiCLinker> >]’
/usr/include/c++/4.8.2/bits/stl_multimap.h:455:63:   required from ‘std::multimap<_Key, _Tp, _Compare, _Alloc>::iterator std::multimap<_Key, _Tp, _Compare, _Alloc>::emplace(_Args&& ...) [with _Args = {unsigned int&, Fragment&}; _Key = unsigned int; _Tp = HiCLinker; _Compare = std::less<unsigned int>; _Alloc = std::allocator<std::pair<const unsigned int, HiCLinker> >; std::multimap<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const unsigned int, HiCLinker> >]’
/cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:33:43:   required from here
/usr/include/c++/4.8.2/bits/stl_tree.h:140:49: error: no matching function for call to ‘std::pair<const unsigned int, HiCLinker>::pair(unsigned int&, Fragment&’
    _M_value_field(std::forward<_Args>(__args)...) { }
                                                 ^
/usr/include/c++/4.8.2/bits/stl_tree.h:140:49: note: candidates are:
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8.2/bits/stl_tree.h:61,
                 from /usr/include/c++/4.8.2/set:60,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_pair.h:206:9: note: template<class ... _Args1, long unsigned int ..._Indexes1, class ... _Args2, long unsigned int ..._Indexes2> std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>)
         pair(tuple<_Args1...>&, tuple<_Args2...>&,
         ^
/usr/include/c++/4.8.2/bits/stl_pair.h:206:9: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8.2/set:60:0,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_tree.h:140:49: note:   mismatched types ‘std::tuple<_Args1 ...>’ and ‘unsigned int’
    _M_value_field(std::forward<_Args>(__args)...) { }
                                                 ^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8.2/bits/stl_tree.h:61,
                 from /usr/include/c++/4.8.2/set:60,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_pair.h:155:9: note: template<class ... _Args1, class ... _Args2> std::pair<_T1, _T2>::pair(std::piecewise_construct_t, std::tuple<_Args1 ...>, std::tuple<_Args2 ...>)
         pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
         ^
/usr/include/c++/4.8.2/bits/stl_pair.h:155:9: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8.2/set:60:0,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_tree.h:140:49: note:   cannot convert ‘std::forward<unsigned int&>((* & __args#0))’ (type ‘unsigned int’) to type ‘std::piecewise_construct_t’
    _M_value_field(std::forward<_Args>(__args)...) { }
                                                 ^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8.2/bits/stl_tree.h:61,
                 from /usr/include/c++/4.8.2/set:60,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_pair.h:150:12: note: template<class _U1, class _U2, class> constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&)
  constexpr pair(pair<_U1, _U2>&& __p)
            ^
/usr/include/c++/4.8.2/bits/stl_pair.h:150:12: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8.2/set:60:0,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_tree.h:140:49: note:   mismatched types ‘std::pair<_T1, _T2>’ and ‘unsigned int’
    _M_value_field(std::forward<_Args>(__args)...) { }
                                                 ^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8.2/bits/stl_tree.h:61,
                 from /usr/include/c++/4.8.2/set:60,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_pair.h:144:12: note: template<class _U1, class _U2, class> constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&)
  constexpr pair(_U1&& __x, _U2&& __y)
            ^
/usr/include/c++/4.8.2/bits/stl_pair.h:144:12: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8.2/bits/stl_pair.h:141:38: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
       template<class _U1, class _U2, class = typename
                                      ^
/usr/include/c++/4.8.2/bits/stl_pair.h:138:12: note: template<class _U2, class> constexpr std::pair<_T1, _T2>::pair(const _T1&, _U2&&)
  constexpr pair(const _T1& __x, _U2&& __y)
            ^
/usr/include/c++/4.8.2/bits/stl_pair.h:138:12: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8.2/bits/stl_pair.h:136:27: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
       template<class _U2, class = typename
                           ^
/usr/include/c++/4.8.2/bits/stl_pair.h:133:12: note: template<class _U1, class> constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&)
  constexpr pair(_U1&& __x, const _T2& __y)
            ^
/usr/include/c++/4.8.2/bits/stl_pair.h:133:12: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8.2/set:60:0,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_tree.h:140:49: note:   cannot convert ‘std::forward<Fragment&>((* & __args#1))’ (type ‘Fragment’) to type ‘const HiCLinker&’
    _M_value_field(std::forward<_Args>(__args)...) { }
                                                 ^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8.2/bits/stl_tree.h:61,
                 from /usr/include/c++/4.8.2/set:60,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_pair.h:128:17: note: constexpr std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = const unsigned int; _T2 = HiCLinker]
       constexpr pair(pair&&) = default;
                 ^
/usr/include/c++/4.8.2/bits/stl_pair.h:128:17: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/4.8.2/bits/stl_pair.h:127:17: note: constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = const unsigned int; _T2 = HiCLinker]
       constexpr pair(const pair&) = default;
                 ^
/usr/include/c++/4.8.2/bits/stl_pair.h:127:17: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/4.8.2/bits/stl_pair.h:124:12: note: template<class _U1, class _U2, class> constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&)
  constexpr pair(const pair<_U1, _U2>& __p)
            ^
/usr/include/c++/4.8.2/bits/stl_pair.h:124:12: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8.2/set:60:0,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_tree.h:140:49: note:   mismatched types ‘const std::pair<_T1, _T2>’ and ‘unsigned int’
    _M_value_field(std::forward<_Args>(__args)...) { }
                                                 ^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8.2/bits/stl_tree.h:61,
                 from /usr/include/c++/4.8.2/set:60,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/usr/include/c++/4.8.2/bits/stl_pair.h:112:26: note: constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _T1 = const unsigned int; _T2 = HiCLinker]
       _GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b)
                          ^
/usr/include/c++/4.8.2/bits/stl_pair.h:112:26: note:   no known conversion for argument 2 from ‘Fragment’ to ‘const HiCLinker&’
/usr/include/c++/4.8.2/bits/stl_pair.h:108:26: note: constexpr std::pair<_T1, _T2>::pair() [with _T1 = const unsigned int; _T2 = HiCLinker]
       _GLIBCXX_CONSTEXPR pair()
                          ^
/usr/include/c++/4.8.2/bits/stl_pair.h:108:26: note:   candidate expects 0 arguments, 2 provided
make[2]: *** [CMakeFiles/SpecHap.dir/hic_util.cpp.o] Error 1
make[1]: *** [CMakeFiles/SpecHap.dir/all] Error 2
make: *** [all] Error 2

Thanks for your help

Hi,
It seems the gcc in conda has not been used in the installation, as shown in In file included from /usr/include/c++/4.8.2/set:60:0,. Ensuring using the gcc in conda could solve the issue.
Hope it helps.

Thank you for your reply. I have installed gcc_linux-64 and gxx_linux-64` on my Conda environment. To point to the Conda gcc and c++, I added the following variables:

export CPATH=/cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/

export CC=/cluster/home/anabbi/SpecHLA/spechla_env1/bin/x86_64-conda-linux-gnu-gcc

export CXX=/cluster/home/anabbi/SpecHLA/spechla_env1/bin/x86_64-conda-linux-gnu-g++

It looks like it is pointing to the Conda version for c++, but I am still getting the following error

Consolidate compiler generated dependencies of target SpecHap
[  8%] Building CXX object CMakeFiles/SpecHap.dir/hic_util.cpp.o
In file included from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/alloc_traits.h:33:0,
                 from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/ext/alloc_traits.h:34,
                 from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/stl_tree.h:67,
                 from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/set:60,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/stl_construct.h:111:44: error: missing binary operator before token "("
 #if __cplusplus >= 202002L && __has_builtin(__builtin_is_constant_evaluated)
                                            ^
In file included from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/basic_string.h:39:0,
                 from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/string:55,
                 from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bitset:47,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/results.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/type.h:11,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:8,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/ext/atomicity.h:37:18: error: missing binary operator before token "("
 #if __has_include(<sys/single_threaded.h>)
                  ^
/cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/ext/atomicity.h:51:20: error: missing binary operator before token "("
 #elif __has_include(<sys/single_threaded.h>)
                    ^
In file included from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/unique_ptr.h:36:0,
                 from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/memory:76,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/results.h:8,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/type.h:11,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:8,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/utility:304:18: error: missing binary operator before token "("
 #if __has_builtin(__make_integer_seq)
                  ^
In file included from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/unique_ptr.h:37:0,
                 from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/memory:76,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/results.h:8,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/type.h:11,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:8,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/tuple:76:24: error: missing binary operator before token "("
 #if __has_cpp_attribute(__no_unique_address__)
                        ^
In file included from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/stl_algobase.h:61:0,
                 from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/stl_tree.h:63,
                 from /cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/set:60,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.h:7,
                 from /cluster/home/anabbi/SpecHLA/bin/SpecHap/hic_util.cpp:5:
/cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/cpp_type_traits.h:429:51: error: expected primary-expression before ‘)’ token
       enum { __value = __is_trivially_copyable(_Tp) };
                                                   ^
/cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/cpp_type_traits.h:429:51: error: there are no arguments to ‘__is_trivially_copyable’ that depend on a template parameter, so a declaration of ‘__is_trivially_copyable’ must be available [-fpermissive]
/cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/cpp_type_traits.h:429:51: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/cluster/home/anabbi/SpecHLA/spechla_env1/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/cpp_type_traits.h:558:5: error: ‘_GLIBCXX20_CONSTEXPR’ does not name a type
     _GLIBCXX20_CONSTEXPR
     ^

Thanks for your help. I am sorry, I am not familiar with c

Hi,

Please pull the latest commit and install it again. The issue is still caused by the old gcc version, to solve this, we revised the source code to support the older GCC. The issue is similar to #13

Please let me know if it helps.

Thank you. I am still getting errors with gcc/11.2.0

Consolidate compiler generated dependencies of target SpecHap
[  8%] Building CXX object CMakeFiles/SpecHap.dir/util.cpp.o
/cluster/home/anabbi/SpecHLA/bin/SpecHap/util.cpp: In function ‘void logging(std::ostream&, const string&)’:
/cluster/home/anabbi/SpecHLA/bin/SpecHap/util.cpp:12:30: error: ‘put_time’ is not a member of ‘std’
     stream << "[SpecHap " << std::put_time(std::localtime(&t), "%Y:%m:%d %H:%M:%S]") << message << std::endl;
                              ^
make[2]: *** [CMakeFiles/SpecHap.dir/util.cpp.o] Error 1
make[1]: *** [CMakeFiles/SpecHap.dir/all] Error 2
make: *** [all] Error 2

Thanks for your help.

It is still caused by the version. Could you check your gcc and g++ version by

/cluster/home/anabbi/SpecHLA/spechla_env1/bin/x86_64-conda-linux-gnu-gcc --version
/cluster/home/anabbi/SpecHLA/spechla_env1/bin/x86_64-conda-linux-gnu-g++ --version

Here is mine

g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Here is my gcc and g++ version:

x86_64-conda-linux-gnu-gcc (conda-forge gcc 11.2.0-16) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

x86_64-conda-linux-gnu-g++ (conda-forge gcc 11.2.0-16) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Should I install v9.4.0?

Thanks,

There are several possible solutions:

  • just delete this line /cluster/home/anabbi/SpecHLA/bin/SpecHap/util.cpp:12:30: error: ‘put_time’ is not a member of ‘std’ stream << "[SpecHap " << std::put_time(std::localtime(&t), "%Y:%m:%d %H:%M:%S]") << message << std::endl;
  • I guess it still uses the GCC in your system path automatically. Would you be able to update the GCC on your server?
  • Find another way to denote the compiler in the conda env.

Thank you! Solved by your first solution

So good to hear this.