Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile errors in the docker container with ./build-examples #5

Closed
torydebra opened this issue Sep 15, 2020 · 3 comments
Closed

compile errors in the docker container with ./build-examples #5

torydebra opened this issue Sep 15, 2020 · 3 comments
Assignees

Comments

@torydebra
Copy link
Member

user@b673832b9b26:~$ ./build-examples.sh 
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- xenomai NOT found. (/usr/local/xenomai;/usr/xenomai;/usr/include/xenomai)
-- xenomai NOT found. (/usr/local/xenomai;/usr/xenomai;/usr/include/xenomai)
-- xenomai NOT found. (/usr/local/xenomai;/usr/xenomai;/usr/include/xenomai)
-- xenomai NOT found. (/usr/local/xenomai;/usr/xenomai;/usr/include/xenomai)
-- xenomai NOT found. (/usr/local/xenomai;/usr/xenomai;/usr/include/xenomai)
-- xenomai NOT found. (/usr/local/xenomai;/usr/xenomai;/usr/include/xenomai)
-- xenomai NOT found. (/usr/local/xenomai;/usr/xenomai;/usr/include/xenomai)
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'bullet>=2.82'
--   Found bullet, version 2.88
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time 
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1") 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")  
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found suitable version "3.6.1", minimum required is "2.3.0") 
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.3.2
-- Found ZeroMQ: TRUE (Required is at least version "4") 
-- Checking for module 'uuid'
--   Found uuid, version 2.34.0
-- Found UUID: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/build
Scanning dependencies of target ros_from_rt
Scanning dependencies of target malloc_example
Scanning dependencies of target clock_example
Scanning dependencies of target homing_example
[  9%] Building CXX object src/homing_example/CMakeFiles/homing_example.dir/homing_example.cpp.o
[  9%] Building CXX object src/malloc_example/CMakeFiles/malloc_example.dir/malloc_example.cpp.o
[ 13%] Building CXX object src/clock/CMakeFiles/clock_example.dir/clock.cpp.o
[ 18%] Building CXX object src/ros_from_rt/CMakeFiles/ros_from_rt.dir/ros_from_rt.cpp.o
[ 22%] Linking CXX shared library libxbotctrl_homing_example.so
[ 22%] Built target homing_example
Scanning dependencies of target listener
[ 27%] Building CXX object src/talker_listener/CMakeFiles/listener.dir/listener.cpp.o
[ 31%] Linking CXX shared library libxbotctrl_malloc_example.so
[ 31%] Built target malloc_example
Scanning dependencies of target talker
[ 36%] Building CXX object src/talker_listener/CMakeFiles/talker.dir/talker.cpp.o
[ 40%] Linking CXX shared library libxbotctrl_clock_example.so
[ 40%] Built target clock_example
Scanning dependencies of target server
[ 45%] Building CXX object src/client_server/CMakeFiles/server.dir/server.cpp.o
[ 50%] Linking CXX shared library libxbotctrl_ros_from_rt.so
[ 50%] Built target ros_from_rt
Scanning dependencies of target client
[ 54%] Building CXX object src/client_server/CMakeFiles/client.dir/client.cpp.o
[ 59%] Linking CXX shared library libxbotctrl_talker.so
[ 59%] Built target talker
Scanning dependencies of target rocket_commander
[ 63%] Linking CXX shared library libxbotctrl_listener.so
[ 68%] Building CXX object src/device/CMakeFiles/rocket_commander.dir/rocket_plugin.cpp.o
[ 68%] Built target listener
Scanning dependencies of target xbot2_gz_rocket_server
[ 72%] Building CXX object src/device/CMakeFiles/xbot2_gz_rocket_server.dir/gz_rocket_server.cpp.o
[ 77%] Linking CXX shared library libxbotctrl_server.so
[ 77%] Built target server
Scanning dependencies of target rocket
[ 81%] Building CXX object src/device/CMakeFiles/rocket.dir/rocket_device.cpp.o
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:86:29: error: macro "XBOT2_REGISTER_DEVICE" passed 3 arguments, but takes just 2
   86 |                       rocket)
      |                             ^
In file included from /opt/xbot/include/xbot2/hal/device_common.h:11,
                 from /opt/xbot/include/xbot2/hal/device.h:5,
                 from /home/user/src/xbot2_examples/src/device/rocket_device_driver.h:4,
                 from /home/user/src/xbot2_examples/src/device/rocket_device.cpp:1:
/opt/xbot/include/xbot2/common/common.h:61: note: macro "XBOT2_REGISTER_DEVICE" defined here
   61 | #define XBOT2_REGISTER_DEVICE(DevClass, DevName)                                     \
      | 
In file included from /home/user/src/xbot2_examples/src/device/rocket_device.cpp:1:
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:38:44: error: expected template-name before ‘<’ token
   38 | class RocketDriver : public DeviceDriverTpl<RocketPacket::Rx,
      |                                            ^
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:38:44: error: expected ‘{’ before ‘<’ token
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:38:44: error: expected unqualified-id before ‘<’ token
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:72:53: error: expected template-name before ‘<’ token
   72 | class RocketDriverContainer : public DeviceContainer<RocketDriver>
      |                                                     ^
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:72:53: error: expected ‘{’ before ‘<’ token
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:72:53: error: expected unqualified-id before ‘<’ token
In file included from /home/user/src/xbot2_examples/src/device/rocket_device.cpp:2:
/home/user/src/xbot2_examples/src/device/rocket_device_client.h:14:26: error: ‘DeviceClientTpl’ does not name a type; did you mean ‘DeviceBaseTpl’?
   14 | using RocketClientBase = DeviceClientTpl<RocketPacket::Rx,
      |                          ^~~~~~~~~~~~~~~
      |                          DeviceBaseTpl
/home/user/src/xbot2_examples/src/device/rocket_device_client.h:22:45: error: expected class-name before ‘,’ token
   22 | class RocketClient : public RocketClientBase,
      |                                             ^
/home/user/src/xbot2_examples/src/device/rocket_device_client.h:28:11: error: ‘RocketClientBase’ has not been declared
   28 |     using RocketClientBase::RocketClientBase;
      |           ^~~~~~~~~~~~~~~~
/home/user/src/xbot2_examples/src/device/rocket_device_client.h:40:53: error: expected template-name before ‘<’ token
   40 | class RocketClientContainer : public DeviceContainer<RocketClient>
      |                                                     ^
/home/user/src/xbot2_examples/src/device/rocket_device_client.h:40:53: error: expected ‘{’ before ‘<’ token
/home/user/src/xbot2_examples/src/device/rocket_device_client.h:40:53: error: expected unqualified-id before ‘<’ token
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:6:68: error: ‘DeviceInfo’ is not a member of ‘XBot::Hal’
    6 | Hal::RocketDriverContainer::RocketDriverContainer(std::vector<Hal::DeviceInfo> devinfo):
      |                                                                    ^~~~~~~~~~
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:6:68: error: ‘DeviceInfo’ is not a member of ‘XBot::Hal’
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:6:78: error: template argument 1 is invalid
    6 | Hal::RocketDriverContainer::RocketDriverContainer(std::vector<Hal::DeviceInfo> devinfo):
      |                                                                              ^
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:6:78: error: template argument 2 is invalid
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:6:87: error: invalid use of incomplete type ‘class XBot::Hal::RocketDriverContainer’
    6 | Hal::RocketDriverContainer::RocketDriverContainer(std::vector<Hal::DeviceInfo> devinfo):
      |                                                                                       ^
In file included from /home/user/src/xbot2_examples/src/device/rocket_device.cpp:1:
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:72:7: note: forward declaration of ‘class XBot::Hal::RocketDriverContainer’
   72 | class RocketDriverContainer : public DeviceContainer<RocketDriver>
      |       ^~~~~~~~~~~~~~~~~~~~~
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:24:44: error: invalid use of incomplete type ‘class XBot::Hal::RocketDriverContainer’
   24 | bool Hal::RocketDriverContainer::sense_all()
      |                                            ^
In file included from /home/user/src/xbot2_examples/src/device/rocket_device.cpp:1:
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:72:7: note: forward declaration of ‘class XBot::Hal::RocketDriverContainer’
   72 | class RocketDriverContainer : public DeviceContainer<RocketDriver>
      |       ^~~~~~~~~~~~~~~~~~~~~
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:37:43: error: invalid use of incomplete type ‘class XBot::Hal::RocketDriverContainer’
   37 | bool Hal::RocketDriverContainer::move_all()
      |                                           ^
In file included from /home/user/src/xbot2_examples/src/device/rocket_device.cpp:1:
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:72:7: note: forward declaration of ‘class XBot::Hal::RocketDriverContainer’
   72 | class RocketDriverContainer : public DeviceContainer<RocketDriver>
      |       ^~~~~~~~~~~~~~~~~~~~~
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:46:32: error: expected constructor, destructor, or type conversion before ‘(’ token
   46 | Hal::RocketDriver::RocketDriver(Hal::DeviceInfo devinfo):
      |                                ^
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:53:35: error: invalid use of incomplete type ‘class XBot::Hal::RocketDriver’
   53 | bool Hal::RocketDriver::move_impl()
      |                                   ^
In file included from /home/user/src/xbot2_examples/src/device/rocket_device.cpp:1:
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:38:7: note: forward declaration of ‘class XBot::Hal::RocketDriver’
   38 | class RocketDriver : public DeviceDriverTpl<RocketPacket::Rx,
      |       ^~~~~~~~~~~~
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:63:36: error: invalid use of incomplete type ‘class XBot::Hal::RocketDriver’
   63 | bool Hal::RocketDriver::sense_impl()
      |                                    ^
In file included from /home/user/src/xbot2_examples/src/device/rocket_device.cpp:1:
/home/user/src/xbot2_examples/src/device/rocket_device_driver.h:38:7: note: forward declaration of ‘class XBot::Hal::RocketDriver’
   38 | class RocketDriver : public DeviceDriverTpl<RocketPacket::Rx,
      |       ^~~~~~~~~~~~
/home/user/src/xbot2_examples/src/device/rocket_device.cpp: In member function ‘virtual void XBot::Hal::RocketClient::setReference(double)’:
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:71:5: error: ‘_tx’ was not declared in this scope
   71 |     _tx.force_ref = thrust;
      |     ^~~
/home/user/src/xbot2_examples/src/device/rocket_device.cpp: In member function ‘virtual double XBot::Hal::RocketClient::getReference() const’:
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:76:12: error: ‘_rx’ was not declared in this scope
   76 |     return _rx.force_ref;
      |            ^~~
/home/user/src/xbot2_examples/src/device/rocket_device.cpp: In member function ‘virtual double XBot::Hal::RocketClient::getThrust() const’:
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:81:12: error: ‘_rx’ was not declared in this scope
   81 |     return _rx.force_meas;
      |            ^~~
/home/user/src/xbot2_examples/src/device/rocket_device.cpp: At global scope:
/home/user/src/xbot2_examples/src/device/rocket_device.cpp:84:1: error: ‘XBOT2_REGISTER_DEVICE’ does not name a type
   84 | XBOT2_REGISTER_DEVICE(Hal::RocketDriverContainer,
      | ^~~~~~~~~~~~~~~~~~~~~
In file included from /opt/xbot/include/xbot2/rt_plugin/control_plugin.h:4,
                 from /opt/xbot/include/xbot2/xbot2.h:1,
                 from /home/user/src/xbot2_examples/src/device/rocket_plugin.h:5,
                 from /home/user/src/xbot2_examples/src/device/rocket_plugin.cpp:1:
/opt/xbot/include/xbot2/robot_interface/robot_interface_xbot_rt.h: In instantiation of ‘DeviceInstanceType* XBot::RobotInterfaceXBot2Rt::getDeviceInstance(const string&) [with DeviceInstanceType = XBot::Hal::RocketBase; std::string = std::__cxx11::basic_string<char>]’:
/home/user/src/xbot2_examples/src/device/rocket_plugin.cpp:14:68:   required from here
/opt/xbot/include/xbot2/robot_interface/robot_interface_xbot_rt.h:108:81: error: static assertion failed: DeviceInstanceType must derive from Hal::DeviceInstanceBase
  108 |     static_assert(std::is_base_of<Hal::DeviceInstanceBase, DeviceInstanceType>::value,
      |                                                                                 ^~~~~
make[2]: *** [src/device/CMakeFiles/rocket.dir/build.make:63: src/device/CMakeFiles/rocket.dir/rocket_device.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:778: src/device/CMakeFiles/rocket.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [src/device/CMakeFiles/rocket_commander.dir/build.make:63: src/device/CMakeFiles/rocket_commander.dir/rocket_plugin.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:724: src/device/CMakeFiles/rocket_commander.dir/all] Error 2
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:8:52: error: expected template-name before ‘<’ token
    8 | class RocketAdapterGz : public Hal::DeviceTplCommon<RocketPacket::Rx,
      |                                                    ^
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:8:52: error: expected ‘{’ before ‘<’ token
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:8:52: error: expected unqualified-id before ‘<’ token
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp: In member function ‘virtual void XBot::GzRocketServer::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:45:5: error: ‘DeviceInfo’ was not declared in this scope; did you mean ‘AVDeviceInfo’?
   45 |     DeviceInfo devinfo{"rocket_0", "rocket", 100};
      |     ^~~~~~~~~~
      |     AVDeviceInfo
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:48:9: error: ‘devinfo’ was not declared in this scope; did you mean ‘dlinfo’?
   48 |         devinfo,
      |         ^~~~~~~
      |         dlinfo
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp: At global scope:
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:92:33: error: expected constructor, destructor, or type conversion before ‘(’ token
   92 | RocketAdapterGz::RocketAdapterGz(DeviceInfo devinfo,
      |                                 ^
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:101:29: error: invalid use of incomplete type ‘class RocketAdapterGz’
  101 | bool RocketAdapterGz::sense()
      |                             ^
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:8:7: note: forward declaration of ‘class RocketAdapterGz’
    8 | class RocketAdapterGz : public Hal::DeviceTplCommon<RocketPacket::Rx,
      |       ^~~~~~~~~~~~~~~
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:108:28: error: invalid use of incomplete type ‘class RocketAdapterGz’
  108 | bool RocketAdapterGz::move()
      |                            ^
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:8:7: note: forward declaration of ‘class RocketAdapterGz’
    8 | class RocketAdapterGz : public Hal::DeviceTplCommon<RocketPacket::Rx,
      |       ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:80,
                 from /usr/include/gazebo-9/gazebo/common/Battery.hh:23,
                 from /usr/include/gazebo-9/gazebo/common/common.hh:8,
                 from /usr/include/gazebo-9/gazebo/gazebo_core.hh:19,
                 from /usr/include/gazebo-9/gazebo/gazebo.hh:20,
                 from /home/user/src/xbot2_examples/src/device/gz_rocket_server.h:4,
                 from /home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:1:
/usr/include/c++/9/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = XBot::ServerManager; _Args = {std::vector<std::shared_ptr<XBot::Hal::DeviceRt>, std::allocator<std::shared_ptr<XBot::Hal::DeviceRt> > >&, const char (&)[4], const char (&)[7]}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<XBot::ServerManager>]’:
/home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:56:52:   required from here
/usr/include/c++/9/bits/unique_ptr.h:857:30: error: no matching function for call to ‘XBot::ServerManager::ServerManager(std::vector<std::shared_ptr<XBot::Hal::DeviceRt> >&, const char [4], const char [7])’
  857 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/user/src/xbot2_examples/src/device/gz_rocket_server.h:10,
                 from /home/user/src/xbot2_examples/src/device/gz_rocket_server.cpp:1:
/opt/xbot/include/xbot2/client_server/server_manager.h:39:5: note: candidate: ‘XBot::ServerManager::ServerManager(std::vector<std::shared_ptr<XBot::Hal::DeviceInstanceRt> >, std::string, std::string)’
   39 |     ServerManager(std::vector<Hal::DeviceInstanceRt::Ptr> devices,
      |     ^~~~~~~~~~~~~
/opt/xbot/include/xbot2/client_server/server_manager.h:39:59: note:   no known conversion for argument 1 from ‘vector<shared_ptr<XBot::Hal::DeviceRt>>’ to ‘vector<shared_ptr<XBot::Hal::DeviceInstanceRt>>’
   39 |     ServerManager(std::vector<Hal::DeviceInstanceRt::Ptr> devices,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
make[2]: *** [src/device/CMakeFiles/xbot2_gz_rocket_server.dir/build.make:63: src/device/CMakeFiles/xbot2_gz_rocket_server.dir/gz_rocket_server.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:751: src/device/CMakeFiles/xbot2_gz_rocket_server.dir/all] Error 2
[ 86%] Linking CXX shared library libxbotctrl_client.so
[ 86%] Built target client
make: *** [Makefile:130: all] Error 2
@alaurenzi
Copy link
Collaborator

This is expected, I have to update the Docker to support the latest hal_refactor branches. Thanks for reporting!

@alaurenzi alaurenzi self-assigned this Sep 16, 2020
@alaurenzi
Copy link
Collaborator

I have merged all hal_refactor branches to master and updated the docker image. Using the master branch and invoking docker pull arturolaurenzi/xbot2:examples should work fine.

@torydebra
Copy link
Member Author

torydebra commented Sep 24, 2020

Yes, building is ok, but now I have same problem of #11 . I think we can close here

I would add docker pull arturolaurenzi/xbot2:examples in the readme (btw, it is this one that dowload a crazy amount of data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants