Skip to content

failure to build for ros2 #81

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

Closed
xlla opened this issue Apr 28, 2022 · 5 comments
Closed

failure to build for ros2 #81

xlla opened this issue Apr 28, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@xlla
Copy link

xlla commented Apr 28, 2022

I was encounter many errors while use ros2 colcon build.

iceoryx_hoofs , iceoryx_posh and iceoryx_binding_c was built by colcon.

branch: galactic
os: mac osx 10.13.6

error 1

/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/include/rmw_iceoryx_cpp/iceoryx_name_conversion.hpp:23:10: fatal error: 'iceoryx_utils/cxx/string.hpp' file not found
#include "iceoryx_utils/cxx/string.hpp"

change to iceoryx_hoofs/cxx/string.hpp to fix it.

error 2

[ 17%] Linking CXX shared library librmw_iceoryx_serialization.dylib
Undefined symbols for architecture x86_64:
  "rmw_iceoryx_cpp::get_type_support(rosidl_message_type_support_t const*)", referenced from:
      rmw_iceoryx_cpp::deserialize(char const*, rosidl_message_type_support_t const*, void*) in iceoryx_deserialize.cpp.o
      rmw_iceoryx_cpp::serialize(void const*, rosidl_message_type_support_t const*, std::__1::vector >&) in iceoryx_serialize.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [CMakeFiles/rmw_iceoryx_serialization.dir/build.make:117: librmw_iceoryx_serialization.dylib] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/rmw_iceoryx_serialization.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

manual add iceoryx_type_info_introspection.cpp.o to link.txt fix it.

error 3

/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/internal/iceoryx_generate_gid.cpp:28:21: error: use of undeclared identifier 'typed_uid'; did you mean 'typeid'?
  iox::UniquePortId typed_uid = publisher->getUid();
                    ^~~~~~~~~
                    typeid
/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/internal/iceoryx_generate_gid.cpp:28:20: error: expected ';' after expression
  iox::UniquePortId typed_uid = publisher->getUid();
                   ^
                   ;
/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/internal/iceoryx_generate_gid.cpp:28:8: error: no member named 'UniquePortId' in namespace 'iox'
  iox::UniquePortId typed_uid = publisher->getUid();
  ~~~~~^
/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/internal/iceoryx_generate_gid.cpp:28:30: error: expected '(' after 'typeid'
  iox::UniquePortId typed_uid = publisher->getUid();

change to iox::popo::UniquePortId fix it.

error 4

/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/rmw_publisher.cpp:134:26: error: destructor type 'iox::popo::UntypedPublisherImpl >' in object destruction expression does not match the type 'iox::popo::UntypedPublisher' of the object being destroyed
        iceoryx_sender->~UntypedPublisherImpl(), iox::popo::UntypedPublisher)
                         ^
/Users/xlla/ros2_foxy/install/iceoryx_posh/include/iceoryx/v2.90.0/iceoryx_posh/internal/popo/untyped_publisher_impl.hpp:31:7: note: type 'iox::popo::UntypedPublisherImpl >' is declared here
class UntypedPublisherImpl : public BasePublisherType
      ^
/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/rmw_publisher.cpp:201:46: error: destructor type 'iox::popo::UntypedPublisherImpl >' in object destruction expression does not match the type 'iox::popo::UntypedPublisher' of the object being destroyed
        iceoryx_publisher->iceoryx_sender_->~UntypedPublisherImpl(),
                                             ^

I am not know how to fix it.

@xlla
Copy link
Author

xlla commented Apr 28, 2022

I have fixed error 4 and succession error 5

/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/rmw_subscription.cpp:133:28: error: destructor type 'iox::popo::UntypedSubscriberImpl >' in object destruction expression does not match the type 'iox::popo::UntypedSubscriber' of the object being destroyed
        iceoryx_receiver->~UntypedSubscriberImpl(), iox::popo::UntypedSubscriber)
                           ^
/Users/xlla/ros2_foxy/install/iceoryx_posh/include/iceoryx/v2.90.0/iceoryx_posh/internal/popo/untyped_subscriber_impl.hpp:38:7: note: type 'iox::popo::UntypedSubscriberImpl >' is declared here
class UntypedSubscriberImpl : public BaseSubscriberType

here is the fix

@mossmaurice
Copy link
Collaborator

mossmaurice commented Apr 29, 2022

Hi @xlla

Thanks for opening this issue and for providing the fixes!

The fixes you provided are already incorporated on the master branch which works with ROS 2 Rolling. The galactic branch was not updated to iceoryx Blueberry (v2.x) as ROS 2 Galactic uses iceoryx Almond (v1.x).

A working solution would be to update to ROS 2 Humble and use it together with rwm_iceoryx's master branch. Please make sure to check out the correct branch:

git clone --branch master https://github.com/ros2/rmw_iceoryx.git

Alternatively, if you want to use ROS 2 Galactic:

git clone --branch galactic https://github.com/ros2/rmw_iceoryx.git

New features and a release for Humble like request/response aka ROS 2 services are on their way (#76).

For me to better understand your needs, are you interested in using the latest iceoryx with ROS 2 Galactic?

@mossmaurice mossmaurice added the wontfix This will not be worked on label Apr 29, 2022
@xlla xlla mentioned this issue May 2, 2022
@xlla
Copy link
Author

xlla commented May 2, 2022

hi @mossmaurice , I am glad to know these errors was fixed in master branch.

I want to experiment those edge techs, so I am not stick to ROS 2 Galactic.

after upgrade to ROS 2 Humble and switch to rmw_iceoryx's master branch, the error 2, 4 & 5 are still remained.

gmake: *** [Makefile:146: all] Error 2
--- stderr: rmw_iceoryx_cpp                             
Undefined symbols for architecture x86_64:
  "rmw_iceoryx_cpp::get_type_support(rosidl_message_type_support_t const*)", referenced from:
      rmw_iceoryx_cpp::deserialize(char const*, rosidl_message_type_support_t const*, void*) in iceoryx_deserialize.cpp.o
      rmw_iceoryx_cpp::serialize(void const*, rosidl_message_type_support_t const*, std::__1::vector >&) in iceoryx_serialize.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [CMakeFiles/rmw_iceoryx_serialization.dir/build.make:117: librmw_iceoryx_serialization.dylib] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/rmw_iceoryx_serialization.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< rmw_iceoryx_cpp [5.28s, exited with code 2]


[ 83%] Building CXX object CMakeFiles/rmw_iceoryx_cpp.dir/src/rmw_service_server_is_available.cpp.o
/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/rmw_publisher.cpp:134:26: error: destructor type 'iox::popo::UntypedPublisherImpl >' in object destruction expression does not match the type 'iox::popo::UntypedPublisher' of the object being destroyed
[ 85%] Building CXX object CMakeFiles/rmw_iceoryx_cpp.dir/src/rmw_subscription.cpp.o
        iceoryx_sender->~UntypedPublisherImpl(), iox::popo::UntypedPublisher)
                         ^
/opt/ros2/include/iceoryx/v2.90.0/iceoryx_posh/internal/popo/untyped_publisher_impl.hpp:31:7: note: type 'iox::popo::UntypedPublisherImpl >' is declared here
class UntypedPublisherImpl : public BasePublisherType
      ^
/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/rmw_publisher.cpp:201:46: error: destructor type 'iox::popo::UntypedPublisherImpl >' in object destruction expression does not match the type 'iox::popo::UntypedPublisher' of the object being destroyed
        iceoryx_publisher->iceoryx_sender_->~UntypedPublisherImpl(),
                                             ^
/opt/ros2/include/iceoryx/v2.90.0/iceoryx_posh/internal/popo/untyped_publisher_impl.hpp:31:7: note: type 'iox::popo::UntypedPublisherImpl >' is declared here
class UntypedPublisherImpl : public BasePublisherType
      ^
[ 88%] Building CXX object CMakeFiles/rmw_iceoryx_cpp.dir/src/rmw_take.cpp.o
2 errors generated.                                     

gmake[2]: *** [CMakeFiles/rmw_iceoryx_cpp.dir/build.make:328: CMakeFiles/rmw_iceoryx_cpp.dir/src/rmw_publisher.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/rmw_subscription.cpp:133:28: error: destructor type 'iox::popo::UntypedSubscriberImpl >' in object destruction expression does not match the type 'iox::popo::UntypedSubscriber' of the object being destroyed
        iceoryx_receiver->~UntypedSubscriberImpl(), iox::popo::UntypedSubscriber)
                           ^
/opt/ros2/include/iceoryx/v2.90.0/iceoryx_posh/internal/popo/untyped_subscriber_impl.hpp:38:7: note: type 'iox::popo::UntypedSubscriberImpl >' is declared here
class UntypedSubscriberImpl : public BaseSubscriberType
      ^
/Users/xlla/ros2_foxy/src/ros2/rmw_iceoryx/rmw_iceoryx_cpp/src/rmw_subscription.cpp:219:51: error: destructor type 'iox::popo::UntypedSubscriberImpl >' in object destruction expression does not match the type 'iox::popo::UntypedSubscriber' of the object being destroyed
        iceoryx_subscription->iceoryx_receiver_->~UntypedSubscriberImpl(),
                                                  ^
/opt/ros2/include/iceoryx/v2.90.0/iceoryx_posh/internal/popo/untyped_subscriber_impl.hpp:38:7: note: type 'iox::popo::UntypedSubscriberImpl >' is declared here
class UntypedSubscriberImpl : public BaseSubscriberType
      ^
2 errors generated.                                     
gmake[2]: *** [CMakeFiles/rmw_iceoryx_cpp.dir/build.make:440: CMakeFiles/rmw_iceoryx_cpp.dir/src/rmw_subscription.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:194: CMakeFiles/rmw_iceoryx_cpp.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
--- stderr: rmw_iceoryx_cpp                             

so I create another PR #82
after built, it works.

talker

$ RMW_IMPLEMENTATION=rmw_iceoryx_cpp ros2 run demo_nodes_py listener
Log level set to: [Warning]
[INFO] [1651478880.783316470] [listener]: I heard: [Hello World: 32]
[INFO] [1651478881.756193642] [listener]: I heard: [Hello World: 33]
[INFO] [1651478882.757147905] [listener]: I heard: [Hello World: 34]

listener

$ RMW_IMPLEMENTATION=rmw_iceoryx_cpp ros2 run demo_nodes_cpp talker
Log level set to: [Warning]
2022-05-02 16:07:28.748 [Warning]: Requested queue capacity 1000 exceeds the maximum possible one for this subscriber, limiting from 1000 to 256
[INFO] [1651478849.756925932] [talker]: Publishing: 'Hello World: 1'
...
[INFO] [1651478881.755188929] [talker]: Publishing: 'Hello World: 33'
[INFO] [1651478882.756071049] [talker]: Publishing: 'Hello World: 34'
[INFO] [1651478883.753664402] [talker]: Publishing: 'Hello World: 35'
[INFO] [1651478884.757749001] [talker]: Publishing: 'Hello World: 36'

@mossmaurice mossmaurice added bug Something isn't working and removed wontfix This will not be worked on labels Feb 10, 2023
@mossmaurice
Copy link
Collaborator

Error 2, 4 and 5 still exist on the humble branch. This patch should fix the issues.

mossmaurice pushed a commit to ApexAI/rmw_iceoryx that referenced this issue Mar 14, 2023
mossmaurice pushed a commit to ApexAI/rmw_iceoryx that referenced this issue Mar 14, 2023
mossmaurice pushed a commit that referenced this issue Mar 24, 2023
* Fix dependency of name conversion lib (#81)

Signed-off-by: Simon Hoinkis <[email protected]>

* Call correct destructor (#81)

Signed-off-by: Simon Hoinkis <[email protected]>

---------

Signed-off-by: Simon Hoinkis <[email protected]>
@mossmaurice mossmaurice self-assigned this Mar 24, 2023
@mossmaurice
Copy link
Collaborator

Fixed with #90. Feel free to re-open if these issues persist.

mossmaurice pushed a commit to ApexAI/rmw_iceoryx that referenced this issue Sep 16, 2023
mossmaurice pushed a commit to ApexAI/rmw_iceoryx that referenced this issue Sep 16, 2023
mossmaurice pushed a commit that referenced this issue Sep 20, 2023
* Use new Blueberry v2.0.3 feature request-response and its discovery (#84)

Signed-off-by: Simon Hoinkis <[email protected]>

* Remove cppcheck from linter job and use Ubuntu 22.04

Signed-off-by: Simon Hoinkis <[email protected]>

* Include 'iceoryx_hoofs' legacy header and use 'iox::into' for string
conversion

Signed-off-by: Simon Hoinkis <[email protected]>

* Fix dependency of name conversion lib (#81)

Signed-off-by: Simon Hoinkis <[email protected]>

* Call correct destructor (#81)

Signed-off-by: Simon Hoinkis <[email protected]>

* Use 'rcutils_get_executable_name' to get the name of the process (#94)

Signed-off-by: Simon Hoinkis <[email protected]>

* Set C++ standard in accordance with iceoryx (#93)

Signed-off-by: Simon Hoinkis <[email protected]>

* Address review findings (#84)

Signed-off-by: Simon Hoinkis <[email protected]>

---------

Signed-off-by: Simon Hoinkis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants