Skip to content

porting this RA6T2 micro-ros library to RX26T #257

Open

Description

@dianyundou

Issue template

  • Hardware description:
  • RTOS:
  • Installation type:
  • Version or commit hash:

Steps to reproduce the issue

I did following changes in library_generation.sh
1、change arm-none-eabi-gcc to rx-elf-gcc
in libmicroros.mk
1、change
X_CC := arm-none-eabi-gcc
X_CXX := arm-none-eabi-g++
into
X_CC := rx-elf-gcc
X_CXX := rx-elf-g++

Expected behavior

generate a micro ros library

Actual behavior

build error
--- stderr: rcutils
/home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/libmicroros/micro_ros_src/src/rcutils/src/time_unix.c: In function ‘rcutils_system_time_now’:
/home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/libmicroros/micro_ros_src/src/rcutils/src/time_unix.c:65:7: error: implicit declaration of function ‘clock_gettime’ [-Wimplicit-function-declaration]
65 | if (clock_gettime(CLOCK_REALTIME, &timespec_now) < 0) {
| ^~~~~~~~~~~~~
gmake[5]: *** [CMakeFiles/rcutils.dir/build.make:446: CMakeFiles/rcutils.dir/src/time_unix.c.obj] Error 1
gmake[4]: *** [CMakeFiles/Makefile2:192: CMakeFiles/rcutils.dir/all] Error 2
gmake[3]: *** [Makefile:146: all] Error 2

Failed <<< rcutils [4.29s, exited with code 2]
make[2]: *** [libmicroros.mk:80: /home/feng/RoboticHandProject/MicroROS_RX26T2/micro_ros_renesas2estudio_component/library_generation/../libmicroros/micro_ros_src/install] Error 2
make[1]: [makefile:118: pre-build] Error 2 (ignored)
Finished <<< ament_cmake_export_definitions [0.52s]

Additional information

Activity

  1. 4ntn commented on Sep 30, 2025

    @4ntn
    Contributor

    In the Renesas component, the declaration and definition of this function is found in this file: https://github.com/micro-ROS/micro_ros_renesas2estudio_component/blob/e7c332281a1b556f921dc61fa326fd0bb9e40c47/extra_sources/microros_time.c#L21C5-L21C18
    In rcutils the function is used here. https://github.com/micro-ROS/rcutils/blob/8f322232bc71242e483d6bcbe8c1ba731ee8134e/src/time_unix.c#L66C7-L66C20

    For some reason, your compiler did not find the declaration before the use of the function. Anyway, it is just a warning that is halting the build process due to (probably) a -Werror argument. You can try disabling treating warnings as errors and continue with the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions