OGRECave / ogitor

Ogitor SceneBuilder, the WYSIWYG scene editing environment for OGRE
MIT License
95 stars 31 forks source link

Build error on Angelscript dependency #2

Closed bohdankornienko closed 6 years ago

bohdankornienko commented 6 years ago
[ 22%] Building CXX object Dependencies/Angelscript/CMakeFiles/Angelscript.dir/add_on/scriptarray/scriptarray.cpp.o
In file included from /ws/ogre_project/ogitor/Dependencies/Angelscript/add_on/scriptarray/scriptarray.h:6:0,
                 from /ws/ogre_project/ogitor/Dependencies/Angelscript/add_on/scriptarray/scriptarray.cpp:7:
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h: In function ‘asUINT asGetTypeTraits()’:
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:589:80: error: ‘has_trivial_default_constructor’ is not a member of ‘std’
  bool hasConstructor        = std::is_default_constructible<T>::value && !std::has_trivial_default_constructor<T>::value;
                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:589:80: note: suggested alternative: ‘is_trivially_default_constructible’
  bool hasConstructor        = std::is_default_constructible<T>::value && !std::has_trivial_default_constructor<T>::value;
                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                is_trivially_default_constructible
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:589:113: error: expected primary-expression before ‘>’ token
 ol hasConstructor        = std::is_default_constructible<T>::value && !std::has_trivial_default_constructor<T>::value;
                                                                                                              ^
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:589:116: error: ‘::value’ has not been declared
 ol hasConstructor        = std::is_default_constructible<T>::value && !std::has_trivial_default_constructor<T>::value;
                                                                                                                 ^~~~~
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:589:116: note: suggested alternative: ‘valloc’
 ol hasConstructor        = std::is_default_constructible<T>::value && !std::has_trivial_default_constructor<T>::value;
                                                                                                                 ^~~~~
                                                                                                                    valloc
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:591:80: error: ‘has_trivial_copy_assign’ is not a member of ‘std’
  bool hasAssignmentOperator = std::is_copy_assignable<T>::value       && !std::has_trivial_copy_assign<T>::value;
                                                                                ^~~~~~~~~~~~~~~~~~~~~~~
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:591:80: note: suggested alternative: ‘is_trivially_copy_assignable’
  bool hasAssignmentOperator = std::is_copy_assignable<T>::value       && !std::has_trivial_copy_assign<T>::value;
                                                                                ^~~~~~~~~~~~~~~~~~~~~~~
                                                                                is_trivially_copy_assignable
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:591:105: error: expected primary-expression before ‘>’ token
  bool hasAssignmentOperator = std::is_copy_assignable<T>::value       && !std::has_trivial_copy_assign<T>::value;
                                                                                                         ^
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:591:108: error: ‘::value’ has not been declared
  bool hasAssignmentOperator = std::is_copy_assignable<T>::value       && !std::has_trivial_copy_assign<T>::value;
                                                                                                            ^~~~~
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:591:108: note: suggested alternative: ‘valloc’
  bool hasAssignmentOperator = std::is_copy_assignable<T>::value       && !std::has_trivial_copy_assign<T>::value;
                                                                                                            ^~~~~
                                                                                                            valloc
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:592:80: error: ‘has_trivial_copy_constructor’ is not a member of ‘std’
  bool hasCopyConstructor    = std::is_copy_constructible<T>::value    && !std::has_trivial_copy_constructor<T>::value;
                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:592:80: note: suggested alternative: ‘is_trivially_copy_constructible’
  bool hasCopyConstructor    = std::is_copy_constructible<T>::value    && !std::has_trivial_copy_constructor<T>::value;
                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                is_trivially_copy_constructible
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:592:110: error: expected primary-expression before ‘>’ token
  bool hasCopyConstructor    = std::is_copy_constructible<T>::value    && !std::has_trivial_copy_constructor<T>::value;
                                                                                                              ^
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:592:113: error: ‘::value’ has not been declared
  bool hasCopyConstructor    = std::is_copy_constructible<T>::value    && !std::has_trivial_copy_constructor<T>::value;
                                                                                                                 ^~~~~
/ws/ogre_project/ogitor/Dependencies/Angelscript/include/angelscript.h:592:113: note: suggested alternative: ‘valloc’
  bool hasCopyConstructor    = std::is_copy_constructible<T>::value    && !std::has_trivial_copy_constructor<T>::value;
                                                                                                                 ^~~~~
                                                                                                                 valloc
make[2]: *** [Dependencies/Angelscript/CMakeFiles/Angelscript.dir/build.make:63: Dependencies/Angelscript/CMakeFiles/Angelscript.dir/add_on/scriptarray/scriptarray.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:354: Dependencies/Angelscript/CMakeFiles/Angelscript.dir/all] Error 2

Compiling with Arch linux, Ogre 1.10.8+, CPP11=OFF

Any Ideas how to fix it?

paroj commented 6 years ago

probably this: https://www.gamedev.net/forums/topic/668682-gcc-51-deprecated-warnings/

bohdankornienko commented 6 years ago

This fix worked for me. And I checked that 2.31.1 of the Angelscript has this fix as well.

Probably updating dependency version will fix the problem.

paroj commented 6 years ago

I think I had some reasons to stick with the current Angelscript version (API breaks probably). But you could try upgrading and provide a PR if it works.

bohdankornienko commented 6 years ago

Sure. I will prepare PR with fix today.