New issue

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

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

Already on GitHub? Sign in to your account

Dnsdist fails to build with Clang on FreeBSD #3552

Closed
rubenk opened this Issue Mar 11, 2016 · 4 comments

Comments

Projects
None yet
5 participants
@rubenk
Copy link
Contributor

rubenk commented Mar 11, 2016

In file included from dnsdist-lua.cc:1:
In file included from ./dnsdist.hh:3:
In file included from ./ext/luawrapper/include/LuaContext.hpp:31:
In file included from /usr/include/c++/v1/algorithm:628:
In file included from /usr/include/c++/v1/memory:609:
/usr/include/c++/v1/tuple:221:10: error: static_assert failed "Attempted to construct a reference element in a tuple with an rvalue"
        {static_assert(!is_reference<_Hp>::value ||
         ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/tuple:437:15: note: in instantiation of function template specialization 'std::__1::__tuple_leaf<0, const std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > > &, false>::__tuple_leaf<std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > >, void>' requested here
            : __tuple_leaf<_Indx, _Tp>(_VSTD::forward<typename tuple_element<_Indx,
              ^
/usr/include/c++/v1/tuple:662:15: note: in instantiation of function template specialization 'std::__1::__tuple_impl<std::__1::__tuple_indices<0, 1>, const std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > > &, const DNSQuestion *>::__tuple_impl<std::__1::tuple<std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > >, const DNSQuestion *>, void>' requested here
            : base_(_VSTD::forward<_Tuple>(__t)) {}
              ^
./ext/luawrapper/include/LuaContext.hpp:1313:76: note: in instantiation of function template specialization 'std::__1::tuple<const std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > > &, const DNSQuestion *>::tuple<std::__1::tuple<std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > >, const DNSQuestion *>, false>' requested here
        auto inArguments = Pusher<std::tuple<TParameters...>>::push(state, std::make_tuple(std::forward<TParameters>(input)...));
                                                                           ^
./ext/luawrapper/include/LuaContext.hpp:1812:16: note: in instantiation of function template specialization 'LuaContext::call<std::__1::shared_ptr<DownstreamState>, const std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > > &, const DNSQuestion *>' requested here
        return call<TRetValue>(state, std::move(obj), std::forward<TParams>(params)...);
               ^
/usr/include/c++/v1/__functional_base:415:12: note: in instantiation of member function 'LuaContext::LuaFunctionCaller<std::__1::shared_ptr<DownstreamState> (const std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > > &, const DNSQuestion *)>::operator()' requested here
    return _VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...);
           ^
/usr/include/c++/v1/__config:388:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/usr/include/c++/v1/__functional_base:430:16: note: (skipping 10 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
        return __invoke(_VSTD::forward<_Args>(__args)...);
               ^
./ext/luawrapper/include/LuaContext.hpp:2267:27: note: in instantiation of function template specialization 'LuaContext::Pusher<void (std::__1::basic_string<char>, std::__1::function<std::__1::shared_ptr<DownstreamState> (const std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > > &, const DNSQuestion *)>), void>::push<(lambda at dnsdist-lua.cc:415:45)>' requested here
        return SubPusher::push(state, value);
                          ^
./ext/luawrapper/include/LuaContext.hpp:938:65: note: in instantiation of function template specialization 'LuaContext::Pusher<void (*)(std::__1::basic_string<char>, std::__1::function<std::__1::shared_ptr<DownstreamState> (const std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > > &, const DNSQuestion *)>), void>::push<(lambda at dnsdist-lua.cc:415:45)>' requested here
        auto p1 = Pusher<typename std::decay<TDataType>::type>::push(state, std::forward<TData>(data));
                                                                ^
./ext/luawrapper/include/LuaContext.hpp:652:9: note: in instantiation of function template specialization 'LuaContext::setTable<void (std::__1::basic_string<char>, std::__1::function<std::__1::shared_ptr<DownstreamState> (const std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > > &, const DNSQuestion *)>), (lambda at dnsdist-lua.cc:415:45)>' requested here
        setTable<TFunctionType>(mState, Globals, std::forward<TData>(data)...);
        ^
./ext/luawrapper/include/LuaContext.hpp:667:16: note: in instantiation of function template specialization 'LuaContext::writeFunction<void (std::__1::basic_string<char>, std::__1::function<std::__1::shared_ptr<DownstreamState> (const std::__1::vector<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> >, std::__1::allocator<std::__1::pair<unsigned int, std::__1::shared_ptr<DownstreamState> > > > &, const DNSQuestion *)>), char const (&)[19], (lambda at dnsdist-lua.cc:415:45)>' requested here
        return writeFunction<DetectedFunctionType>(std::forward<TData>(data)...);
               ^
dnsdist-lua.cc:415:9: note: in instantiation of function template specialization 'LuaContext::writeFunction<char const (&)[19], (lambda at dnsdist-lua.cc:415:45)>' requested here
  g_lua.writeFunction("setServerPolicyLua", [](string name, policyfunc_t policy)  {
        ^
In file included from dnsdist-lua.cc:1:
In file included from ./dnsdist.hh:3:
./ext/luawrapper/include/LuaContext.hpp:1068:190: error: attempt to use a deleted function
        setTable<TRetValue(TObject const*, TOtherParams...)>(mState, Registry, &typeid(TObject const*), 0, functionName, [=](TObject const* obj, TOtherParams... rest) { assert(obj); return function(*obj, std::forward<TOtherParams>(rest)...); });
                                                                                                                                                                                             ^
./ext/luawrapper/include/LuaContext.hpp:1083:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(functionName, std::move(function), tag<const TObject>{}, tag<TRetValue (TOtherParams...)>{});
        ^
./ext/luawrapper/include/LuaContext.hpp:356:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(name, std::mem_fn(pointer), tag<TPointerToMemberFunction>{});
        ^
dnsdist-lua.cc:970:9: note: in instantiation of function template specialization 'LuaContext::registerFunction<std::__1::basic_string<char> (ComboAddress::*)() const>' requested here
  g_lua.registerFunction("tostring", &ComboAddress::toString);
        ^
/usr/include/c++/v1/type_traits:1069:5: note: '~__nat' has been explicitly marked deleted here
    ~__nat() = delete;
    ^
In file included from dnsdist-lua.cc:1:
In file included from ./dnsdist.hh:3:
./ext/luawrapper/include/LuaContext.hpp:1071:245: error: attempt to use a deleted function
        setTable<TRetValue(std::shared_ptr<TObject const>, TOtherParams...)>(mState, Registry, &typeid(std::shared_ptr<TObject const>), 0, functionName, [=](const std::shared_ptr<TObject const>& obj, TOtherParams... rest) { assert(obj); return function(*obj, std::forward<TOtherParams>(rest)...); });
                                                                                                                                                                                                                                                    ^
/usr/include/c++/v1/type_traits:1069:5: note: '~__nat' has been explicitly marked deleted here
    ~__nat() = delete;
    ^
In file included from dnsdist-lua.cc:1:
In file included from ./dnsdist.hh:3:
./ext/luawrapper/include/LuaContext.hpp:1056:172: error: attempt to use a deleted function
        setTable<TRetValue(TObject*, TOtherParams...)>(mState, Registry, &typeid(TObject*), 0, functionName, [=](TObject* obj, TOtherParams... rest) { assert(obj); return function(*obj, std::forward<TOtherParams>(rest)...); });
                                                                                                                                                                           ^
./ext/luawrapper/include/LuaContext.hpp:1065:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(functionName, function, tag<TObject>{}, fTypeTag);
        ^
./ext/luawrapper/include/LuaContext.hpp:1083:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(functionName, std::move(function), tag<const TObject>{}, tag<TRetValue (TOtherParams...)>{});
        ^
./ext/luawrapper/include/LuaContext.hpp:356:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(name, std::mem_fn(pointer), tag<TPointerToMemberFunction>{});
        ^
dnsdist-lua.cc:970:9: note: in instantiation of function template specialization 'LuaContext::registerFunction<std::__1::basic_string<char> (ComboAddress::*)() const>' requested here
  g_lua.registerFunction("tostring", &ComboAddress::toString);
        ^
/usr/include/c++/v1/type_traits:1069:5: note: '~__nat' has been explicitly marked deleted here
    ~__nat() = delete;
    ^
In file included from dnsdist-lua.cc:1:
In file included from ./dnsdist.hh:3:
./ext/luawrapper/include/LuaContext.hpp:1059:227: error: attempt to use a deleted function
        setTable<TRetValue(std::shared_ptr<TObject>, TOtherParams...)>(mState, Registry, &typeid(std::shared_ptr<TObject>), 0, functionName, [=](const std::shared_ptr<TObject>& obj, TOtherParams... rest) { assert(obj); return function(*obj, std::forward<TOtherParams>(rest)...); });
                                                                                                                                                                                                                                  ^
/usr/include/c++/v1/type_traits:1069:5: note: '~__nat' has been explicitly marked deleted here
    ~__nat() = delete;
    ^
In file included from dnsdist-lua.cc:1:
In file included from ./dnsdist.hh:3:
./ext/luawrapper/include/LuaContext.hpp:1602:16: error: attempt to use a deleted function
        return callback();
               ^
./ext/luawrapper/include/LuaContext.hpp:1632:16: note: in instantiation of function template specialization 'LuaContext::readIntoFunction<std::__1::basic_string<char>, LuaContext::Binder<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> &, ComboAddress &> &>' requested here
        return readIntoFunction(state, retValueTag, binder, index + 1, othersTags...);
               ^
./ext/luawrapper/include/LuaContext.hpp:2243:31: note: in instantiation of function template specialization 'LuaContext::readIntoFunction<std::__1::basic_string<char>, std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> &, ComboAddress &>' requested here
        return P::push(state, readIntoFunction(state, tag<TReturnType>{}, toCall, -argumentsCount, tag<TParameters>{}...));
                              ^
./ext/luawrapper/include/LuaContext.hpp:2218:20: note: in instantiation of function template specialization 'LuaContext::Pusher<std::__1::basic_string<char> (ComboAddress &), void>::callback2<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> &>' requested here
            return callback2(state, *toCall, argumentsCount);
                   ^
./ext/luawrapper/include/LuaContext.hpp:2147:20: note: in instantiation of function template specialization 'LuaContext::Pusher<std::__1::basic_string<char> (ComboAddress &), void>::callback<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> >' requested here
            return callback(state, toCall, lua_gettop(state)).release();
                   ^
./ext/luawrapper/include/LuaContext.hpp:2267:27: note: in instantiation of function template specialization 'LuaContext::Pusher<std::__1::basic_string<char> (ComboAddress &), void>::push<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> >' requested here
        return SubPusher::push(state, value);
                          ^
./ext/luawrapper/include/LuaContext.hpp:764:65: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
        auto p1 = Pusher<typename std::decay<TDataType>::type>::push(state, std::forward<TData>(data));
                                                                ^
./ext/luawrapper/include/LuaContext.hpp:1053:9: note: in instantiation of function template specialization 'LuaContext::setTable<std::__1::basic_string<char> (ComboAddress &), const std::type_info *, int, const std::__1::basic_string<char> &, std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> >' requested here
        setTable<TRetValue(TObject&, TOtherParams...)>(mState, Registry, &typeid(TObject), 0, functionName, std::move(function));
        ^
./ext/luawrapper/include/LuaContext.hpp:1065:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(functionName, function, tag<TObject>{}, fTypeTag);
        ^
./ext/luawrapper/include/LuaContext.hpp:1083:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(functionName, std::move(function), tag<const TObject>{}, tag<TRetValue (TOtherParams...)>{});
        ^
./ext/luawrapper/include/LuaContext.hpp:356:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(name, std::mem_fn(pointer), tag<TPointerToMemberFunction>{});
        ^
dnsdist-lua.cc:970:9: note: in instantiation of function template specialization 'LuaContext::registerFunction<std::__1::basic_string<char> (ComboAddress::*)() const>' requested here
  g_lua.registerFunction("tostring", &ComboAddress::toString);
        ^
/usr/include/c++/v1/type_traits:1069:5: note: '~__nat' has been explicitly marked deleted here
    ~__nat() = delete;
    ^
In file included from dnsdist-lua.cc:1:
In file included from ./dnsdist.hh:3:
./ext/luawrapper/include/LuaContext.hpp:1682:20: error: attempt to use a deleted function
            return function(param, std::forward<TParams>(params)...);
                   ^
./ext/luawrapper/include/LuaContext.hpp:1602:16: note: in instantiation of function template specialization 'LuaContext::Binder<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> &, ComboAddress &>::operator()<>' requested here
        return callback();
               ^
./ext/luawrapper/include/LuaContext.hpp:1632:16: note: in instantiation of function template specialization 'LuaContext::readIntoFunction<std::__1::basic_string<char>, LuaContext::Binder<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> &, ComboAddress &> &>' requested here
        return readIntoFunction(state, retValueTag, binder, index + 1, othersTags...);
               ^
./ext/luawrapper/include/LuaContext.hpp:2243:31: note: in instantiation of function template specialization 'LuaContext::readIntoFunction<std::__1::basic_string<char>, std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> &, ComboAddress &>' requested here
        return P::push(state, readIntoFunction(state, tag<TReturnType>{}, toCall, -argumentsCount, tag<TParameters>{}...));
                              ^
./ext/luawrapper/include/LuaContext.hpp:2218:20: note: in instantiation of function template specialization 'LuaContext::Pusher<std::__1::basic_string<char> (ComboAddress &), void>::callback2<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> &>' requested here
            return callback2(state, *toCall, argumentsCount);
                   ^
./ext/luawrapper/include/LuaContext.hpp:2147:20: note: in instantiation of function template specialization 'LuaContext::Pusher<std::__1::basic_string<char> (ComboAddress &), void>::callback<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> >' requested here
            return callback(state, toCall, lua_gettop(state)).release();
                   ^
./ext/luawrapper/include/LuaContext.hpp:2267:27: note: (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
        return SubPusher::push(state, value);
                          ^
./ext/luawrapper/include/LuaContext.hpp:1053:9: note: in instantiation of function template specialization 'LuaContext::setTable<std::__1::basic_string<char> (ComboAddress &), const std::type_info *, int, const std::__1::basic_string<char> &, std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const> >' requested here
        setTable<TRetValue(TObject&, TOtherParams...)>(mState, Registry, &typeid(TObject), 0, functionName, std::move(function));
        ^
./ext/luawrapper/include/LuaContext.hpp:1065:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(functionName, function, tag<TObject>{}, fTypeTag);
        ^
./ext/luawrapper/include/LuaContext.hpp:1083:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(functionName, std::move(function), tag<const TObject>{}, tag<TRetValue (TOtherParams...)>{});
        ^
./ext/luawrapper/include/LuaContext.hpp:356:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(name, std::mem_fn(pointer), tag<TPointerToMemberFunction>{});
        ^
dnsdist-lua.cc:970:9: note: in instantiation of function template specialization 'LuaContext::registerFunction<std::__1::basic_string<char> (ComboAddress::*)() const>' requested here
  g_lua.registerFunction("tostring", &ComboAddress::toString);
        ^
/usr/include/c++/v1/type_traits:1069:5: note: '~__nat' has been explicitly marked deleted here
    ~__nat() = delete;
    ^
In file included from dnsdist-lua.cc:1:
In file included from ./dnsdist.hh:3:
In file included from ./ext/luawrapper/include/LuaContext.hpp:36:
/usr/include/c++/v1/functional:1262:22: error: attempt to use a deleted function
              return __invoke(__f_, _VSTD::forward<_ArgTypes>(__args)...);
                     ^
./ext/luawrapper/include/LuaContext.hpp:1056:172: note: in instantiation of function template specialization 'std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>::operator()<ComboAddress &>' requested here
        setTable<TRetValue(TObject*, TOtherParams...)>(mState, Registry, &typeid(TObject*), 0, functionName, [=](TObject* obj, TOtherParams... rest) { assert(obj); return function(*obj, std::forward<TOtherParams>(rest)...); });
                                                                                                                                                                           ^
./ext/luawrapper/include/LuaContext.hpp:1065:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(functionName, function, tag<TObject>{}, fTypeTag);
        ^
./ext/luawrapper/include/LuaContext.hpp:1083:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(functionName, std::move(function), tag<const TObject>{}, tag<TRetValue (TOtherParams...)>{});
        ^
./ext/luawrapper/include/LuaContext.hpp:356:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(name, std::mem_fn(pointer), tag<TPointerToMemberFunction>{});
        ^
dnsdist-lua.cc:970:9: note: in instantiation of function template specialization 'LuaContext::registerFunction<std::__1::basic_string<char> (ComboAddress::*)() const>' requested here
  g_lua.registerFunction("tostring", &ComboAddress::toString);
        ^
/usr/include/c++/v1/type_traits:1069:5: note: '~__nat' has been explicitly marked deleted here
    ~__nat() = delete;
    ^
In file included from dnsdist-lua.cc:1:
In file included from ./dnsdist.hh:3:
In file included from ./ext/luawrapper/include/LuaContext.hpp:36:
/usr/include/c++/v1/functional:1262:22: error: attempt to use a deleted function
              return __invoke(__f_, _VSTD::forward<_ArgTypes>(__args)...);
                     ^
./ext/luawrapper/include/LuaContext.hpp:1068:190: note: in instantiation of function template specialization 'std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>::operator()<const ComboAddress &>' requested here
        setTable<TRetValue(TObject const*, TOtherParams...)>(mState, Registry, &typeid(TObject const*), 0, functionName, [=](TObject const* obj, TOtherParams... rest) { assert(obj); return function(*obj, std::forward<TOtherParams>(rest)...); });
                                                                                                                                                                                             ^
./ext/luawrapper/include/LuaContext.hpp:1083:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(functionName, std::move(function), tag<const TObject>{}, tag<TRetValue (TOtherParams...)>{});
        ^
./ext/luawrapper/include/LuaContext.hpp:356:9: note: in instantiation of function template specialization 'LuaContext::registerFunctionImpl<std::__1::__mem_fn<std::__1::basic_string<char> (ComboAddress::*)() const>, std::__1::basic_string<char>, ComboAddress>' requested here
        registerFunctionImpl(name, std::mem_fn(pointer), tag<TPointerToMemberFunction>{});
        ^
dnsdist-lua.cc:970:9: note: in instantiation of function template specialization 'LuaContext::registerFunction<std::__1::basic_string<char> (ComboAddress::*)() const>' requested here
  g_lua.registerFunction("tostring", &ComboAddress::toString);
        ^
/usr/include/c++/v1/type_traits:1069:5: note: '~__nat' has been explicitly marked deleted here
    ~__nat() = delete;
    ^
12 warnings and 9 errors generated.
Makefile:753: recipe for target 'dnsdist-lua.o' failed
gmake[2]: *** [dnsdist-lua.o] Error 1
gmake[2]: Leaving directory '/usr/home/ruben/src/pdns/pdns/dnsdistdist'
Makefile:859: recipe for target 'all-recursive' failed
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory '/usr/home/ruben/src/pdns/pdns/dnsdistdist'
Makefile:598: recipe for target 'all' failed
gmake: *** [all] Error 2
@ahupowerdns

This comment has been minimized.

Copy link
Member

ahupowerdns commented Mar 11, 2016

version of clang and freebsd please?

@rubenk

This comment has been minimized.

Copy link
Contributor

rubenk commented Mar 11, 2016

ruben@fikkie:~ % uname -a
FreeBSD fikkie 11.0-CURRENT FreeBSD 11.0-CURRENT #0 55a239f(master): Sat Mar  5 18:53:43 CET 2016     root@fikkie:/usr/obj/usr/src/sys/GENERIC-NODEBUG  amd64
ruben@fikkie:~ % clang++ --version
FreeBSD clang version 3.7.1 (tags/RELEASE_371/final 255217) 20151225
Target: x86_64-unknown-freebsd11.0
Thread model: posix

I tried with the upcoming Clang 3.8 as well, same issue.

@rubenk

This comment has been minimized.

Copy link
Contributor

rubenk commented Mar 21, 2016

Also checked FreeBSD 10, same issue:

ruben@fikkie:~ % uname -a
FreeBSD fikkie 10.3-RC3 FreeBSD 10.3-RC3 #0 r296998: Fri Mar 18 01:08:19 UTC 2016     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
ruben@fikkie:~ % clang --version
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.3
Thread model: posix

@pieterlexis pieterlexis added this to the dnsdist-1.0.0 milestone Apr 12, 2016

@rgacogne rgacogne modified the milestones: dnsdist-1.1.0, dnsdist-1.0.0 Apr 18, 2016

@rgacogne rgacogne modified the milestones: dnsdist-1.2.0, dnsdist-1.1.0 Aug 19, 2016

cynthia added a commit to cynthia/pdns that referenced this issue Oct 4, 2016

Replace std::forward/std::make_tuple combo with std::forward_as_tuple
Quick and dirty fix for PowerDNS#3552. May not work or break compatibility
with other compilers.
@cynthia

This comment has been minimized.

Copy link
Contributor

cynthia commented Oct 4, 2016

I'm not sure if that fix works for everyone, but it's a "worked for us" patch in case anyone needs it.

rgacogne added a commit to rgacogne/pdns that referenced this issue Oct 5, 2016

Replace std::forward/std::make_tuple combo with std::forward_as_tuple
Quick and dirty fix for PowerDNS#3552. May not work or break compatibility
with other compilers.

rgacogne added a commit to rgacogne/pdns that referenced this issue Oct 5, 2016

Replace std::forward/std::make_tuple combo with std::forward_as_tuple
Quick and dirty fix for PowerDNS#3552. May not work or break compatibility
with other compilers.

rgacogne added a commit to rgacogne/pdns that referenced this issue Oct 20, 2016

Replace std::forward/std::make_tuple combo with std::forward_as_tuple
Quick and dirty fix for PowerDNS#3552. May not work or break compatibility
with other compilers.

(cherry picked from commit 352bc04)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment