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

Cannot compile with libboost 1.60 & liblua5.3 #33

Closed Bertram25 closed 8 years ago

Bertram25 commented 8 years ago

See https://github.com/ValyriaTear/ValyriaTear/issues/522

In short, compiling luabind using the given library gives the following error output:

[  165s] In file included from /home/abuild/luabind/luabind/back_reference.hpp:26:0,
[  165s]                  from /home/abuild/luabind/luabind/class.hpp:72,
[  165s]                  from /home/abuild/luabind/luabind/luabind.hpp:27,
[  165s]                  from /home/abuild/utils/utils_pch.h:124:
[  165s] /home/abuild/luabind/luabind/detail/has_get_pointer.hpp:98:22: error: 'mpl' in namespace 'boost' does not name a type
[  165s]        typedef boost::mpl::bool_<value> type;
[  165s]                       ^

My instinct tells me it may be some kind of namespace collision, or missing header problem but I can't be sure.

According to @susnux, when using the repository from @rpavlik, it is compiling fine on the same system.

Disclaimer:

Last but not least, here is the diff between the two has_get_pointer.hpp files from the two project:

diff -u ./oberon_has_get_pointer.hpp ./rpavlik_has_get_pointer.hpp 
--- ../../../oberon_has_get_pointer.hpp 2016-02-29 21:26:02.042445819 +0100
+++ ../../../rpavlik_has_get_pointer.hpp        2016-02-29 21:26:19.005152695 +0100
@@ -29,17 +29,17 @@
 #  include <memory>
 # endif

-namespace luabind { namespace detail {
+namespace luabind { namespace detail { 

 namespace has_get_pointer_
 {

-  struct any
-  {
+  struct any 
+  { 
       template<class T> any(T const&);
   };

-  struct no_overload_tag
+  struct no_overload_tag 
   {};

   typedef char (&yes)[1];
@@ -70,11 +70,11 @@
 }} // namespace detail::has_get_pointer_
 # endif

-detail::has_get_pointer_::no_overload_tag
+detail::has_get_pointer_::no_overload_tag 
   get_pointer(detail::has_get_pointer_::any);

 # ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
-namespace detail { namespace has_get_pointer_
+namespace detail { namespace has_get_pointer_ 
 {
 # endif

@@ -104,3 +104,4 @@
 }} // namespace luabind::detail

 #endif // LUABIND_HAS_GET_POINTER_051022_HPP
+

... The diff reveals no meaningful changes... ! So the bug is definitely elsewhere.

If anyone has an idea, I'm all ears. :)

Cheers,

Oberon00 commented 8 years ago

Indeed simply a missing #include. Fixed.

Compilation with 1.60 does still spam a lot of warnings because Boost.FunctionTypes uses now-deprecated headers of Boost.TypeTraits.

Bertram25 commented 8 years ago

Thanks for the quick fix @Oberon00 . I'll import it now.

Compilation with 1.60 does still spam a lot of warnings because Boost.FunctionTypes uses now-deprecated headers of Boost.TypeTraits.

Duly noted.