Closed liclac closed 9 years ago
Seems like I need to test the library with Boost 1.57.
/Users/uppfinnarn/luabind/luabind/detail/object.hpp:192:13: error: implicit instantiation of undefined template 'std::__1::basic_ostream<char, std::__1::char_traits<char> >' os.setstate(std::ios::failbit);
Try adding #include <iostream>
or <ostream>
in detail/object.hpp
.
/Users/uppfinnarn/luabind/luabind/detail/object.hpp:524:3: error: no matching function for call to 'operator==' LUABIND_OPERATOR_ADL_WKND(==) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/uppfinnarn/luabind/luabind/detail/object.hpp:514:14: note: expanded from macro 'LUABIND_OPERATOR_ADL_WKND' return boost::operator op(x, y); \ ^~~~~~~~~~~~~~~~~~
Hmm. Try changing boost::operator
to boost::iterators::operator
here or change the returns to return x op y;
.
Improvement! The errors disappeared, but now there's another one instead.
diff --git a/luabind/detail/object.hpp b/luabind/detail/object.hpp
index c69082f..365ec96 100644
--- a/luabind/detail/object.hpp
+++ b/luabind/detail/object.hpp
@@ -41,6 +41,8 @@
#include <boost/tuple/tuple.hpp>
#include <boost/utility/enable_if.hpp>
+#include <iostream>
+
namespace luabind {
namespace adl
@@ -511,14 +513,14 @@ namespace detail
basic_iterator<basic_access> const& x \
, basic_iterator<basic_access> const& y) \
{ \
- return boost::operator op(x, y); \
+ return boost::iterators::operator op(x, y); \
} \
\
inline bool operator op( \
basic_iterator<raw_access> const& x \
, basic_iterator<raw_access> const& y) \
{ \
- return boost::operator op(x, y); \
+ return boost::iterators::operator op(x, y); \
}
LUABIND_OPERATOR_ADL_WKND(==)
Scanning dependencies of target luabind
[ 1%] Building CXX object src/CMakeFiles/luabind.dir/class.cpp.o
[ 2%] Building CXX object src/CMakeFiles/luabind.dir/class_info.cpp.o
[ 4%] Building CXX object src/CMakeFiles/luabind.dir/class_registry.cpp.o
[ 4%] Building CXX object src/CMakeFiles/luabind.dir/class_rep.cpp.o
[ 5%] Building CXX object src/CMakeFiles/luabind.dir/create_class.cpp.o
[ 7%] Building CXX object src/CMakeFiles/luabind.dir/error.cpp.o
[ 8%] Building CXX object src/CMakeFiles/luabind.dir/exception_handler.cpp.o
[ 10%] Building CXX object src/CMakeFiles/luabind.dir/function.cpp.o
[ 11%] Building CXX object src/CMakeFiles/luabind.dir/function_introspection.cpp.o
[ 12%] Building CXX object src/CMakeFiles/luabind.dir/inheritance.cpp.o
[ 14%] Building CXX object src/CMakeFiles/luabind.dir/link_compatibility.cpp.o
[ 15%] Building CXX object src/CMakeFiles/luabind.dir/object_rep.cpp.o
[ 17%] Building CXX object src/CMakeFiles/luabind.dir/open.cpp.o
[ 18%] Building CXX object src/CMakeFiles/luabind.dir/operator.cpp.o
[ 20%] Building CXX object src/CMakeFiles/luabind.dir/pcall.cpp.o
[ 20%] Building CXX object src/CMakeFiles/luabind.dir/scope.cpp.o
[ 21%] Building CXX object src/CMakeFiles/luabind.dir/set_package_preload.cpp.o
[ 22%] Building CXX object src/CMakeFiles/luabind.dir/shared_ptr_converter.cpp.o
[ 24%] Building CXX object src/CMakeFiles/luabind.dir/stack_content_by_name.cpp.o
[ 25%] Building CXX object src/CMakeFiles/luabind.dir/weak_ref.cpp.o
[ 27%] Building CXX object src/CMakeFiles/luabind.dir/wrapper_base.cpp.o
Linking CXX static library libluabind09.a
[ 27%] Built target luabind
Scanning dependencies of target benchmark
[ 27%] Building CXX object test/CMakeFiles/benchmark.dir/benchmark.cpp.o
Linking CXX executable benchmark
[ 27%] Built target benchmark
Scanning dependencies of target test_main
[ 28%] Building CXX object test/CMakeFiles/test_main.dir/main.cpp.o
[ 30%] Building CXX object test/CMakeFiles/test_main.dir/test_has_get_pointer.cpp.o
Linking CXX static library libtest_main.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libtest_main.a(test_has_get_pointer.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libtest_main.a(test_has_get_pointer.cpp.o) has no symbols
[ 30%] Built target test_main
Scanning dependencies of target test_abstract_base
[ 31%] Building CXX object test/CMakeFiles/test_abstract_base.dir/test_abstract_base.cpp.o
Linking CXX executable test_abstract_base
[ 31%] Built target test_abstract_base
Scanning dependencies of target test_adopt
[ 32%] Building CXX object test/CMakeFiles/test_adopt.dir/test_adopt.cpp.o
Linking CXX executable test_adopt
[ 32%] Built target test_adopt
Scanning dependencies of target test_adopt_wrapper
[ 34%] Building CXX object test/CMakeFiles/test_adopt_wrapper.dir/test_adopt_wrapper.cpp.o
Linking CXX executable test_adopt_wrapper
[ 34%] Built target test_adopt_wrapper
Scanning dependencies of target test_attributes
[ 35%] Building CXX object test/CMakeFiles/test_attributes.dir/test_attributes.cpp.o
Linking CXX executable test_attributes
[ 35%] Built target test_attributes
Scanning dependencies of target test_automatic_smart_ptr
[ 37%] Building CXX object test/CMakeFiles/test_automatic_smart_ptr.dir/test_automatic_smart_ptr.cpp.o
Linking CXX executable test_automatic_smart_ptr
[ 37%] Built target test_automatic_smart_ptr
Scanning dependencies of target test_back_reference
[ 38%] Building CXX object test/CMakeFiles/test_back_reference.dir/test_back_reference.cpp.o
Linking CXX executable test_back_reference
[ 38%] Built target test_back_reference
Scanning dependencies of target test_builtin_converters
[ 38%] Building CXX object test/CMakeFiles/test_builtin_converters.dir/test_builtin_converters.cpp.o
Linking CXX executable test_builtin_converters
[ 38%] Built target test_builtin_converters
Scanning dependencies of target test_class_info
[ 40%] Building CXX object test/CMakeFiles/test_class_info.dir/test_class_info.cpp.o
Linking CXX executable test_class_info
[ 40%] Built target test_class_info
Scanning dependencies of target test_collapse_converter
[ 41%] Building CXX object test/CMakeFiles/test_collapse_converter.dir/test_collapse_converter.cpp.o
Linking CXX executable test_collapse_converter
[ 41%] Built target test_collapse_converter
Scanning dependencies of target test_const
[ 42%] Building CXX object test/CMakeFiles/test_const.dir/test_const.cpp.o
Linking CXX executable test_const
[ 42%] Built target test_const
Scanning dependencies of target test_construction
[ 44%] Building CXX object test/CMakeFiles/test_construction.dir/test_construction.cpp.o
Linking CXX executable test_construction
[ 44%] Built target test_construction
Scanning dependencies of target test_create_in_thread
[ 45%] Building CXX object test/CMakeFiles/test_create_in_thread.dir/test_create_in_thread.cpp.o
Linking CXX executable test_create_in_thread
[ 45%] Built target test_create_in_thread
Scanning dependencies of target test_def_from_base
[ 47%] Building CXX object test/CMakeFiles/test_def_from_base.dir/test_def_from_base.cpp.o
Linking CXX executable test_def_from_base
[ 47%] Built target test_def_from_base
Scanning dependencies of target test_destruction
[ 48%] Building CXX object test/CMakeFiles/test_destruction.dir/test_destruction.cpp.o
Linking CXX executable test_destruction
[ 48%] Built target test_destruction
Scanning dependencies of target test_dynamic_type
[ 50%] Building CXX object test/CMakeFiles/test_dynamic_type.dir/test_dynamic_type.cpp.o
Linking CXX executable test_dynamic_type
[ 50%] Built target test_dynamic_type
Scanning dependencies of target test_exception_handlers
[ 51%] Building CXX object test/CMakeFiles/test_exception_handlers.dir/test_exception_handlers.cpp.o
Linking CXX executable test_exception_handlers
[ 51%] Built target test_exception_handlers
Scanning dependencies of target test_exceptions
[ 52%] Building CXX object test/CMakeFiles/test_exceptions.dir/test_exceptions.cpp.o
/Users/uppfinnarn/Projects/Libraries/luabind/test/test_exceptions.cpp:31:13: warning:
definition of implicit copy constructor for 'ex' is deprecated because it
has a user-declared destructor [-Wdeprecated]
virtual ~ex() LUABIND_NOEXCEPT {}
^
/Users/uppfinnarn/Projects/Libraries/luabind/test/test_exceptions.cpp:44:13: note:
implicit copy constructor for 'ex' first required here
{ throw ex("exception description"); }
^
1 warning generated.
Linking CXX executable test_exceptions
[ 52%] Built target test_exceptions
Scanning dependencies of target test_extend_class_in_lua
[ 54%] Building CXX object test/CMakeFiles/test_extend_class_in_lua.dir/test_extend_class_in_lua.cpp.o
Linking CXX executable test_extend_class_in_lua
[ 54%] Built target test_extend_class_in_lua
Scanning dependencies of target test_free_functions
[ 54%] Building CXX object test/CMakeFiles/test_free_functions.dir/test_free_functions.cpp.o
Linking CXX executable test_free_functions
[ 54%] Built target test_free_functions
Scanning dependencies of target test_function_converter
[ 55%] Building CXX object test/CMakeFiles/test_function_converter.dir/test_function_converter.cpp.o
Linking CXX executable test_function_converter
[ 55%] Built target test_function_converter
Scanning dependencies of target test_function_introspection
[ 57%] Building CXX object test/CMakeFiles/test_function_introspection.dir/test_function_introspection.cpp.o
Linking CXX executable test_function_introspection
[ 57%] Built target test_function_introspection
Scanning dependencies of target test_function_object
[ 58%] Building CXX object test/CMakeFiles/test_function_object.dir/test_function_object.cpp.o
Linking CXX executable test_function_object
[ 58%] Built target test_function_object
Scanning dependencies of target test_held_type
[ 60%] Building CXX object test/CMakeFiles/test_held_type.dir/test_held_type.cpp.o
/Users/uppfinnarn/Projects/Libraries/luabind/test/test_held_type.cpp:57:13: warning:
definition of implicit copy constructor for 'first_base' is deprecated
because it has a user-declared destructor [-Wdeprecated]
virtual ~first_base() {}
^
/Users/uppfinnarn/Projects/Libraries/luabind/test/test_held_type.cpp:62:8: note:
implicit copy constructor for 'first_base' first required here
struct derived : first_base, base
^
/Users/uppfinnarn/Projects/Libraries/luabind/test/test_held_type.cpp:45:13: warning:
definition of implicit copy constructor for 'base' is deprecated because
it has a user-declared destructor [-Wdeprecated]
virtual ~base() {}
^
/Users/uppfinnarn/Projects/Libraries/luabind/test/test_held_type.cpp:62:8: note:
implicit copy constructor for 'base' first required here
struct derived : first_base, base
^
2 warnings generated.
Linking CXX executable test_held_type
[ 60%] Built target test_held_type
Scanning dependencies of target test_implicit_cast
[ 61%] Building CXX object test/CMakeFiles/test_implicit_cast.dir/test_implicit_cast.cpp.o
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/test/test_implicit_cast.cpp:24:
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/luabind/luabind.hpp:27:
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/luabind/class.hpp:80:
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/detail/enum_maker.hpp:119:18: warning:
definition of implicit copy constructor for
'enum_maker<luabind::class_<<anonymous>::enum_placeholder,
luabind::detail::unspecified, luabind::detail::unspecified,
luabind::detail::unspecified> >' is deprecated because it has a
user-declared copy assignment operator [-Wdeprecated]
void operator=(enum_maker const&); // C4512, assignment oper...
^
/Users/uppfinnarn/Projects/Libraries/luabind/test/test_implicit_cast.cpp:86:14: note:
in instantiation of member function
'luabind::class_<<anonymous>::enum_placeholder,
luabind::detail::unspecified, luabind::detail::unspecified,
luabind::detail::unspecified>::enum_' requested here
.enum_("constants")
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/class.hpp:727:20: note:
implicit copy constructor for
'enum_maker<luabind::class_<<anonymous>::enum_placeholder,
luabind::detail::unspecified, luabind::detail::unspecified,
luabind::detail::unspecified> >' first required here
return detail::enum_maker<self_t>(*this);
^
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/test/test_implicit_cast.cpp:24:
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/luabind/luabind.hpp:27:
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/luabind/class.hpp:72:
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/luabind/back_reference.hpp:28:
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/luabind/wrapper_base.hpp:29:
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/luabind/detail/call_member.hpp:30:
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/luabind/detail/convert_to_lua.hpp:28:
In file included from /Users/uppfinnarn/Projects/Libraries/luabind/luabind/detail/policy.hpp:72:
/usr/local/include/boost/core/underlying_type.hpp:73:12: error: implicit
instantiation of undefined template
'boost::detail::underlying_type_impl<<anonymous>::LBENUM_t, void>'
public detail::underlying_type_impl< EnumType >
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/detail/policy.hpp:503:37: note:
in instantiation of template class
'boost::underlying_type<<anonymous>::LBENUM_t>' requested here
typedef typename boost::underlying_type<T>::type integral_t;
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/detail/call.hpp:295:34: note:
in instantiation of function template specialization
'luabind::detail::enum_converter::apply<<anonymous>::LBENUM_t>' requested
here
BOOST_PP_ENUM(N, LUABIND_INVOKE_ARG, LUABIND_INVOKE_IDENTITY)
^
/usr/local/include/boost/preprocessor/repetition/enum.hpp:35:79: note: expanded
from macro 'BOOST_PP_ENUM_1'
...BOOST_PP_ENUM_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d))
^
/usr/local/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/local/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/local/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/local/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)
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/detail/call.hpp:168:29: note:
expanded from macro 'LUABIND_INVOKE_ARG'
BOOST_PP_CAT(c,base(n)).apply( \
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/detail/call.hpp:88:12: note:
in instantiation of function template specialization
'luabind::detail::invoke_normal<<anonymous>::LBENUM_t
(*)(<anonymous>::LBENUM_t),
boost::function_types::components<<anonymous>::LBENUM_t
(*)(<anonymous>::LBENUM_t), boost::add_reference<mpl_::arg<-1> > >,
luabind::detail::null_type>' requested here
return invoke_normal(
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/detail/call.hpp:99:12: note:
in instantiation of function template specialization
'luabind::detail::invoke0<<anonymous>::LBENUM_t
(*)(<anonymous>::LBENUM_t),
boost::function_types::components<<anonymous>::LBENUM_t
(*)(<anonymous>::LBENUM_t), boost::add_reference<mpl_::arg<-1> > >,
luabind::detail::null_type, boost::is_void<<anonymous>::LBENUM_t> >'
requested here
return invoke0(
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/make_function.hpp:62:25: note:
in instantiation of function template specialization
'luabind::detail::invoke<<anonymous>::LBENUM_t (*)(<anonymous>::LBENUM_t),
boost::function_types::components<<anonymous>::LBENUM_t
(*)(<anonymous>::LBENUM_t), boost::add_reference<mpl_::arg<-1> > >,
luabind::detail::null_type>' requested here
results = invoke(
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/make_function.hpp:32:28: note:
(skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see
all)
: function_object(&entry_point)
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/make_function.hpp:107:13: note:
in instantiation of member function
'luabind::detail::function_object_impl<<anonymous>::LBENUM_t
(*)(<anonymous>::LBENUM_t),
boost::function_types::components<<anonymous>::LBENUM_t
(*)(<anonymous>::LBENUM_t), boost::add_reference<mpl_::arg<-1> > >,
luabind::detail::null_type>::function_object_impl' requested here
, new detail::function_object_impl<F, Signature, Policies>(
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/function.hpp:28:23: note:
in instantiation of function template specialization
'luabind::make_function<<anonymous>::LBENUM_t (*)(<anonymous>::LBENUM_t),
boost::function_types::components<<anonymous>::LBENUM_t
(*)(<anonymous>::LBENUM_t), boost::add_reference<mpl_::arg<-1> > >,
luabind::detail::null_type>' requested here
object fn = make_function(L, f, deduce_signature(f), policies);
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/function.hpp:48:13: note:
in instantiation of member function
'luabind::detail::function_registration<<anonymous>::LBENUM_t
(*)(<anonymous>::LBENUM_t), luabind::detail::null_type>::register_'
requested here
new detail::function_registration<F, Policies>(name, f, policies)));
^
/Users/uppfinnarn/Projects/Libraries/luabind/luabind/function.hpp:54:12: note:
in instantiation of function template specialization
'luabind::def<<anonymous>::LBENUM_t (*)(<anonymous>::LBENUM_t),
luabind::detail::null_type>' requested here
return def(name, f, detail::null_type());
^
/Users/uppfinnarn/Projects/Libraries/luabind/test/test_implicit_cast.cpp:91:9: note:
in instantiation of function template specialization
'luabind::def<<anonymous>::LBENUM_t (*)(<anonymous>::LBENUM_t)>' requested
here
def("enum_by_val", &enum_by_val),
^
/usr/local/include/boost/core/underlying_type.hpp:31:8: note: template is
declared here
struct underlying_type_impl;
^
1 warning and 1 error generated.
make[2]: *** [test/CMakeFiles/test_implicit_cast.dir/test_implicit_cast.cpp.o] Error 1
make[1]: *** [test/CMakeFiles/test_implicit_cast.dir/all] Error 2
make: *** [all] Error 2
Ah, looks like passing -DLUABIND_NO_SCOPED_ENUM:BOOL=ON
to CMake fixes it. Would it be possible to autodetect when these are available?
See bee4b85a9bcb48b707980b9016eaddb287be3deb.
Ah, looks like it's only needed for that one unit test, nevermind then. That PR fixes the actual library building, if you don't mind the placement of the
(Hopefully) fixed by 9a2a2f1aa23cbb5d5e46a776b49415d071bac187 and fb3c6623c728209a2ba69d178bd87589bf04e9cf. Please tell me if not.
Looks like a simple case of a missing header, but I'm not sure which one. I'll try to fix it myself later, but it's probably a really simple fix for someone familiar with the codebase.
Running OSX 10.10.