Oberon00 / luabind

Luabind is a library that helps you create bindings between C++ and Lua.
http://oberon00.github.io/luabind/
Other
46 stars 13 forks source link

Compile issue with clang PPA, C++11 mode, on Ubuntu 12.04 #13

Closed rpavlik closed 11 years ago

rpavlik commented 11 years ago

From my merged branch, looks like a weird boost::shared_ptr issue:

/usr/bin/cmake -H/home/rpavlik/src/luabind -B/home/rpavlik/src/luabind-build-clang --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/rpavlik/src/luabind-build-clang/CMakeFiles /home/rpavlik/src/luabind-build-clang/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/rpavlik/src/luabind-build-clang'
make -f src/CMakeFiles/luabind.dir/build.make src/CMakeFiles/luabind.dir/depend
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
cd /home/rpavlik/src/luabind-build-clang && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rpavlik/src/luabind /home/rpavlik/src/luabind/src /home/rpavlik/src/luabind-build-clang /home/rpavlik/src/luabind-build-clang/src /home/rpavlik/src/luabind-build-clang/src/CMakeFiles/luabind.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
make -f src/CMakeFiles/luabind.dir/build.make src/CMakeFiles/luabind.dir/build
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
make[2]: Nothing to be done for `src/CMakeFiles/luabind.dir/build'.
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
/usr/bin/cmake -E cmake_progress_report /home/rpavlik/src/luabind-build-clang/CMakeFiles  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
[ 17%] Built target luabind
make -f test/CMakeFiles/benchmark.dir/build.make test/CMakeFiles/benchmark.dir/depend
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
cd /home/rpavlik/src/luabind-build-clang && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rpavlik/src/luabind /home/rpavlik/src/luabind/test /home/rpavlik/src/luabind-build-clang /home/rpavlik/src/luabind-build-clang/test /home/rpavlik/src/luabind-build-clang/test/CMakeFiles/benchmark.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
make -f test/CMakeFiles/benchmark.dir/build.make test/CMakeFiles/benchmark.dir/build
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
make[2]: Nothing to be done for `test/CMakeFiles/benchmark.dir/build'.
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
/usr/bin/cmake -E cmake_progress_report /home/rpavlik/src/luabind-build-clang/CMakeFiles 
[ 17%] Built target benchmark
make -f test/CMakeFiles/test_main.dir/build.make test/CMakeFiles/test_main.dir/depend
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
cd /home/rpavlik/src/luabind-build-clang && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rpavlik/src/luabind /home/rpavlik/src/luabind/test /home/rpavlik/src/luabind-build-clang /home/rpavlik/src/luabind-build-clang/test /home/rpavlik/src/luabind-build-clang/test/CMakeFiles/test_main.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
make -f test/CMakeFiles/test_main.dir/build.make test/CMakeFiles/test_main.dir/build
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
make[2]: Nothing to be done for `test/CMakeFiles/test_main.dir/build'.
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
/usr/bin/cmake -E cmake_progress_report /home/rpavlik/src/luabind-build-clang/CMakeFiles  79 80
[ 19%] Built target test_main
make -f test/CMakeFiles/test_abstract_base.dir/build.make test/CMakeFiles/test_abstract_base.dir/depend
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
cd /home/rpavlik/src/luabind-build-clang && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rpavlik/src/luabind /home/rpavlik/src/luabind/test /home/rpavlik/src/luabind-build-clang /home/rpavlik/src/luabind-build-clang/test /home/rpavlik/src/luabind-build-clang/test/CMakeFiles/test_abstract_base.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
make -f test/CMakeFiles/test_abstract_base.dir/build.make test/CMakeFiles/test_abstract_base.dir/build
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
make[2]: Nothing to be done for `test/CMakeFiles/test_abstract_base.dir/build'.
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
/usr/bin/cmake -E cmake_progress_report /home/rpavlik/src/luabind-build-clang/CMakeFiles  18
[ 20%] Built target test_abstract_base
make -f test/CMakeFiles/test_adopt.dir/build.make test/CMakeFiles/test_adopt.dir/depend
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
cd /home/rpavlik/src/luabind-build-clang && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rpavlik/src/luabind /home/rpavlik/src/luabind/test /home/rpavlik/src/luabind-build-clang /home/rpavlik/src/luabind-build-clang/test /home/rpavlik/src/luabind-build-clang/test/CMakeFiles/test_adopt.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
make -f test/CMakeFiles/test_adopt.dir/build.make test/CMakeFiles/test_adopt.dir/build
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
make[2]: Nothing to be done for `test/CMakeFiles/test_adopt.dir/build'.
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
/usr/bin/cmake -E cmake_progress_report /home/rpavlik/src/luabind-build-clang/CMakeFiles  19
[ 21%] Built target test_adopt
make -f test/CMakeFiles/test_adopt_wrapper.dir/build.make test/CMakeFiles/test_adopt_wrapper.dir/depend
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
cd /home/rpavlik/src/luabind-build-clang && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rpavlik/src/luabind /home/rpavlik/src/luabind/test /home/rpavlik/src/luabind-build-clang /home/rpavlik/src/luabind-build-clang/test /home/rpavlik/src/luabind-build-clang/test/CMakeFiles/test_adopt_wrapper.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
make -f test/CMakeFiles/test_adopt_wrapper.dir/build.make test/CMakeFiles/test_adopt_wrapper.dir/build
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
make[2]: Nothing to be done for `test/CMakeFiles/test_adopt_wrapper.dir/build'.
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
/usr/bin/cmake -E cmake_progress_report /home/rpavlik/src/luabind-build-clang/CMakeFiles  20
[ 22%] Built target test_adopt_wrapper
make -f test/CMakeFiles/test_attributes.dir/build.make test/CMakeFiles/test_attributes.dir/depend
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
cd /home/rpavlik/src/luabind-build-clang && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rpavlik/src/luabind /home/rpavlik/src/luabind/test /home/rpavlik/src/luabind-build-clang /home/rpavlik/src/luabind-build-clang/test /home/rpavlik/src/luabind-build-clang/test/CMakeFiles/test_attributes.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
make -f test/CMakeFiles/test_attributes.dir/build.make test/CMakeFiles/test_attributes.dir/build
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
make[2]: Nothing to be done for `test/CMakeFiles/test_attributes.dir/build'.
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
/usr/bin/cmake -E cmake_progress_report /home/rpavlik/src/luabind-build-clang/CMakeFiles 
[ 22%] Built target test_attributes
make -f test/CMakeFiles/test_automatic_smart_ptr.dir/build.make test/CMakeFiles/test_automatic_smart_ptr.dir/depend
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
cd /home/rpavlik/src/luabind-build-clang && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rpavlik/src/luabind /home/rpavlik/src/luabind/test /home/rpavlik/src/luabind-build-clang /home/rpavlik/src/luabind-build-clang/test /home/rpavlik/src/luabind-build-clang/test/CMakeFiles/test_automatic_smart_ptr.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
make -f test/CMakeFiles/test_automatic_smart_ptr.dir/build.make test/CMakeFiles/test_automatic_smart_ptr.dir/build
make[2]: Entering directory `/home/rpavlik/src/luabind-build-clang'
/usr/bin/cmake -E cmake_progress_report /home/rpavlik/src/luabind-build-clang/CMakeFiles 21
[ 23%] Building CXX object test/CMakeFiles/test_automatic_smart_ptr.dir/test_automatic_smart_ptr.cpp.o
cd /home/rpavlik/src/luabind-build-clang/test && /usr/bin/clang++    -std=c++11 -Wall -Wextra -Wno-deprecated-declarations -Wmissing-declarations -Wsign-conversion -pedantic -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Winit-self -Wformat=2 -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-promo -Wstrict-overflow=5 -Weverything -Wno-shadow -Wno-undef -Wno-global-constructors -Wno-weak-vtables -Wno-padded -Wno-exit-time-destructors -Wno-missing-noreturn -Wno-c++98-compat -Wno-c++98-compat-pedantic -I/home/rpavlik/src/luabind -I/home/rpavlik/src/luabind-build-clang -I/usr/include/lua5.2    -o CMakeFiles/test_automatic_smart_ptr.dir/test_automatic_smart_ptr.cpp.o -c /home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp
In file included from /home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:5:
In file included from /home/rpavlik/src/luabind/test/test.hpp:27:
/home/rpavlik/src/luabind/luabind/error.hpp:54:34: warning: dynamic exception specifications are deprecated [-Wdeprecated]
        lua_State* state() const throw() { return m_L; }
                                 ^~~~~~~
/home/rpavlik/src/luabind/luabind/error.hpp:54:34: note: use 'noexcept' instead
        lua_State* state() const throw() { return m_L; }
                                 ^~~~~~~
                                 noexcept
/home/rpavlik/src/luabind/luabind/error.hpp:55:42: warning: dynamic exception specifications are deprecated [-Wdeprecated]
        virtual const char* what() const throw()
                                         ^~~~~~~
/home/rpavlik/src/luabind/luabind/error.hpp:55:42: note: use 'noexcept' instead
        virtual const char* what() const throw()
                                         ^~~~~~~
                                         noexcept
/home/rpavlik/src/luabind/luabind/error.hpp:70:34: warning: dynamic exception specifications are deprecated [-Wdeprecated]
        lua_State* state() const throw() { return m_L; }
                                 ^~~~~~~
/home/rpavlik/src/luabind/luabind/error.hpp:70:34: note: use 'noexcept' instead
        lua_State* state() const throw() { return m_L; }
                                 ^~~~~~~
                                 noexcept
/home/rpavlik/src/luabind/luabind/error.hpp:71:30: warning: dynamic exception specifications are deprecated [-Wdeprecated]
        type_id info() const throw() { return m_info; }
                             ^~~~~~~
/home/rpavlik/src/luabind/luabind/error.hpp:71:30: note: use 'noexcept' instead
        type_id info() const throw() { return m_info; }
                             ^~~~~~~
                             noexcept
/home/rpavlik/src/luabind/luabind/error.hpp:72:42: warning: dynamic exception specifications are deprecated [-Wdeprecated]
        virtual const char* what() const throw() { return "unable to make cast"; }
                                         ^~~~~~~
/home/rpavlik/src/luabind/luabind/error.hpp:72:42: note: use 'noexcept' instead
        virtual const char* what() const throw() { return "unable to make cast"; }
                                         ^~~~~~~
                                         noexcept
In file included from /home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:6:
In file included from /home/rpavlik/src/luabind/luabind/luabind.hpp:27:
In file included from /home/rpavlik/src/luabind/luabind/class.hpp:72:
In file included from /home/rpavlik/src/luabind/luabind/back_reference.hpp:28:
In file included from /home/rpavlik/src/luabind/luabind/wrapper_base.hpp:29:
In file included from /home/rpavlik/src/luabind/luabind/detail/call_member.hpp:30:
In file included from /home/rpavlik/src/luabind/luabind/detail/convert_to_lua.hpp:28:
In file included from /home/rpavlik/src/luabind/luabind/detail/policy.hpp:54:
In file included from /home/rpavlik/src/luabind/luabind/detail/make_instance.hpp:9:
In file included from /home/rpavlik/src/luabind/luabind/detail/object_rep.hpp:28:
/home/rpavlik/src/luabind/luabind/detail/class_rep.hpp:93:54: warning: dynamic exception specifications are deprecated [-Wdeprecated]
        const std::vector<class_rep*>& bases() const throw() { return m_bases; }
                                                     ^~~~~~~
/home/rpavlik/src/luabind/luabind/detail/class_rep.hpp:93:54: note: use 'noexcept' instead
        const std::vector<class_rep*>& bases() const throw() { return m_bases; }
                                                     ^~~~~~~
                                                     noexcept
/home/rpavlik/src/luabind/luabind/detail/class_rep.hpp:96:37: warning: dynamic exception specifications are deprecated [-Wdeprecated]
        type_id const& type() const throw() { return m_type; }
                                    ^~~~~~~
/home/rpavlik/src/luabind/luabind/detail/class_rep.hpp:96:37: note: use 'noexcept' instead
        type_id const& type() const throw() { return m_type; }
                                    ^~~~~~~
                                    noexcept
/home/rpavlik/src/luabind/luabind/detail/class_rep.hpp:98:34: warning: dynamic exception specifications are deprecated [-Wdeprecated]
        const char* name() const throw() { return m_name; }
                                 ^~~~~~~
/home/rpavlik/src/luabind/luabind/detail/class_rep.hpp:98:34: note: use 'noexcept' instead
        const char* name() const throw() { return m_name; }
                                 ^~~~~~~
                                 noexcept
/home/rpavlik/src/luabind/luabind/detail/class_rep.hpp:101:35: warning: dynamic exception specifications are deprecated [-Wdeprecated]
        int metatable_ref() const throw() { return m_instance_metatable; }
                                  ^~~~~~~
/home/rpavlik/src/luabind/luabind/detail/class_rep.hpp:101:35: note: use 'noexcept' instead
        int metatable_ref() const throw() { return m_instance_metatable; }
                                  ^~~~~~~
                                  noexcept
In file included from /home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:6:
In file included from /home/rpavlik/src/luabind/luabind/luabind.hpp:27:
In file included from /home/rpavlik/src/luabind/luabind/class.hpp:72:
In file included from /home/rpavlik/src/luabind/luabind/back_reference.hpp:28:
In file included from /home/rpavlik/src/luabind/luabind/wrapper_base.hpp:29:
In file included from /home/rpavlik/src/luabind/luabind/detail/call_member.hpp:34:
/home/rpavlik/src/luabind/luabind/detail/object.hpp:245:7: warning: definition of implicit copy constructor for 'object_interface<luabind::adl::object>' is deprecated because it has a user-declared destructor [-Wdeprecated]
      ~object_interface() {}
      ^
