personalrobotics / dartpy

:dart: :snake: Python bindings for the Dynamic Animation and Robotics Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build failure with GCC 5.4.0 on Xenial

jslee02 opened this issue · comments

Besides #53, dartpy fails to build with DART 6.4 with following error messages:

Scanning dependencies of target dartpy
[  0%] Building CXX object CMakeFiles/dartpy.dir/src/generated/_ZN4dart6common8NoArgTagE.cpp.o
[  0%] Building CXX object CMakeFiles/dartpy.dir/src/generated/_ZN4dart6common5EmptyE.cpp.o
[  0%] Building CXX object CMakeFiles/dartpy.dir/src/generated/_ZN4dart6common11make_uniqueINS0_13MakeCloneableINS0_6Aspect10PropertiesENS_8dynamics6detail15JointPropertiesEEEJRKS8_EEESt10unique_ptrIT_St14default_deleteISC_EEDpOT0_.cpp.o
[  0%] Building CXX object CMakeFiles/dartpy.dir/src/generated/_ZN4dart6common11make_uniqueINS0_24EmbeddedPropertiesAspectINS_8dynamics5JointENS3_6detail15JointPropertiesEEEJRKNS0_13MakeCloneableINS0_6Aspect10PropertiesES6_EEEEESt10unique_ptrIT_St14default_d_0000.cpp.o
/home/jslee02/dev/prl/dartpy/master/src/generated/_ZN4dart6common11make_uniqueINS0_13MakeCloneableINS0_6Aspect10PropertiesENS_8dynamics6detail15JointPropertiesEEEJRKS8_EEESt10unique_ptrIT_St14default_deleteISC_EEDpOT0_.cpp:25:1: error: ‘std::unique_ptr<T> dart::common::make_unique(Args&& ...) [with T = dart::common::MakeCloneable<dart::common::Aspect::Properties, dart::dynamics::detail::JointProperties>; Args = {const dart::common::MakeCloneable<dart::common::Aspect::Properties, dart::dynamics::detail::JointProperties>&}]’ conflicts with a previous declaration
 }
 ^
/home/jslee02/dev/prl/dartpy/master/src/generated/_ZN4dart6common11make_uniqueINS0_13MakeCloneableINS0_6Aspect10PropertiesENS_8dynamics6detail15JointPropertiesEEEJRKS8_EEESt10unique_ptrIT_St14default_deleteISC_EEDpOT0_.cpp:18:6: note: previous declaration ‘void _ZN4dart6common11make_uniqueINS0_13MakeCloneableINS0_6Aspect10PropertiesENS_8dynamics6detail15JointPropertiesEEEJRKS8_EEESt10unique_ptrIT_St14default_deleteISC_EEDpOT0_()’
 void _ZN4dart6common11make_uniqueINS0_13MakeCloneableINS0_6Aspect10PropertiesENS_8dynamics6detail15JointPropertiesEEEJRKS8_EEESt10unique_ptrIT_St14default_deleteISC_EEDpOT0_()
      ^
In file included from /usr/include/dart/common/Memory.hpp:222:0,
                 from /usr/include/dart/common/Cloneable.hpp:39,
                 from /usr/include/dart/common/Aspect.hpp:38,
                 from /usr/include/dart/common/detail/CompositeData.hpp:43,
                 from /usr/include/dart/common/Composite.hpp:36,
                 from /usr/include/dart/dynamics/Entity.hpp:42,
                 from /usr/include/dart/dynamics/Frame.hpp:40,
                 from /usr/include/dart/dynamics/FixedFrame.hpp:36,
                 from /usr/include/dart/dynamics/dynamics.hpp:3,
                 from /home/jslee02/dev/prl/dartpy/master/include/dartpy/pointers.h:12,
                 from /home/jslee02/dev/prl/dartpy/master/src/generated/_ZN4dart6common11make_uniqueINS0_13MakeCloneableINS0_6Aspect10PropertiesENS_8dynamics6detail15JointPropertiesEEEJRKS8_EEESt10unique_ptrIT_St14default_deleteISC_EEDpOT0_.cpp:1:
/usr/include/dart/common/detail/Memory-impl.hpp:66:20: note: a later -fabi-version= (or =0) avoids this error with a change in mangling
 std::unique_ptr<T> make_unique(Args&&... args)
                    ^
CMakeFiles/dartpy.dir/build.make:110: recipe for target 'CMakeFiles/dartpy.dir/src/generated/_ZN4dart6common11make_uniqueINS0_13MakeCloneableINS0_6Aspect10PropertiesENS_8dynamics6detail15JointPropertiesEEEJRKS8_EEESt10unique_ptrIT_St14default_deleteISC_EEDpOT0_.cpp.o' failed
make[2]: *** [CMakeFiles/dartpy.dir/src/generated/_ZN4dart6common11make_uniqueINS0_13MakeCloneableINS0_6Aspect10PropertiesENS_8dynamics6detail15JointPropertiesEEEJRKS8_EEESt10unique_ptrIT_St14default_deleteISC_EEDpOT0_.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/jslee02/dev/prl/dartpy/master/src/generated/_ZN4dart6common11make_uniqueINS0_24EmbeddedPropertiesAspectINS_8dynamics5JointENS3_6detail15JointPropertiesEEEJRKNS0_13MakeCloneableINS0_6Aspect10PropertiesES6_EEEEESt10unique_ptrIT_St14default_d_0000.cpp:25:1: error: ‘std::unique_ptr<T> dart::common::make_unique(Args&& ...) [with T = dart::common::EmbeddedPropertiesAspect<dart::dynamics::Joint, dart::dynamics::detail::JointProperties>; Args = {const dart::common::MakeCloneable<dart::common::Aspect::Properties, dart::dynamics::detail::JointProperties>&}]’ conflicts with a previous declaration
 }
 ^
/home/jslee02/dev/prl/dartpy/master/src/generated/_ZN4dart6common11make_uniqueINS0_24EmbeddedPropertiesAspectINS_8dynamics5JointENS3_6detail15JointPropertiesEEEJRKNS0_13MakeCloneableINS0_6Aspect10PropertiesES6_EEEEESt10unique_ptrIT_St14default_d_0000.cpp:18:6: note: previous declaration ‘void _ZN4dart6common11make_uniqueINS0_24EmbeddedPropertiesAspectINS_8dynamics5JointENS3_6detail15JointPropertiesEEEJRKNS0_13MakeCloneableINS0_6Aspect10PropertiesES6_EEEEESt10unique_ptrIT_St14default_deleteISF_EEDpOT0_()’
 void _ZN4dart6common11make_uniqueINS0_24EmbeddedPropertiesAspectINS_8dynamics5JointENS3_6detail15JointPropertiesEEEJRKNS0_13MakeCloneableINS0_6Aspect10PropertiesES6_EEEEESt10unique_ptrIT_St14default_deleteISF_EEDpOT0_()
      ^
In file included from /usr/include/dart/common/Memory.hpp:222:0,
                 from /usr/include/dart/common/Cloneable.hpp:39,
                 from /usr/include/dart/common/Aspect.hpp:38,
                 from /usr/include/dart/common/detail/CompositeData.hpp:43,
                 from /usr/include/dart/common/Composite.hpp:36,
                 from /usr/include/dart/dynamics/Entity.hpp:42,
                 from /usr/include/dart/dynamics/Frame.hpp:40,
                 from /usr/include/dart/dynamics/FixedFrame.hpp:36,
                 from /usr/include/dart/dynamics/dynamics.hpp:3,
                 from /home/jslee02/dev/prl/dartpy/master/include/dartpy/pointers.h:12,
                 from /home/jslee02/dev/prl/dartpy/master/src/generated/_ZN4dart6common11make_uniqueINS0_24EmbeddedPropertiesAspectINS_8dynamics5JointENS3_6detail15JointPropertiesEEEJRKNS0_13MakeCloneableINS0_6Aspect10PropertiesES6_EEEEESt10unique_ptrIT_St14default_d_0000.cpp:1:
/usr/include/dart/common/detail/Memory-impl.hpp:66:20: note: a later -fabi-version= (or =0) avoids this error with a change in mangling
 std::unique_ptr<T> make_unique(Args&&... args)
                    ^
CMakeFiles/dartpy.dir/build.make:134: recipe for target 'CMakeFiles/dartpy.dir/src/generated/_ZN4dart6common11make_uniqueINS0_24EmbeddedPropertiesAspectINS_8dynamics5JointENS3_6detail15JointPropertiesEEEJRKNS0_13MakeCloneableINS0_6Aspect10PropertiesES6_EEEEESt10unique_ptrIT_St14default_d_0000.cpp.o' failed
make[2]: *** [CMakeFiles/dartpy.dir/src/generated/_ZN4dart6common11make_uniqueINS0_24EmbeddedPropertiesAspectINS_8dynamics5JointENS3_6detail15JointPropertiesEEEJRKNS0_13MakeCloneableINS0_6Aspect10PropertiesES6_EEEEESt10unique_ptrIT_St14default_d_0000.cpp.o] Error 1
make[1]: *** [CMakeFiles/dartpy.dir/all] Error 2
make: *** [all] Error 2

I'm investigating on this, but it would be appreciated if anyone can provide some ideas how to fix this.

Update: This errors only occur with gcc (5.4.0) but not with clang (3.8.0).

This is resolved by setting -fabi-version=6 as:

  target_compile_options("${PROJECT_NAME}"
    PRIVATE -fabi-version=6
  )