PowerDNS/weakforced

[BUG] cannot make from git source

jahlives opened this issue · 4 comments

Describe the bug
cannot run make on source from git

To Reproduce
Steps to reproduce the behavior:

  1. clone from git
  2. install all dependencies
  3. autoreconf -i
  4. ./configure
  5. make
  6. see errors below

Expected behavior
make command should be without errors if configure is happy

OS (please complete the following information):

  • OS: Centos
  • Version 7

Additional context
output from make command

make  all-recursive
make[1]: Entering directory `/work/weakforced'
Making all in ext
make[2]: Entering directory `/work/weakforced/ext'
Making all in yahttp
make[3]: Entering directory `/work/weakforced/ext/yahttp'
Making all in yahttp
make[4]: Entering directory `/work/weakforced/ext/yahttp/yahttp'
  CXX      libyahttp_la-reqresp.lo
  CXX      libyahttp_la-router.lo
  CXXLD    libyahttp.la
make[4]: Leaving directory `/work/weakforced/ext/yahttp/yahttp'
make[4]: Entering directory `/work/weakforced/ext/yahttp'
make[4]: Für das Ziel »all-am« ist nichts zu tun.
make[4]: Leaving directory `/work/weakforced/ext/yahttp'
make[3]: Leaving directory `/work/weakforced/ext/yahttp'
Making all in json11
make[3]: Entering directory `/work/weakforced/ext/json11'
  CXX      libjson11_la-json11.lo
  CXXLD    libjson11.la
make[3]: Leaving directory `/work/weakforced/ext/json11'
Making all in ext
make[3]: Entering directory `/work/weakforced/ext/ext'
  CXX      count_min_sketch.lo
  CXX      murmur3.lo
  CXX      threadname.lo
  CXX      uap-cpp/UaParser.lo
  CXXLD    libext.la
make[3]: Leaving directory `/work/weakforced/ext/ext'
make[3]: Entering directory `/work/weakforced/ext'
make[3]: Für das Ziel »all-am« ist nichts zu tun.
make[3]: Leaving directory `/work/weakforced/ext'
make[2]: Leaving directory `/work/weakforced/ext'
Making all in docs
make[2]: Entering directory `/work/weakforced/docs'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/work/weakforced/docs'
Making all in common
make[2]: Entering directory `/work/weakforced/common'
  CXX      dns_lookup.lo
  CXX      wforce-geoip.lo
  CXX      wforce-geoip2.lo
  CXX      twmap-static.lo
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8.2/bits/char_traits.h:39,
                 from /usr/include/c++/4.8.2/string:40,
                 from twmap.hh:24,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/bits/stl_pair.h: In instantiation of 'constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&) [with _U1 = long int&; <template-parameter-2-2> = void; _T1 = long int; _T2 = std::basic_stringstream<char>]':
/usr/include/c++/4.8.2/bits/stl_pair.h:281:72:   required from 'constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = long int&; _T2 = std::basic_stringstream<char>; typename std::__decay_and_strip<_T2>::__type = std::basic_stringstream<char>; typename std::__decay_and_strip<_Tp>::__type = long int]'
twmap.hh:398:67:   required from here
/usr/include/c++/4.8.2/bits/stl_pair.h:134:45: error: use of deleted function 'std::basic_stringstream<char>::basic_stringstream(const std::basic_stringstream<char>&)'
  : first(std::forward<_U1>(__x)), second(__y) { }
                                             ^
In file included from twmap.hh:36:0,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/sstream:502:11: note: 'std::basic_stringstream<char>::basic_stringstream(const std::basic_stringstream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_stringstream : public basic_iostream<_CharT, _Traits>
           ^
/usr/include/c++/4.8.2/sstream:502:11: error: use of deleted function 'std::basic_iostream<char>::basic_iostream(const std::basic_iostream<char>&)'
In file included from /usr/include/c++/4.8.2/iostream:40:0,
                 from /usr/include/boost/assert.hpp:82,
                 from /usr/include/boost/variant/detail/backup_holder.hpp:17,
                 from /usr/include/boost/variant/variant.hpp:28,
                 from /usr/include/boost/variant.hpp:17,
                 from twmap.hh:33,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/istream:795:11: note: 'std::basic_iostream<char>::basic_iostream(const std::basic_iostream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_iostream
           ^
/usr/include/c++/4.8.2/istream:795:11: error: use of deleted function 'std::basic_istream<char>::basic_istream(const std::basic_istream<char>&)'
/usr/include/c++/4.8.2/istream:58:11: note: 'std::basic_istream<char>::basic_istream(const std::basic_istream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_istream : virtual public basic_ios<_CharT, _Traits>
           ^
/usr/include/c++/4.8.2/istream:58:11: error: use of deleted function 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)'
In file included from /usr/include/c++/4.8.2/ios:44:0,
                 from /usr/include/c++/4.8.2/ostream:38,
                 from /usr/include/c++/4.8.2/iostream:39,
                 from /usr/include/boost/assert.hpp:82,
                 from /usr/include/boost/variant/detail/backup_holder.hpp:17,
                 from /usr/include/boost/variant/variant.hpp:28,
                 from /usr/include/boost/variant.hpp:17,
                 from twmap.hh:33,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/bits/basic_ios.h:66:11: note: 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_ios : public ios_base
           ^
In file included from /usr/include/c++/4.8.2/ios:42:0,
                 from /usr/include/c++/4.8.2/ostream:38,
                 from /usr/include/c++/4.8.2/iostream:39,
                 from /usr/include/boost/assert.hpp:82,
                 from /usr/include/boost/variant/detail/backup_holder.hpp:17,
                 from /usr/include/boost/variant/variant.hpp:28,
                 from /usr/include/boost/variant.hpp:17,
                 from twmap.hh:33,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/bits/ios_base.h:786:5: error: 'std::ios_base::ios_base(const std::ios_base&)' is private
     ios_base(const ios_base&);
     ^
In file included from /usr/include/c++/4.8.2/ios:44:0,
                 from /usr/include/c++/4.8.2/ostream:38,
                 from /usr/include/c++/4.8.2/iostream:39,
                 from /usr/include/boost/assert.hpp:82,
                 from /usr/include/boost/variant/detail/backup_holder.hpp:17,
                 from /usr/include/boost/variant/variant.hpp:28,
                 from /usr/include/boost/variant.hpp:17,
                 from twmap.hh:33,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/bits/basic_ios.h:66:11: error: within this context
     class basic_ios : public ios_base
           ^
In file included from /usr/include/c++/4.8.2/iostream:40:0,
                 from /usr/include/boost/assert.hpp:82,
                 from /usr/include/boost/variant/detail/backup_holder.hpp:17,
                 from /usr/include/boost/variant/variant.hpp:28,
                 from /usr/include/boost/variant.hpp:17,
                 from twmap.hh:33,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/istream:795:11: error: use of deleted function 'std::basic_ostream<char>::basic_ostream(const std::basic_ostream<char>&)'
     class basic_iostream
           ^
In file included from /usr/include/c++/4.8.2/iostream:39:0,
                 from /usr/include/boost/assert.hpp:82,
                 from /usr/include/boost/variant/detail/backup_holder.hpp:17,
                 from /usr/include/boost/variant/variant.hpp:28,
                 from /usr/include/boost/variant.hpp:17,
                 from twmap.hh:33,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/ostream:58:11: note: 'std::basic_ostream<char>::basic_ostream(const std::basic_ostream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_ostream : virtual public basic_ios<_CharT, _Traits>
           ^
/usr/include/c++/4.8.2/ostream:58:11: error: use of deleted function 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)'
In file included from /usr/include/c++/4.8.2/iostream:40:0,
                 from /usr/include/boost/assert.hpp:82,
                 from /usr/include/boost/variant/detail/backup_holder.hpp:17,
                 from /usr/include/boost/variant/variant.hpp:28,
                 from /usr/include/boost/variant.hpp:17,
                 from twmap.hh:33,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/istream:795:11: error: use of deleted function 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)'
     class basic_iostream
           ^
In file included from twmap.hh:36:0,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/sstream:502:11: error: use of deleted function 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)'
     class basic_stringstream : public basic_iostream<_CharT, _Traits>
           ^
/usr/include/c++/4.8.2/sstream:502:11: error: use of deleted function 'std::basic_stringbuf<char>::basic_stringbuf(const std::basic_stringbuf<char>&)'
/usr/include/c++/4.8.2/sstream:64:11: note: 'std::basic_stringbuf<char>::basic_stringbuf(const std::basic_stringbuf<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
           ^
In file included from /usr/include/c++/4.8.2/ios:43:0,
                 from /usr/include/c++/4.8.2/ostream:38,
                 from /usr/include/c++/4.8.2/iostream:39,
                 from /usr/include/boost/assert.hpp:82,
                 from /usr/include/boost/variant/detail/backup_holder.hpp:17,
                 from /usr/include/boost/variant/variant.hpp:28,
                 from /usr/include/boost/variant.hpp:17,
                 from twmap.hh:33,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/streambuf:802:7: error: 'std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]' is private
       basic_streambuf(const basic_streambuf& __sb)
       ^
In file included from twmap.hh:36:0,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/sstream:64:11: error: within this context
     class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
           ^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8.2/bits/char_traits.h:39,
                 from /usr/include/c++/4.8.2/string:40,
                 from twmap.hh:24,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/bits/stl_pair.h: In instantiation of 'constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = long int&; _T2 = std::basic_stringstream<char>; typename std::__decay_and_strip<_T2>::__type = std::basic_stringstream<char>; typename std::__decay_and_strip<_Tp>::__type = long int]':
twmap.hh:398:67:   required from here
/usr/include/c++/4.8.2/bits/stl_pair.h:281:72: error: use of deleted function 'constexpr std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = long int; _T2 = std::basic_stringstream<char>]'
       return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
                                                                        ^
/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 = long int; _T2 = std::basic_stringstream<char>]' is implicitly deleted because the default definition would be ill-formed:
       constexpr pair(pair&&) = default;
                 ^
/usr/include/c++/4.8.2/bits/stl_pair.h:128:17: error: use of deleted function 'std::basic_stringstream<char>::basic_stringstream(const std::basic_stringstream<char>&)'
In file included from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++allocator.h:33:0,
                 from /usr/include/c++/4.8.2/bits/allocator.h:46,
                 from /usr/include/c++/4.8.2/string:41,
                 from twmap.hh:24,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::pair<long int, std::basic_stringstream<char> >; _Args = {std::pair<long int, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > >}; _Tp = std::pair<long int, std::basic_stringstream<char> >]':
/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::pair<long int, std::basic_stringstream<char> >; _Args = {std::pair<long int, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > >}; _Alloc = std::allocator<std::pair<long int, std::basic_stringstream<char> > >; 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::pair<long int, std::basic_stringstream<char> >; _Args = {std::pair<long int, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > >}; _Alloc = std::allocator<std::pair<long int, std::basic_stringstream<char> > >; decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) = <type error>]'
/usr/include/c++/4.8.2/bits/vector.tcc:97:40:   required from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {std::pair<long int, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > >}; _Tp = std::pair<long int, std::basic_stringstream<char> >; _Alloc = std::allocator<std::pair<long int, std::basic_stringstream<char> > >]'
twmap.hh:398:68:   required from here
/usr/include/c++/4.8.2/ext/new_allocator.h:120:4: error: use of deleted function 'constexpr std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = long int; _T2 = std::basic_stringstream<char>]'
  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
    ^
In file included from /usr/include/c++/4.8.2/vector:62:0,
                 from twmap.hh:25,
                 from twmap-static.cc:23:
/usr/include/c++/4.8.2/bits/stl_construct.h: In instantiation of 'void std::_Construct(_T1*, _Args&& ...) [with _T1 = std::pair<long int, std::basic_stringstream<char> >; _Args = {std::pair<long int, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > >}]':
/usr/include/c++/4.8.2/bits/stl_uninitialized.h:75:53:   required from 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<std::pair<long int, std::basic_stringstream<char> >*>; _ForwardIterator = std::pair<long int, std::basic_stringstream<char> >*; bool _TrivialValueTypes = false]'
/usr/include/c++/4.8.2/bits/stl_uninitialized.h:117:41:   required from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<std::pair<long int, std::basic_stringstream<char> >*>; _ForwardIterator = std::pair<long int, std::basic_stringstream<char> >*]'
/usr/include/c++/4.8.2/bits/stl_uninitialized.h:258:63:   required from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = std::move_iterator<std::pair<long int, std::basic_stringstream<char> >*>; _ForwardIterator = std::pair<long int, std::basic_stringstream<char> >*; _Tp = std::pair<long int, std::basic_stringstream<char> >]'
/usr/include/c++/4.8.2/bits/stl_uninitialized.h:281:69:   required from '_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = std::pair<long int, std::basic_stringstream<char> >*; _ForwardIterator = std::pair<long int, std::basic_stringstream<char> >*; _Allocator = std::allocator<std::pair<long int, std::basic_stringstream<char> > >]'
/usr/include/c++/4.8.2/bits/vector.tcc:415:43:   required from 'void std::vector<_Tp, _Alloc>::_M_emplace_back_aux(_Args&& ...) [with _Args = {std::pair<long int, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > >}; _Tp = std::pair<long int, std::basic_stringstream<char> >; _Alloc = std::allocator<std::pair<long int, std::basic_stringstream<char> > >]'
/usr/include/c++/4.8.2/bits/vector.tcc:101:54:   required from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {std::pair<long int, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > >}; _Tp = std::pair<long int, std::basic_stringstream<char> >; _Alloc = std::allocator<std::pair<long int, std::basic_stringstream<char> > >]'
twmap.hh:398:68:   required from here
/usr/include/c++/4.8.2/bits/stl_construct.h:75:7: error: use of deleted function 'constexpr std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = long int; _T2 = std::basic_stringstream<char>]'
     { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
       ^
make[2]: *** [twmap-static.lo] Fehler 1
make[2]: Leaving directory `/work/weakforced/common'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/work/weakforced'
make: *** [all] Fehler 2

Try using clang or newer gcc.

I installed clang from repo (extras) and exported the compiler as this

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

before running autoreconf.
./configure shows lines like

checking how to run the C++ preprocessor... /usr/bin/clang++ -E

so I assume my export above did work. But make still fails

/usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_pair.h:134:35: error: call to implicitly-deleted copy constructor of 'std::basic_stringstream<char>'
        : first(std::forward<_U1>(__x)), second(__y) { }

with lines related to gcc 4.8.5 (the stock gcc from repo).

Is it not enough to export the compiler as above? Does special flags need to be passed to configure too?

installed gcc from scl repo

yum install centos-release-scl
yum install devtoolset-8-gcc*
scl enable devtoolset-8 bash
gcc --version
gcc (GCC) 8.2.1 20180905 (Red Hat 8.2.1-3)

and make could finish the job.