/home/rpavlik/src/luabind/luabind/detail/object.hpp:690:9: note: implicit copy constructor for 'object_interface<luabind::adl::object>' first required here
  class object : public object_interface<object>
        ^
In file included from /home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:6:
In file included from /home/rpavlik/src/luabind/luabind/luabind.hpp:27:
In file included from /home/rpavlik/src/luabind/luabind/class.hpp:84:
/home/rpavlik/src/luabind/luabind/detail/operator_id.hpp:53:28: warning: no previous extern declaration for non-static variable 'a' [-Wmissing-variable-declarations]
        static const char* a[number_of_operators] = {
                           ^
/home/rpavlik/src/luabind/luabind/detail/operator_id.hpp:62:28: warning: no previous extern declaration for non-static variable 'a' [-Wmissing-variable-declarations]
        static const char* a[number_of_operators] = {
                           ^
In file included from /home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:6:
In file included from /home/rpavlik/src/luabind/luabind/luabind.hpp:27:
In file included from /home/rpavlik/src/luabind/luabind/class.hpp:72:
In file included from /home/rpavlik/src/luabind/luabind/back_reference.hpp:28:
In file included from /home/rpavlik/src/luabind/luabind/wrapper_base.hpp:29:
In file included from /home/rpavlik/src/luabind/luabind/detail/call_member.hpp:30:
In file included from /home/rpavlik/src/luabind/luabind/detail/convert_to_lua.hpp:28:
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:172:30: error: call to implicitly-deleted copy constructor of 'boost::shared_ptr<<anonymous>::X>'
            make_instance(L, x);
                             ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:196:9: note: in instantiation of function template specialization 'luabind::detail::make_pointee_instance<boost::shared_ptr<<anonymous>::X>, mpl_::bool_<true> >' requested here
        make_pointee_instance(L, x, has_get_pointer<T>(), Clone());
        ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:282:13: note: in instantiation of function template specialization 'luabind::detail::make_pointee_instance<boost::shared_ptr<<anonymous>::X>, mpl_::bool_<true> >' requested here
            make_pointee_instance(L, x, mpl::true_());
            ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:285:26: note: in instantiation of function template specialization 'luabind::detail::value_converter::apply<boost::shared_ptr<<anonymous>::X> >' requested here
        result_converter.apply(
                         ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:88:12: note: in instantiation of function template specialization 'luabind::detail::invoke_normal<boost::shared_ptr<<anonymous>::X> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::X> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
    return invoke_normal(
           ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:99:12: note: in instantiation of function template specialization 'luabind::detail::invoke0<boost::shared_ptr<<anonymous>::X> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::X> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type, boost::is_void<boost::shared_ptr<<anonymous>::X> > >' requested here
    return invoke0(
           ^
/home/rpavlik/src/luabind/luabind/make_function.hpp:62:25: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
              results = invoke(
                        ^
/home/rpavlik/src/luabind/luabind/make_function.hpp:107:13: note: in instantiation of member function 'luabind::detail::function_object_impl<boost::shared_ptr<<anonymous>::X> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::X> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>::function_object_impl' requested here
      , new detail::function_object_impl<F, Signature, Policies>(
            ^
/home/rpavlik/src/luabind/luabind/function.hpp:28:23: note: in instantiation of function template specialization 'luabind::make_function<boost::shared_ptr<<anonymous>::X> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::X> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
          object fn = make_function(L, f, deduce_signature(f), policies);
                      ^
/home/rpavlik/src/luabind/luabind/function.hpp:48:13: note: in instantiation of member function 'luabind::detail::function_registration<boost::shared_ptr<<anonymous>::X> (*)(), luabind::detail::null_type>::register_' requested here
        new detail::function_registration<F, Policies>(name, f, policies)));
            ^
/home/rpavlik/src/luabind/luabind/function.hpp:54:12: note: in instantiation of function template specialization 'luabind::def<boost::shared_ptr<<anonymous>::X> (*)(), luabind::detail::null_type>' requested here
    return def(name, f, detail::null_type());
           ^
/home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:97:9: note: in instantiation of function template specialization 'luabind::def<boost::shared_ptr<<anonymous>::X> (*)()>' requested here
        def("make2", make2),
        ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:347:5: note: copy constructor is implicitly deleted because 'shared_ptr<<anonymous>::X>' has a user-declared move constructor
    shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws
    ^
/home/rpavlik/src/luabind/luabind/detail/make_instance.hpp:73:36: note: passing argument to parameter 'p' here
void make_instance(lua_State* L, P p)
                                   ^
/home/rpavlik/src/luabind/luabind/detail/make_instance.hpp:92:35: error: call to implicitly-deleted copy constructor of 'boost::shared_ptr<<anonymous>::X>'
        new (storage) holder_type(p, dynamic.first, dynamic.second);
                                  ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:172:13: note: in instantiation of function template specialization 'luabind::detail::make_instance<boost::shared_ptr<<anonymous>::X> >' requested here
            make_instance(L, x);
            ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:196:9: note: in instantiation of function template specialization 'luabind::detail::make_pointee_instance<boost::shared_ptr<<anonymous>::X>, mpl_::bool_<true> >' requested here
        make_pointee_instance(L, x, has_get_pointer<T>(), Clone());
        ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:282:13: note: in instantiation of function template specialization 'luabind::detail::make_pointee_instance<boost::shared_ptr<<anonymous>::X>, mpl_::bool_<true> >' requested here
            make_pointee_instance(L, x, mpl::true_());
            ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:285:26: note: in instantiation of function template specialization 'luabind::detail::value_converter::apply<boost::shared_ptr<<anonymous>::X> >' requested here
        result_converter.apply(
                         ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:88:12: note: in instantiation of function template specialization 'luabind::detail::invoke_normal<boost::shared_ptr<<anonymous>::X> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::X> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
    return invoke_normal(
           ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:99:12: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    return invoke0(
           ^
/home/rpavlik/src/luabind/luabind/make_function.hpp:107:13: note: in instantiation of member function 'luabind::detail::function_object_impl<boost::shared_ptr<<anonymous>::X> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::X> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>::function_object_impl' requested here
      , new detail::function_object_impl<F, Signature, Policies>(
            ^
/home/rpavlik/src/luabind/luabind/function.hpp:28:23: note: in instantiation of function template specialization 'luabind::make_function<boost::shared_ptr<<anonymous>::X> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::X> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
          object fn = make_function(L, f, deduce_signature(f), policies);
                      ^
/home/rpavlik/src/luabind/luabind/function.hpp:48:13: note: in instantiation of member function 'luabind::detail::function_registration<boost::shared_ptr<<anonymous>::X> (*)(), luabind::detail::null_type>::register_' requested here
        new detail::function_registration<F, Policies>(name, f, policies)));
            ^
/home/rpavlik/src/luabind/luabind/function.hpp:54:12: note: in instantiation of function template specialization 'luabind::def<boost::shared_ptr<<anonymous>::X> (*)(), luabind::detail::null_type>' requested here
    return def(name, f, detail::null_type());
           ^
/home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:97:9: note: in instantiation of function template specialization 'luabind::def<boost::shared_ptr<<anonymous>::X> (*)()>' requested here
        def("make2", make2),
        ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:347:5: note: copy constructor is implicitly deleted because 'shared_ptr<<anonymous>::X>' has a user-declared move constructor
    shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws
    ^
/home/rpavlik/src/luabind/luabind/detail/instance_holder.hpp:78:11: note: passing argument to parameter 'p' here
        P p, class_id dynamic_id, void* dynamic_ptr
          ^
In file included from /home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:6:
In file included from /home/rpavlik/src/luabind/luabind/luabind.hpp:27:
In file included from /home/rpavlik/src/luabind/luabind/class.hpp:72:
In file included from /home/rpavlik/src/luabind/luabind/back_reference.hpp:28:
In file included from /home/rpavlik/src/luabind/luabind/wrapper_base.hpp:29:
In file included from /home/rpavlik/src/luabind/luabind/detail/call_member.hpp:30:
In file included from /home/rpavlik/src/luabind/luabind/detail/convert_to_lua.hpp:28:
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:172:30: error: call to implicitly-deleted copy constructor of 'boost::shared_ptr<<anonymous>::D>'
            make_instance(L, x);
                             ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:196:9: note: in instantiation of function template specialization 'luabind::detail::make_pointee_instance<boost::shared_ptr<<anonymous>::D>, mpl_::bool_<true> >' requested here
        make_pointee_instance(L, x, has_get_pointer<T>(), Clone());
        ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:282:13: note: in instantiation of function template specialization 'luabind::detail::make_pointee_instance<boost::shared_ptr<<anonymous>::D>, mpl_::bool_<true> >' requested here
            make_pointee_instance(L, x, mpl::true_());
            ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:285:26: note: in instantiation of function template specialization 'luabind::detail::value_converter::apply<boost::shared_ptr<<anonymous>::D> >' requested here
        result_converter.apply(
                         ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:88:12: note: in instantiation of function template specialization 'luabind::detail::invoke_normal<boost::shared_ptr<<anonymous>::D> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::D> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
    return invoke_normal(
           ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:99:12: note: in instantiation of function template specialization 'luabind::detail::invoke0<boost::shared_ptr<<anonymous>::D> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::D> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type, boost::is_void<boost::shared_ptr<<anonymous>::D> > >' requested here
    return invoke0(
           ^
/home/rpavlik/src/luabind/luabind/make_function.hpp:62:25: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
              results = invoke(
                        ^
/home/rpavlik/src/luabind/luabind/make_function.hpp:107:13: note: in instantiation of member function 'luabind::detail::function_object_impl<boost::shared_ptr<<anonymous>::D> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::D> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>::function_object_impl' requested here
      , new detail::function_object_impl<F, Signature, Policies>(
            ^
/home/rpavlik/src/luabind/luabind/function.hpp:28:23: note: in instantiation of function template specialization 'luabind::make_function<boost::shared_ptr<<anonymous>::D> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::D> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
          object fn = make_function(L, f, deduce_signature(f), policies);
                      ^
/home/rpavlik/src/luabind/luabind/function.hpp:48:13: note: in instantiation of member function 'luabind::detail::function_registration<boost::shared_ptr<<anonymous>::D> (*)(), luabind::detail::null_type>::register_' requested here
        new detail::function_registration<F, Policies>(name, f, policies)));
            ^
/home/rpavlik/src/luabind/luabind/function.hpp:54:12: note: in instantiation of function template specialization 'luabind::def<boost::shared_ptr<<anonymous>::D> (*)(), luabind::detail::null_type>' requested here
    return def(name, f, detail::null_type());
           ^
/home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:100:9: note: in instantiation of function template specialization 'luabind::def<boost::shared_ptr<<anonymous>::D> (*)()>' requested here
        def("make_d", make_d),
        ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:347:5: note: copy constructor is implicitly deleted because 'shared_ptr<<anonymous>::D>' has a user-declared move constructor
    shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws
    ^
/home/rpavlik/src/luabind/luabind/detail/make_instance.hpp:73:36: note: passing argument to parameter 'p' here
void make_instance(lua_State* L, P p)
                                   ^
/home/rpavlik/src/luabind/luabind/detail/make_instance.hpp:92:35: error: call to implicitly-deleted copy constructor of 'boost::shared_ptr<<anonymous>::D>'
        new (storage) holder_type(p, dynamic.first, dynamic.second);
                                  ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:172:13: note: in instantiation of function template specialization 'luabind::detail::make_instance<boost::shared_ptr<<anonymous>::D> >' requested here
            make_instance(L, x);
            ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:196:9: note: in instantiation of function template specialization 'luabind::detail::make_pointee_instance<boost::shared_ptr<<anonymous>::D>, mpl_::bool_<true> >' requested here
        make_pointee_instance(L, x, has_get_pointer<T>(), Clone());
        ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:282:13: note: in instantiation of function template specialization 'luabind::detail::make_pointee_instance<boost::shared_ptr<<anonymous>::D>, mpl_::bool_<true> >' requested here
            make_pointee_instance(L, x, mpl::true_());
            ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:285:26: note: in instantiation of function template specialization 'luabind::detail::value_converter::apply<boost::shared_ptr<<anonymous>::D> >' requested here
        result_converter.apply(
                         ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:88:12: note: in instantiation of function template specialization 'luabind::detail::invoke_normal<boost::shared_ptr<<anonymous>::D> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::D> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
    return invoke_normal(
           ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:99:12: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    return invoke0(
           ^
/home/rpavlik/src/luabind/luabind/make_function.hpp:107:13: note: in instantiation of member function 'luabind::detail::function_object_impl<boost::shared_ptr<<anonymous>::D> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::D> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>::function_object_impl' requested here
      , new detail::function_object_impl<F, Signature, Policies>(
            ^
/home/rpavlik/src/luabind/luabind/function.hpp:28:23: note: in instantiation of function template specialization 'luabind::make_function<boost::shared_ptr<<anonymous>::D> (*)(), boost::function_types::components<boost::shared_ptr<<anonymous>::D> (*)(), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
          object fn = make_function(L, f, deduce_signature(f), policies);
                      ^
/home/rpavlik/src/luabind/luabind/function.hpp:48:13: note: in instantiation of member function 'luabind::detail::function_registration<boost::shared_ptr<<anonymous>::D> (*)(), luabind::detail::null_type>::register_' requested here
        new detail::function_registration<F, Policies>(name, f, policies)));
            ^
/home/rpavlik/src/luabind/luabind/function.hpp:54:12: note: in instantiation of function template specialization 'luabind::def<boost::shared_ptr<<anonymous>::D> (*)(), luabind::detail::null_type>' requested here
    return def(name, f, detail::null_type());
           ^
/home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:100:9: note: in instantiation of function template specialization 'luabind::def<boost::shared_ptr<<anonymous>::D> (*)()>' requested here
        def("make_d", make_d),
        ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:347:5: note: copy constructor is implicitly deleted because 'shared_ptr<<anonymous>::D>' has a user-declared move constructor
    shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws
    ^
/home/rpavlik/src/luabind/luabind/detail/instance_holder.hpp:78:11: note: passing argument to parameter 'p' here
        P p, class_id dynamic_id, void* dynamic_ptr
          ^
In file included from /home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:6:
In file included from /home/rpavlik/src/luabind/luabind/luabind.hpp:27:
In file included from /home/rpavlik/src/luabind/luabind/class.hpp:72:
In file included from /home/rpavlik/src/luabind/luabind/back_reference.hpp:28:
In file included from /home/rpavlik/src/luabind/luabind/wrapper_base.hpp:29:
In file included from /home/rpavlik/src/luabind/luabind/detail/call_member.hpp:30:
In file included from /home/rpavlik/src/luabind/luabind/detail/convert_to_lua.hpp:28:
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:288:20: error: call to implicitly-deleted copy constructor of 'boost::shared_ptr<<anonymous>::X>'
            return *static_cast<T*>(result);
                   ^~~~~~~~~~~~~~~~~~~~~~~~
/home/rpavlik/src/luabind/luabind/detail/call.hpp:295:34: note: in instantiation of function template specialization 'luabind::detail::value_converter::apply<boost::shared_ptr<<anonymous>::X> >' requested here
                BOOST_PP_ENUM(N, LUABIND_INVOKE_ARG, LUABIND_INVOKE_IDENTITY)
                                 ^
/usr/include/boost/preprocessor/repetition/enum.hpp:35:79: note: expanded from macro 'BOOST_PP_ENUM_1'
#    define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d))
                                                                              ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:38:63: note: expanded from macro 'BOOST_PP_REPEAT_1'
# define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_REPEAT_1_I(c, m, d)
                                                              ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:43:66: note: expanded from macro 'BOOST_PP_REPEAT_1_I'
# define BOOST_PP_REPEAT_1_I(c, m, d) BOOST_PP_REPEAT_1_ ## c(m, d)
                                                                 ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/usr/include/boost/preprocessor/repetition/enum.hpp:53:70: note: expanded from macro 'BOOST_PP_ENUM_M_1_IM'
#    define BOOST_PP_ENUM_M_1_IM(z, n, im) BOOST_PP_ENUM_M_1_I(z, n, im)
                                                                     ^
/usr/include/boost/preprocessor/repetition/enum.hpp:62:63: note: expanded from macro 'BOOST_PP_ENUM_M_1_I'
# define BOOST_PP_ENUM_M_1_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d)
                                                              ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:168:29: note: expanded from macro 'LUABIND_INVOKE_ARG'
    BOOST_PP_CAT(c,base(n)).apply( \
                            ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:88:12: note: in instantiation of function template specialization 'luabind::detail::invoke_normal<void (*)(boost::shared_ptr<<anonymous>::X>), boost::function_types::components<void (*)(boost::shared_ptr<<anonymous>::X>), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
    return invoke_normal(
           ^
/home/rpavlik/src/luabind/luabind/detail/call.hpp:99:12: note: in instantiation of function template specialization 'luabind::detail::invoke0<void (*)(boost::shared_ptr<<anonymous>::X>), boost::function_types::components<void (*)(boost::shared_ptr<<anonymous>::X>), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type, boost::is_void<void> >' requested here
    return invoke0(
           ^
/home/rpavlik/src/luabind/luabind/make_function.hpp:62:25: note: in instantiation of function template specialization 'luabind::detail::invoke<void (*)(boost::shared_ptr<<anonymous>::X>), boost::function_types::components<void (*)(boost::shared_ptr<<anonymous>::X>), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
              results = invoke(
                        ^
/home/rpavlik/src/luabind/luabind/make_function.hpp:32:28: note: in instantiation of member function 'luabind::detail::function_object_impl<void (*)(boost::shared_ptr<<anonymous>::X>), boost::function_types::components<void (*)(boost::shared_ptr<<anonymous>::X>), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>::entry_point' requested here
        : function_object(&entry_point)
                           ^
/home/rpavlik/src/luabind/luabind/make_function.hpp:107:13: note: in instantiation of member function 'luabind::detail::function_object_impl<void (*)(boost::shared_ptr<<anonymous>::X>), boost::function_types::components<void (*)(boost::shared_ptr<<anonymous>::X>), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>::function_object_impl' requested here
      , new detail::function_object_impl<F, Signature, Policies>(
            ^
/home/rpavlik/src/luabind/luabind/function.hpp:28:23: note: in instantiation of function template specialization 'luabind::make_function<void (*)(boost::shared_ptr<<anonymous>::X>), boost::function_types::components<void (*)(boost::shared_ptr<<anonymous>::X>), boost::add_reference<mpl_::arg<-1> > >, luabind::detail::null_type>' requested here
          object fn = make_function(L, f, deduce_signature(f), policies);
                      ^
/home/rpavlik/src/luabind/luabind/function.hpp:48:13: note: in instantiation of member function 'luabind::detail::function_registration<void (*)(boost::shared_ptr<<anonymous>::X>), luabind::detail::null_type>::register_' requested here
        new detail::function_registration<F, Policies>(name, f, policies)));
            ^
/home/rpavlik/src/luabind/luabind/function.hpp:54:12: note: in instantiation of function template specialization 'luabind::def<void (*)(boost::shared_ptr<<anonymous>::X>), luabind::detail::null_type>' requested here
    return def(name, f, detail::null_type());
           ^
/home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:101:9: note: in instantiation of function template specialization 'luabind::def<void (*)(boost::shared_ptr<<anonymous>::X>)>' requested here
        def("needs_x", needs_x)
        ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:347:5: note: copy constructor is implicitly deleted because 'shared_ptr<<anonymous>::X>' has a user-declared move constructor
    shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws
    ^
In file included from /home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:6:
In file included from /home/rpavlik/src/luabind/luabind/luabind.hpp:27:
In file included from /home/rpavlik/src/luabind/luabind/class.hpp:89:
In file included from /home/rpavlik/src/luabind/luabind/function.hpp:8:
/home/rpavlik/src/luabind/luabind/detail/call_function.hpp:153:38: error: no matching member function for call to 'apply'
                    return converter.apply(L, LUABIND_DECORATE_TYPE(Ret), -1);
                           ~~~~~~~~~~^~~~~
/home/rpavlik/src/luabind/test/test_automatic_smart_ptr.cpp:119:32: note: in instantiation of member function 'luabind::detail::proxy_function_caller<boost::shared_ptr<<anonymous>::X>, boost::tuples::tuple<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, boost::tuples::null_type, boost::tuples::null_type> >::operator shared_ptr' requested here
    boost::shared_ptr<X> spx = call_function<boost::shared_ptr<X> >(L, "get2");
                               ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:286:11: note: candidate template ignored: substitution failure [with T = boost::shared_ptr<<anonymous>::X>]
        T apply(lua_State*, by_value<T>, int)
          ^
/home/rpavlik/src/luabind/luabind/detail/policy.hpp:277:14: note: candidate function template not viable: requires 2 arguments, but 3 were provided
        void apply(lua_State* L, T x)
             ^
12 warnings and 6 errors generated.
make[2]: *** [test/CMakeFiles/test_automatic_smart_ptr.dir/test_automatic_smart_ptr.cpp.o] Error 1
make[2]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
make[1]: *** [test/CMakeFiles/test_automatic_smart_ptr.dir/all] Error 2
make[1]: Leaving directory `/home/rpavlik/src/luabind-build-clang'
make: *** [all] Error 2
Oberon00 commented 11 years ago

error: call to implicitly-deleted copy constructor of boost::shared_ptr<<anonymous>::X> note: copy constructor is implicitly deleted because shared_ptr<<anonymous>::X> has a user-declared move constructor

Looks like an incompatible standard library. I think this has nothing to do with Luabind. I'm quite sure you can confirm this by trying to compile a minimal example with std::shared_ptr where you use the copy constructor or copy assignment.

error: no matching member function for call to apply note: candidate template ignored: substitution failure [with T = boost::shared_ptr<<anonymous>::X>]

I hope this has the same cause.

warning: dynamic exception specifications are deprecated [-Wdeprecated]

Okay, I should be able to conditionally use noexpect instead.

warning: definition of implicit copy constructor for object_interface<luabind::adl::object> is deprecated because it has a user-declared destructor [-Wdeprecated]

Removing the empty destructor of object_interface<Derived> should be enough to silence this.

EDIT:

operator_id.hpp:53:28: warning: no previous extern declaration for non-static variable 'a' [-Wmissing-variable-declarations]

That variable is both static and local. Looks actually like a clang bug to me. If something like

inline void foo() { static int bar = 42; }
int main() { }

with the Wmissing-variable-declarations warning enabled causes the warning I would file a bug for Clang.

(same for the warning a few lines below)