freetdi / tdlib

Other
12 stars 5 forks source link

Fails to compile on FreeBSD #37

Closed spth closed 1 month ago

spth commented 3 years ago

I've just tried to compile treedec on a Raspi 4 running FreeBSD 13 RC4, no gala installed. I get

In file included from python_tdlib.cpp:30:
In file included from ../src/treedec.hpp:29:
In file included from ../src/graph.hpp:54:
In file included from ../src/degree.hpp:28:
In file included from ../src/bucket_sorter_bits.hpp:6:
../src/bucket_sorter.hpp:240:32: error: field of type 'std::__1::__wrap_iter<unsigned long *>' has private constructor
      : bucket_id(_bucket_id), head(h), next(n), prev(p), value(v), id(_id) {}

The compiler is clang-11. On the other hand, on my Debian GNU/Linux system clang-11 compiled treedec.

felix-salfelder commented 3 years ago

Please try iter branch.

spth commented 3 years ago

iter branch fails, too; error message is the same. Here's a bit more context:

gmake[3]: Entering directory '/home/philipp/tdlib/tdlib'
/bin/sh ../libtool  --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include/python3.9 -I../src -I/usr/local/include -DNDEBUG -pthread -Wl,-O1 -Wl,-Bsymbolic-functions -fno-strict-aliasing -g -fwrapv -O2 -Wall -Wformat -Werror=format-security -g -O2 -std=c++11 -MT python_tdlib.lo -MD -MP -MF .deps/python_tdlib.Tpo -c -o python_tdlib.lo python_tdlib.cpp
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/python3.9 -I../src -I/usr/local/include -DNDEBUG -pthread -Wl,-O1 -Wl,-Bsymbolic-functions -fno-strict-aliasing -g -fwrapv -O2 -Wall -Wformat -Werror=format-security -g -O2 -std=c++11 -MT python_tdlib.lo -MD -MP -MF .deps/python_tdlib.Tpo -c python_tdlib.cpp  -fPIC -DPIC -o .libs/python_tdlib.o
c++: warning: -Wl,-O1: 'linker' input unused [-Wunused-command-line-argument]
c++: warning: -Wl,-Bsymbolic-functions: 'linker' input unused [-Wunused-command-line-argument]
In file included from python_tdlib.cpp:40:
../src/combinations.hpp:857:9: warning: unused variable 'low' [-Wunused-variable]
    int low = -1;
        ^
python_tdlib.cpp:88:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:86:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
python_tdlib.cpp:110:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:108:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
python_tdlib.cpp:88:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:179:9: note: in instantiation of function template specialization 'make_tdlib_graph<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>' requested here
        make_tdlib_graph(G, V_G, E_G);
        ^
python_tdlib.cpp:86:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
In file included from python_tdlib.cpp:30:
In file included from ../src/treedec.hpp:29:
In file included from ../src/graph.hpp:54:
In file included from ../src/degree.hpp:28:
In file included from ../src/bucket_sorter_bits.hpp:6:
../src/bucket_sorter.hpp:240:32: error: field of type 'std::__1::__wrap_iter<unsigned long *>' has private constructor
      : bucket_id(_bucket_id), head(h), next(n), prev(p), value(v), id(_id) {}
                               ^
