zerotier / ZeroTierOne

A Smart Ethernet Switch for Earth
https://zerotier.com
Other
14.65k stars 1.71k forks source link

FreeBSD build errors on dev #615

Closed jungle-boogie closed 7 years ago

jungle-boogie commented 7 years ago

Hi,

I see you submitted a gigantic update just a little while ago. Unfortunately, there's some build errors on freeBSD 11.1:

lang++ -O3 -fstack-protector -Wall -fPIE -fvisibility=hidden -fstack-protector -pthread  -DNDEBUG  -DZT_BUILD_PLATFORM=7 -DZT_BUILD_ARCHITECTURE=1 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" -fno-rtti -std=c++11    -c -o controller/EmbeddedNetworkController.o controller/EmbeddedNetworkController.cpp
In file included from controller/EmbeddedNetworkController.cpp:30:
In file included from /usr/include/c++/v1/algorithm:640:
/usr/include/c++/v1/memory:1783:31: error: call to implicitly-deleted copy constructor of
      'std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry, std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >'
            ::new((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
                              ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/memory:1694:18: note: in instantiation of function template specialization
      'std::__1::allocator<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >
      >::construct<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >, const
      std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry, std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> > &>'
      requested here
            {__a.construct(__p, _VSTD::forward<_Args>(__args)...);}
                 ^
/usr/include/c++/v1/memory:1540:14: note: in instantiation of function template specialization
      'std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> > >
      >::__construct<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >, const
      std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry, std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> > &>'
      requested here
            {__construct(__has_construct<allocator_type, _Tp*, _Args...>(),
             ^
/usr/include/c++/v1/deque:1808:21: note: in instantiation of function template specialization
      'std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> > >
      >::construct<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >, const
      std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry, std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> > &>'
      requested here
    __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), __v);
                    ^
/usr/include/c++/v1/queue:288:41: note: in instantiation of member function
      'std::__1::deque<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >,
      std::__1::allocator<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> > > >::push_back' requested here
    void push(const value_type& __v) {c.push_back(__v);}
                                        ^
controller/../osdep/BlockingQueue.hpp:51:5: note: in instantiation of member function
      'std::__1::queue<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >,
      std::__1::deque<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >,
      std::__1::allocator<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> > > > >::push' requested here
                q.push(t);
                  ^
controller/EmbeddedNetworkController.cpp:499:9: note: in instantiation of member function
      'ZeroTier::BlockingQueue<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> > >::post' requested here
        _queue.post(std::unique_ptr<_RQEntry>(qe));
               ^
/usr/include/c++/v1/memory:2481:31: note: copy constructor is implicitly deleted because 'unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >' has a user-declared move constructor
    _LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr&& __u) _NOEXCEPT
                              ^
In file included from controller/EmbeddedNetworkController.cpp:40:
In file included from controller/EmbeddedNetworkController.hpp:43:
controller/../osdep/BlockingQueue.hpp:70:9: error: object of type 'std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >' cannot be assigned because its copy assignment operator is implicitly
      deleted
                value = q.front();
                      ^
controller/EmbeddedNetworkController.cpp:1725:16: note: in instantiation of member function
      'ZeroTier::BlockingQueue<std::__1::unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry,
      std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> > >::get' requested here
                                if (_queue.get(qe))
                                           ^
/usr/include/c++/v1/memory:2481:31: note: copy assignment operator is implicitly deleted because
      'unique_ptr<ZeroTier::EmbeddedNetworkController::_RQEntry, std::__1::default_delete<ZeroTier::EmbeddedNetworkController::_RQEntry> >' has a
      user-declared move constructor
    _LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr&& __u) _NOEXCEPT
                              ^
2 errors generated.
gmake: *** [<builtin>: controller/EmbeddedNetworkController.o] Error 1
1:27.86 real, 1:14.86 user, 1.845 sys;  page: 16 hard/200803 soft, swap: 0, I/O: 23/9
Mem: 109744KB (50465KB shared + 459KB data/stack = 50925KB), VCSW: 649 IVCSW: 5463
jungle-boogie commented 7 years ago

Thanks for keeping the zerotier project updated!