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

ROS2 zenoh-pico-cyclonedds-cdr-message-log demo not building #9

Open
brandonesau opened this issue Jun 13, 2023 · 0 comments
Open

ROS2 zenoh-pico-cyclonedds-cdr-message-log demo not building #9

brandonesau opened this issue Jun 13, 2023 · 0 comments

Comments

@brandonesau
Copy link

I am having trouble building the ROS2 zenoh-pico-cyclonedds-cdr-message-log demo as per the README instructions.

There appears to be multiple errors I am running into.

Error 1

Running the build steps

git clone -b master https://github.com/eclipse-zenoh/zenoh-demos.git
cd zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log
mkdir -p build
cd build
cmake .. -DROS_DISTRO=humble
make

produces the following error

-- Configuring for Linux
-- Configuring done
CMake Error: INSTALL(EXPORT) given unknown export "CycloneDDS"
-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

which is solved by changing the CMakeLists.txt from

project(
  zenoh-ros2
  VERSION 1.0
  LANGUAGES C)

to

project(
  CycloneDDS
  VERSION 1.0
  LANGUAGES C)

Error 2

Making the change to CMakeLists.txt as specified above and re-running the build steps

mkdir -p build
cd build
cmake .. -DROS_DISTRO=humble
make

then produces the following error

[ 76%] Building C object CMakeFiles/z_pub_ros2.dir/z_pub_ros2.c.o
In file included from /tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/build/cyclonedds/src/core/ddsc/include/dds/dds.h:41,
                 from /tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/build/cyclonedds/src/core/cdr/include/dds/cdr/dds_cdrstream.h:16,
                 from /tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/z_pub_ros2.c:27:
/tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/build/cyclonedds/src/ddsrt/include/dds/ddsrt/log.h:384: warning: "DDS_LOG" redefined
  384 | #define DDS_LOG(cat, ...) \
      | 
<command-line>: note: this is the location of the previous definition
/tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/z_pub_ros2.c: In function ‘main’:
/tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/z_pub_ros2.c:124:9: warning: implicit declaration of function ‘dds_cdrstream_desc_from_topic_desc’ [-Wimplicit-function-declaration]
  124 |         dds_cdrstream_desc_from_topic_desc(&desc, &rcl_interfaces_msg_Log_desc);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/z_pub_ros2.c:127:20: error: too few arguments to function ‘dds_stream_write_sampleLE’
  127 |         bool ret = dds_stream_write_sampleLE((dds_ostreamLE_t *)&os, (void *)&msg, &desc);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/z_pub_ros2.c:27:
/tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/build/cyclonedds/src/core/cdr/include/dds/cdr/dds_cdrstream.h:178:17: note: declared here
  178 | DDS_EXPORT bool dds_stream_write_sampleLE (dds_ostreamLE_t * __restrict os, const struct dds_cdrstream_allocator * __restrict allocator, const void * __restrict data, const struct dds_cdrstream_desc * __restrict type);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/z_pub_ros2.c:128:9: error: too few arguments to function ‘dds_cdrstream_desc_fini’
  128 |         dds_cdrstream_desc_fini(&desc);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/z_pub_ros2.c:27:
/tmp/test-1/zenoh-demos/ROS2/zenoh-pico-cyclonedds-cdr-message-log/build/cyclonedds/src/core/cdr/include/dds/cdr/dds_cdrstream.h:235:17: note: declared here
  235 | DDS_EXPORT void dds_cdrstream_desc_fini (struct dds_cdrstream_desc *desc, const struct dds_cdrstream_allocator * __restrict allocator);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/z_pub_ros2.dir/build.make:128: CMakeFiles/z_pub_ros2.dir/z_pub_ros2.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:490: CMakeFiles/z_pub_ros2.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2

System info

  • Ubuntu 22.04
  • ROS2 Humble (installed via system package manager)
  • ros-humble-rmw-cyclonedds-cpp (installed via system package manager)
  • zenoh-bridge-dds (version 0.7.2-rc) (installed via system package manager)
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

1 participant