../src/bucket_sorter.hpp:315:14: note: in instantiation of member function 'boost::bucket_sorter<unsigned long, unsigned long, boost::iterator_property_map<unsigned long *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, unsigned long, unsigned long &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::stack_<std::__1::__wrap_iter<unsigned long *>, std::__1::__wrap_iter<unsigned long *>>::stack_' requested here
      return stack(i, head, next.begin(), prev.begin(),
             ^
../src/bucket_sorter.hpp:116:7: note: in instantiation of member function 'boost::bucket_sorter<unsigned long, unsigned long, boost::iterator_property_map<unsigned long *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, unsigned long, unsigned long &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::operator[]' requested here
      (*this)[bucket[x]].push(x);
      ^
../src/degree.hpp:165:19: note: in instantiation of member function 'boost::bucket_sorter<unsigned long, unsigned long, boost::iterator_property_map<unsigned long *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, unsigned long, unsigned long &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::push' requested here
            _degs.push(*vIt);
                  ^
../src/degree.hpp:150:9: note: in instantiation of member function 'misc::DEGS<treedec::draft::directed_view<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>, detail::PP_degree_config>::init' requested here
        init();
        ^
../src/preprocessing.hpp:235:11: note: in instantiation of member function 'misc::DEGS<treedec::draft::directed_view<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>, detail::PP_degree_config>::DEGS' requested here
          _degs(_g, _degreemap),
          ^
../src/preprocessing.hpp:1742:34: note: in instantiation of member function 'treedec::impl::preprocessing<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, draft::pp_cfg>::preprocessing' requested here
        impl::preprocessing<G_t> A(G);
                                 ^
python_tdlib.cpp:181:18: note: in instantiation of function template specialization 'treedec::preprocessing<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, std::__1::vector<boost::tuples::tuple<unsigned int, std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int>>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::__1::allocator<boost::tuples::tuple<unsigned int, std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int>>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>>>>' requested here
        treedec::preprocessing(G, td_bags, lb);
                 ^
/usr/include/c++/v1/iterator:1529:60: note: declared private here
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
                                                           ^
In file included from python_tdlib.cpp:30:
In file included from ../src/treedec.hpp:29:
In file included from ../src/graph.hpp:54:
In file included from ../src/degree.hpp:28:
In file included from ../src/bucket_sorter_bits.hpp:6:
../src/bucket_sorter.hpp:240:32: error: field of type 'std::__1::__wrap_iter<const unsigned long *>' has private constructor
      : bucket_id(_bucket_id), head(h), next(n), prev(p), value(v), id(_id) {}
                               ^
../src/bucket_sorter.hpp:310:14: note: in instantiation of member function 'boost::bucket_sorter<unsigned long, unsigned long, boost::iterator_property_map<unsigned long *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, unsigned long, unsigned long &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::stack_<std::__1::__wrap_iter<const unsigned long *>, std::__1::__wrap_iter<const unsigned long *>>::stack_' requested here
      return const_stack(i, head, next.begin(), prev.begin(),
             ^
../src/degree.hpp:345:16: note: in instantiation of member function 'boost::bucket_sorter<unsigned long, unsigned long, boost::iterator_property_map<unsigned long *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, unsigned long, unsigned long &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::operator[]' requested here
        return _degs[x];
               ^
../src/preprocessing.hpp:1559:9: note: in instantiation of member function 'misc::DEGS<treedec::draft::directed_view<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>, detail::PP_degree_config>::operator[]' requested here
    if(!cdegs[0].empty()){
        ^
../src/preprocessing.hpp:1744:11: note: in instantiation of member function 'treedec::impl::preprocessing<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, draft::pp_cfg>::do_it' requested here
        A.do_it();
          ^
python_tdlib.cpp:181:18: note: in instantiation of function template specialization 'treedec::preprocessing<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, std::__1::vector<boost::tuples::tuple<unsigned int, std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int>>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::__1::allocator<boost::tuples::tuple<unsigned int, std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int>>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>>>>' requested here
        treedec::preprocessing(G, td_bags, lb);
                 ^
/usr/include/c++/v1/iterator:1529:60: note: declared private here
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
                                                           ^
python_tdlib.cpp:88:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:190:9: note: in instantiation of function template specialization 'make_tdlib_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>' requested here
        make_tdlib_graph(G, V_G, E_G);
        ^
python_tdlib.cpp:86:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
In file included from python_tdlib.cpp:25:
In file included from /usr/local/include/boost/tuple/tuple.hpp:28:
In file included from /usr/local/include/boost/tuple/detail/tuple_basic.hpp:40:
In file included from /usr/local/include/boost/utility/swap.hpp:15:
In file included from /usr/local/include/boost/core/swap.hpp:27:
/usr/include/c++/v1/algorithm:5387:13: error: no matching function for call to object of type 'std::__1::__less<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>, std::__1::__wrap_iter<unsigned long *>>'
        if (__comp(*__first2, *__first1))
            ^~~~~~
/usr/include/c++/v1/algorithm:5410:12: note: in instantiation of function template specialization 'std::__1::__set_union<std::__1::__less<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>, std::__1::__wrap_iter<unsigned long *>> &, subsets_iter<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>>::subset_iter, subsets_iter<std::__1::__wrap_iter<unsigned long *>>::subset_iter, std::__1::insert_iterator<std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>>>' requested here
    return __set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
           ^
/usr/include/c++/v1/algorithm:5419:19: note: in instantiation of function template specialization 'std::__1::set_union<subsets_iter<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>>::subset_iter, subsets_iter<std::__1::__wrap_iter<unsigned long *>>::subset_iter, std::__1::insert_iterator<std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>>, std::__1::__less<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>, std::__1::__wrap_iter<unsigned long *>>>' requested here
    return _VSTD::set_union(__first1, __last1, __first2, __last2, __result,
                  ^
../src/separator_algorithm.hpp:212:26: note: in instantiation of function template specialization 'std::__1::set_union<subsets_iter<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>>::subset_iter, subsets_iter<std::__1::__wrap_iter<unsigned long *>>::subset_iter, std::__1::insert_iterator<std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>>>' requested here
                    std::set_union((*I).first, (*I).second,
                         ^
../src/separator_algorithm.hpp:338:8: note: in instantiation of function template specialization 'treedec::nearly_balanced_seperator<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>, std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>, treedec::impl::disjoint_ways<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>>' requested here
    if(nearly_balanced_seperator(G, W, S, disabled, num_dis, k, dg)){
       ^
../src/separator_algorithm.hpp:418:20: note: in instantiation of function template specialization 'treedec::sep_decomp<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, treedec::bag_t, boost::no_property, boost::no_property, boost::listS>, std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>, std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>, std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>, treedec::impl::disjoint_ways<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>>' requested here
        finished = sep_decomp(G, T, emptySet, parent, vertices, disabled, num_dis, k, &dw);
                   ^
python_tdlib.cpp:583:18: note: in instantiation of function template specialization 'treedec::separator_algorithm<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, treedec::bag_t, boost::no_property, boost::no_property, boost::listS>>' requested here
        treedec::separator_algorithm(G, T);
                 ^
/usr/include/c++/v1/algorithm:699:10: note: candidate function not viable: no known conversion from 'const typename __wrap_iter<unsigned long *>::value_type' (aka 'const unsigned long') to 'const std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>' for 1st argument
    bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
         ^
/usr/include/c++/v1/algorithm:702:10: note: candidate function not viable: no known conversion from 'const typename __wrap_iter<unsigned long *>::value_type' (aka 'const unsigned long') to 'const std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>' for 1st argument
    bool operator()(const _T1& __x, const _T2& __y) const {return __x < __y;}
         ^
/usr/include/c++/v1/algorithm:705:10: note: candidate function not viable: no known conversion from 'const typename __wrap_iter<unsigned long *>::value_type' (aka 'const unsigned long') to 'const std::__1::__wrap_iter<unsigned long *>' for 1st argument
    bool operator()(const _T2& __x, const _T1& __y) const {return __x < __y;}
         ^
/usr/include/c++/v1/algorithm:708:10: note: candidate function not viable: no known conversion from 'const typename __wrap_iter<unsigned long *>::value_type' (aka 'const unsigned long') to 'const std::__1::__wrap_iter<unsigned long *>' for 1st argument
    bool operator()(const _T2& __x, const _T2& __y) const {return __x < __y;}
         ^
python_tdlib.cpp:88:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:637:5: note: in instantiation of function template specialization 'make_tdlib_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>' requested here
    make_tdlib_graph(G, V_G, E_G, true); //true = directed
    ^
python_tdlib.cpp:86:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
In file included from python_tdlib.cpp:30:
In file included from ../src/treedec.hpp:29:
In file included from ../src/graph.hpp:54:
In file included from ../src/degree.hpp:28:
In file included from ../src/bucket_sorter_bits.hpp:6:
../src/bucket_sorter.hpp:240:32: error: field of type 'std::__1::__wrap_iter<unsigned long *>' has private constructor
      : bucket_id(_bucket_id), head(h), next(n), prev(p), value(v), id(_id) {}
                               ^
../src/bucket_sorter.hpp:315:14: note: in instantiation of member function 'boost::bucket_sorter<unsigned long, unsigned long, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::stack_<std::__1::__wrap_iter<unsigned long *>, std::__1::__wrap_iter<unsigned long *>>::stack_' requested here
      return stack(i, head, next.begin(), prev.begin(),
             ^
../src/bucket_sorter.hpp:116:7: note: in instantiation of member function 'boost::bucket_sorter<unsigned long, unsigned long, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::operator[]' requested here
      (*this)[bucket[x]].push(x);
      ^
../src/minimum_degree_ordering.hpp:347:23: note: in instantiation of member function 'boost::bucket_sorter<unsigned long, unsigned long, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::push' requested here
          degreelists.push(*v);
                      ^
../src/minimum_degree_ordering.hpp:711:7: note: in instantiation of member function 'boost::detail::mmd_impl<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, int *, int *, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::mmd_impl' requested here
      impl(G, boost::num_vertices(G), degree, inverse_perm, 
      ^
../src/elimination_orderings.hpp:228:25: note: in instantiation of function template specialization 'boost::minimum_degree_ordering<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, int *, int *, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>' requested here
    unsigned w = boost::minimum_degree_ordering
                        ^
python_tdlib.cpp:644:20: note: in instantiation of function template specialization 'treedec::impl::boost_minDegree_ordering<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>' requested here
    treedec::impl::boost_minDegree_ordering(G, O);
                   ^
/usr/include/c++/v1/iterator:1529:60: note: declared private here
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
                                                           ^
python_tdlib.cpp:88:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:722:9: note: in instantiation of function template specialization 'make_tdlib_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, cfg_node, boost::no_property, boost::no_property, boost::listS>>' requested here
        make_tdlib_graph(G, V_G, E_G, true); //directed
        ^
python_tdlib.cpp:86:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
python_tdlib.cpp:110:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:814:5: note: in instantiation of function template specialization 'make_tdlib_decomp<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, treedec::bag_t, boost::no_property, boost::no_property, boost::listS>>' requested here
    make_tdlib_decomp(T, V_T, E_T);
    ^
python_tdlib.cpp:108:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
8 warnings and 4 errors generated.
gmake[3]: *** [Makefile:531: python_tdlib.lo] Error 1
gmake[3]: Leaving directory '/home/philipp/tdlib/tdlib'
gmake[2]: *** [Makefile:593: all-recursive] Error 1
gmake[2]: Leaving directory '/home/philipp/tdlib/tdlib'
gmake[1]: *** [Makefile:441: all-recursive] Error 1
gmake[1]: Leaving directory '/home/philipp/tdlib'
gmake: *** [Makefile:373: all] Error 2
felix-salfelder commented 3 years ago

On Wed, Mar 31, 2021 at 01:12:36AM -0700, Philipp Klaus Krause wrote:

../src/bucket_sorter.hpp:240:32: error: field of type 'std::1::wrap_iter<unsigned long *>' has private constructor : bucket_id(_bucket_id), head(h), next(n), prev(p), value(v), id(_id) {}

No idea why the raw unsigned long pointer still shows up.

I have pushed a workaround. please test.

spth commented 3 years ago

I suspect I don't have the current code, guess its just me being too stupid to pull from a git branch. I'm not that familiar with git, and working with branches is much harder there than in svn.

I'll try deleting the checked out repo and get it again somehow.

felix-salfelder commented 3 years ago

On Wed, Mar 31, 2021 at 02:23:25AM -0700, Philipp Klaus Krause wrote:

Same problem still:

my bad. see other email.

spth commented 3 years ago

So I did

git clone https://github.com/freetdi/tdlib.git
cd tdlib
git checkout iter

Which I hope gave me the code I should test. But after ./bootstrap, ./configure [lots of arguments here], gmake MAKE=gmake I still get the same errors.

P.S.: No, not the same errors. Before it was 4 errors, now it is down to 3:

philipp@generic:~/tdlib $ gmake MAKE=gmake
gmake  all-recursive
gmake[1]: Entering directory '/home/philipp/tdlib'
Making all in tests
gmake[2]: Entering directory '/home/philipp/tdlib/tests'
ln -sf ../src treedec
gmake  all-am
gmake[3]: Entering directory '/home/philipp/tdlib/tests'
gmake[3]: Nothing to be done for 'all-am'.
gmake[3]: Leaving directory '/home/philipp/tdlib/tests'
gmake[2]: Leaving directory '/home/philipp/tdlib/tests'
Making all in examples
gmake[2]: Entering directory '/home/philipp/tdlib/examples'
ln -s ../src treedec
gmake  all-recursive
gmake[3]: Entering directory '/home/philipp/tdlib/examples'
Making all in gr
gmake[4]: Entering directory '/home/philipp/tdlib/examples/gr'
gmake[4]: Nothing to be done for 'all'.
gmake[4]: Leaving directory '/home/philipp/tdlib/examples/gr'
gmake[4]: Entering directory '/home/philipp/tdlib/examples'
gmake[4]: Nothing to be done for 'all-am'.
gmake[4]: Leaving directory '/home/philipp/tdlib/examples'
gmake[3]: Leaving directory '/home/philipp/tdlib/examples'
gmake[2]: Leaving directory '/home/philipp/tdlib/examples'
Making all in tdlib
gmake[2]: Entering directory '/home/philipp/tdlib/tdlib'
Making all in .
gmake[3]: Entering directory '/home/philipp/tdlib/tdlib'
/usr/local/bin/cython-3.9 --cplus -w /home/philipp/tdlib /home/philipp/tdlib/tdlib/cytdlib.pyx -o /home/philipp/tdlib/tdlib/cytdlib.cpp
/usr/local/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/philipp/tdlib/tdlib/cytdlib.pxd
  tree = Parsing.p_module(s, pxd, full_module_name)
/bin/sh ../libtool  --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include/python3.9 -I../src -I/usr/local/include -DNDEBUG -pthread -Wl,-O1 -Wl,-Bsymbolic-functions -fno-strict-aliasing -g -fwrapv -O2 -Wall -Wformat -Werror=format-security -g -O2 -std=c++11 -MT cytdlib.lo -MD -MP -MF .deps/cytdlib.Tpo -c -o cytdlib.lo cytdlib.cpp
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/python3.9 -I../src -I/usr/local/include -DNDEBUG -pthread -Wl,-O1 -Wl,-Bsymbolic-functions -fno-strict-aliasing -g -fwrapv -O2 -Wall -Wformat -Werror=format-security -g -O2 -std=c++11 -MT cytdlib.lo -MD -MP -MF .deps/cytdlib.Tpo -c cytdlib.cpp  -fPIC -DPIC -o .libs/cytdlib.o
c++: warning: -Wl,-O1: 'linker' input unused [-Wunused-command-line-argument]
c++: warning: -Wl,-Bsymbolic-functions: 'linker' input unused [-Wunused-command-line-argument]
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/python3.9 -I../src -I/usr/local/include -DNDEBUG -pthread -Wl,-O1 -Wl,-Bsymbolic-functions -fno-strict-aliasing -g -fwrapv -O2 -Wall -Wformat -Werror=format-security -g -O2 -std=c++11 -MT cytdlib.lo -MD -MP -MF .deps/cytdlib.Tpo -c cytdlib.cpp -o cytdlib.o >/dev/null 2>&1
mv -f .deps/cytdlib.Tpo .deps/cytdlib.Plo
/bin/sh ../libtool  --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include/python3.9 -I../src -I/usr/local/include -DNDEBUG -pthread -Wl,-O1 -Wl,-Bsymbolic-functions -fno-strict-aliasing -g -fwrapv -O2 -Wall -Wformat -Werror=format-security -g -O2 -std=c++11 -MT python_tdlib.lo -MD -MP -MF .deps/python_tdlib.Tpo -c -o python_tdlib.lo python_tdlib.cpp
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/python3.9 -I../src -I/usr/local/include -DNDEBUG -pthread -Wl,-O1 -Wl,-Bsymbolic-functions -fno-strict-aliasing -g -fwrapv -O2 -Wall -Wformat -Werror=format-security -g -O2 -std=c++11 -MT python_tdlib.lo -MD -MP -MF .deps/python_tdlib.Tpo -c python_tdlib.cpp  -fPIC -DPIC -o .libs/python_tdlib.o
c++: warning: -Wl,-O1: 'linker' input unused [-Wunused-command-line-argument]
c++: warning: -Wl,-Bsymbolic-functions: 'linker' input unused [-Wunused-command-line-argument]
In file included from python_tdlib.cpp:40:
../src/combinations.hpp:857:9: warning: unused variable 'low' [-Wunused-variable]
    int low = -1;
        ^
python_tdlib.cpp:88:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:86:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
python_tdlib.cpp:110:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:108:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
python_tdlib.cpp:88:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:179:9: note: in instantiation of function template specialization 'make_tdlib_graph<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>' requested here
        make_tdlib_graph(G, V_G, E_G);
        ^
python_tdlib.cpp:86:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
In file included from python_tdlib.cpp:30:
In file included from ../src/treedec.hpp:29:
In file included from ../src/graph.hpp:54:
In file included from ../src/degree.hpp:28:
In file included from ../src/bucket_sorter_bits.hpp:6:
../src/bucket_sorter.hpp:43:9: error: field of type 'typename std::vector<size_type>::iterator' (aka '__wrap_iter<unsigned long *>') has private constructor
        head(next.size()?(&next[_length]):NULL),
        ^
../src/degree.hpp:145:10: note: in instantiation of member function 'boost::bucket_sorter<unsigned long, unsigned long, boost::iterator_property_map<unsigned long *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, unsigned long, unsigned long &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::bucket_sorter' requested here
         _degs(boost::num_vertices(g), // length
         ^
../src/preprocessing.hpp:235:11: note: in instantiation of member function 'misc::DEGS<treedec::draft::directed_view<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>, detail::PP_degree_config>::DEGS' requested here
          _degs(_g, _degreemap),
          ^
../src/preprocessing.hpp:1742:34: note: in instantiation of member function 'treedec::impl::preprocessing<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, draft::pp_cfg>::preprocessing' requested here
        impl::preprocessing<G_t> A(G);
                                 ^
python_tdlib.cpp:181:18: note: in instantiation of function template specialization 'treedec::preprocessing<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, std::__1::vector<boost::tuples::tuple<unsigned int, std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int>>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::__1::allocator<boost::tuples::tuple<unsigned int, std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int>>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>>>>' requested here
        treedec::preprocessing(G, td_bags, lb);
                 ^
/usr/include/c++/v1/iterator:1529:60: note: declared private here
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
                                                           ^
python_tdlib.cpp:88:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:190:9: note: in instantiation of function template specialization 'make_tdlib_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>' requested here
        make_tdlib_graph(G, V_G, E_G);
        ^
python_tdlib.cpp:86:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
In file included from python_tdlib.cpp:25:
In file included from /usr/local/include/boost/tuple/tuple.hpp:28:
In file included from /usr/local/include/boost/tuple/detail/tuple_basic.hpp:40:
In file included from /usr/local/include/boost/utility/swap.hpp:15:
In file included from /usr/local/include/boost/core/swap.hpp:27:
/usr/include/c++/v1/algorithm:5387:13: error: no matching function for call to object of type 'std::__1::__less<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>, std::__1::__wrap_iter<unsigned long *>>'
        if (__comp(*__first2, *__first1))
            ^~~~~~
/usr/include/c++/v1/algorithm:5410:12: note: in instantiation of function template specialization 'std::__1::__set_union<std::__1::__less<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>, std::__1::__wrap_iter<unsigned long *>> &, subsets_iter<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>>::subset_iter, subsets_iter<std::__1::__wrap_iter<unsigned long *>>::subset_iter, std::__1::insert_iterator<std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>>>' requested here
    return __set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
           ^
/usr/include/c++/v1/algorithm:5419:19: note: in instantiation of function template specialization 'std::__1::set_union<subsets_iter<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>>::subset_iter, subsets_iter<std::__1::__wrap_iter<unsigned long *>>::subset_iter, std::__1::insert_iterator<std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>>, std::__1::__less<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>, std::__1::__wrap_iter<unsigned long *>>>' requested here
    return _VSTD::set_union(__first1, __last1, __first2, __last2, __result,
                  ^
../src/separator_algorithm.hpp:212:26: note: in instantiation of function template specialization 'std::__1::set_union<subsets_iter<std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>>::subset_iter, subsets_iter<std::__1::__wrap_iter<unsigned long *>>::subset_iter, std::__1::insert_iterator<std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>>>' requested here
                    std::set_union((*I).first, (*I).second,
                         ^
../src/separator_algorithm.hpp:338:8: note: in instantiation of function template specialization 'treedec::nearly_balanced_seperator<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>, std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>, treedec::impl::disjoint_ways<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>>' requested here
    if(nearly_balanced_seperator(G, W, S, disabled, num_dis, k, dg)){
       ^
../src/separator_algorithm.hpp:418:20: note: in instantiation of function template specialization 'treedec::sep_decomp<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, treedec::bag_t, boost::no_property, boost::no_property, boost::listS>, std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>, std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>, std::__1::set<unsigned long, std::__1::less<unsigned long>, std::__1::allocator<unsigned long>>, treedec::impl::disjoint_ways<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>>' requested here
        finished = sep_decomp(G, T, emptySet, parent, vertices, disabled, num_dis, k, &dw);
                   ^
python_tdlib.cpp:583:18: note: in instantiation of function template specialization 'treedec::separator_algorithm<boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, treedec::bag_t, boost::no_property, boost::no_property, boost::listS>>' requested here
        treedec::separator_algorithm(G, T);
                 ^
/usr/include/c++/v1/algorithm:699:10: note: candidate function not viable: no known conversion from 'const typename __wrap_iter<unsigned long *>::value_type' (aka 'const unsigned long') to 'const std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>' for 1st argument
    bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
         ^
/usr/include/c++/v1/algorithm:702:10: note: candidate function not viable: no known conversion from 'const typename __wrap_iter<unsigned long *>::value_type' (aka 'const unsigned long') to 'const std::__1::__tree_const_iterator<unsigned long, std::__1::__tree_node<unsigned long, void *> *, long>' for 1st argument
    bool operator()(const _T1& __x, const _T2& __y) const {return __x < __y;}
         ^
/usr/include/c++/v1/algorithm:705:10: note: candidate function not viable: no known conversion from 'const typename __wrap_iter<unsigned long *>::value_type' (aka 'const unsigned long') to 'const std::__1::__wrap_iter<unsigned long *>' for 1st argument
    bool operator()(const _T2& __x, const _T1& __y) const {return __x < __y;}
         ^
/usr/include/c++/v1/algorithm:708:10: note: candidate function not viable: no known conversion from 'const typename __wrap_iter<unsigned long *>::value_type' (aka 'const unsigned long') to 'const std::__1::__wrap_iter<unsigned long *>' for 1st argument
    bool operator()(const _T2& __x, const _T2& __y) const {return __x < __y;}
         ^
python_tdlib.cpp:88:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:637:5: note: in instantiation of function template specialization 'make_tdlib_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>' requested here
    make_tdlib_graph(G, V_G, E_G, true); //true = directed
    ^
python_tdlib.cpp:86:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
In file included from python_tdlib.cpp:30:
In file included from ../src/treedec.hpp:29:
In file included from ../src/graph.hpp:54:
In file included from ../src/degree.hpp:28:
In file included from ../src/bucket_sorter_bits.hpp:6:
../src/bucket_sorter.hpp:43:9: error: field of type 'typename std::vector<size_type>::iterator' (aka '__wrap_iter<unsigned long *>') has private constructor
        head(next.size()?(&next[_length]):NULL),
        ^
../src/minimum_degree_ordering.hpp:328:9: note: in instantiation of member function 'boost::bucket_sorter<unsigned long, unsigned long, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::bucket_sorter' requested here
        degreelists(n_ + 1, n_, degree, id),
        ^
../src/minimum_degree_ordering.hpp:711:7: note: in instantiation of member function 'boost::detail::mmd_impl<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, int *, int *, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>::mmd_impl' requested here
      impl(G, boost::num_vertices(G), degree, inverse_perm, 
      ^
../src/elimination_orderings.hpp:228:25: note: in instantiation of function template specialization 'boost::minimum_degree_ordering<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, int *, int *, boost::iterator_property_map<int *, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>, int, int &>, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned long>>' requested here
    unsigned w = boost::minimum_degree_ordering
                        ^
python_tdlib.cpp:644:20: note: in instantiation of function template specialization 'treedec::impl::boost_minDegree_ordering<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>' requested here
    treedec::impl::boost_minDegree_ordering(G, O);
                   ^
/usr/include/c++/v1/iterator:1529:60: note: declared private here
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
                                                           ^
python_tdlib.cpp:88:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:722:9: note: in instantiation of function template specialization 'make_tdlib_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, cfg_node, boost::no_property, boost::no_property, boost::listS>>' requested here
        make_tdlib_graph(G, V_G, E_G, true); //directed
        ^
python_tdlib.cpp:86:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
python_tdlib.cpp:110:13: warning: variable 'j' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
            j++;
            ^
python_tdlib.cpp:814:5: note: in instantiation of function template specialization 'make_tdlib_decomp<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, treedec::bag_t, boost::no_property, boost::no_property, boost::listS>>' requested here
    make_tdlib_decomp(T, V_T, E_T);
    ^
python_tdlib.cpp:108:49: note: incremented here
        for(unsigned int j = 0; j < E.size()-1; j++){
                                                ^
8 warnings and 3 errors generated.
gmake[3]: *** [Makefile:529: python_tdlib.lo] Error 1
rm cytdlib.cpp
gmake[3]: Leaving directory '/home/philipp/tdlib/tdlib'
gmake[2]: *** [Makefile:591: all-recursive] Error 1
gmake[2]: Leaving directory '/home/philipp/tdlib/tdlib'
gmake[1]: *** [Makefile:438: all-recursive] Error 1
gmake[1]: Leaving directory '/home/philipp/tdlib'
gmake: *** [Makefile:370: all] Error 2
felix-salfelder commented 3 years ago

On Wed, Mar 31, 2021 at 02:38:35AM -0700, Philipp Klaus Krause wrote:

Which I hope gave me the code I should test. But after ./bootstrap, ./configure [lots of arguments here], gmake MAKE=gmake I still get the same errors.

the line (240) from your error message : bucket_id(_bucket_id), head(h), next(n), prev(p), value(v), id(_id) {}

is now line 241, and between #if 0 and #else

(don't know what else went wrong)