micro-ROS / micro-ROS/micro_ros_platformio

Build failing for humble in vscode - clock_gettime missing

未关闭
#153 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
334
派生
111
PR 合并指标
30 天内没有已合并 PR

描述

Issue template

  • Hardware description: raspberry pi pico
  • RTOS: freertos
  • Installation type: platformio
  • Version or commit hash: humble
Steps to reproduce the issue

Hit build in vscode on platformio

platformio.ini

[platformio]
default_envs = pico

[env]
framework = arduino
lib_deps = 
	https://github.com/micro-ROS/micro_ros_platformio
        https://github.com/end2endzone/AnyRtttl
	sparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@^1.2.12
	adafruit/Adafruit NeoPixel@^1.12.3

lib_archive = false
board_microros_distro = humble
board_microros_transport = serial

; Enable Sensor Fusion on the IMU
build_flags = 
	-DICM_20948_USE_DMP

[env:pico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
board_build.core = earlephilhower
board_build.mcu = rp2040
board_build.f_cpu = 133000000L

upload_protocol = cmsis-dap
debug_tool = cmsis-dap
debug_speed = 5000
upload_speed = 5000
monitor_speed = 115200
build_type = debug

; Examples 1: disable initial breakpoint
debug_init_break =
Expected behavior

Builds successfully. This same project worked a couple months ago before re-cloning it.

Actual behavior
Processing pico (platform: https://github.com/maxgerhardt/platform-raspberrypi.git; board: pico; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/raspberrypi/pico.html
PLATFORM: Raspberry Pi RP2040 (1.14.0+sha.2a8c40e) > Raspberry Pi Pico
HARDWARE: RP2040 133MHz, 256KB RAM, 2MB Flash
DEBUG: Current (cmsis-dap) External (blackmagic, cmsis-dap, jlink, pico-debug, picoprobe, raspberrypi-swd)
PACKAGES: 
 - framework-arduinopico @ 1.40003.0+sha.6acf03e 
 - tool-picotool-rp2040-earlephilhower @ 5.140200.240926 (14.2.0) 
 - toolchain-rp2040-earlephilhower @ 5.140200.240926 (14.2.0)
Flash size: 2.00MB
Sketch size: 2.00MB
Filesystem size: 0.00MB
Maximium Sketch size: 2093056 EEPROM start: 0x101ff000 Filesystem start: 0x101ff000 Filesystem end: 0x101ff000
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Installing importlib-resources with pip at PlatformIO environment
/home/matt/.platformio/penv/bin/python -m pip install importlib-resources
Requirement already satisfied: importlib-resources in /home/matt/.platformio/penv/lib/python3.10/site-packages (6.4.5)
Installing pyyaml with pip at PlatformIO environment
/home/matt/.platformio/penv/bin/python -m pip install pyyaml
Requirement already satisfied: pyyaml in /home/matt/.platformio/penv/lib/python3.10/site-packages (6.0.2)
Installing markupsafe==2.0.1 with pip at PlatformIO environment
/home/matt/.platformio/penv/bin/python -m pip install markupsafe==2.0.1
Requirement already satisfied: markupsafe==2.0.1 in /home/matt/.platformio/penv/lib/python3.10/site-packages (2.0.1)
Configuring pico with transport serial
Downloading micro-ROS dev dependencies
         - Downloaded ament_cmake
         - Downloaded ament_lint
         - Downloaded ament_package
         - Downloaded googletest
         - Downloaded ament_cmake_ros
         - Downloaded ament_index
Building micro-ROS dev dependencies
Downloading micro-ROS library
         - Downloaded microcdr
         - Downloaded microxrcedds_client
         - Downloaded rcl_lifecycle
         - Downloaded rcl
         - Downloaded rcl_yaml_param_parser (ignored)
         - Downloaded rcl_action
         - Downloaded rclc_examples (ignored)
         - Downloaded rclc
         - Downloaded rclc_lifecycle
         - Downloaded rclc_parameter
         - Downloaded micro_ros_utilities
         - Downloaded rcutils
         - Downloaded micro_ros_msgs
         - Downloaded rmw_microxrcedds
         - Downloaded rosidl_typesupport_cpp (ignored)
         - Downloaded rosidl_typesupport_c
         - Downloaded rosidl_typesupport_microxrcedds_cpp (ignored)
         - Downloaded rosidl_typesupport_microxrcedds_cpp_tests
         - Downloaded rosidl_typesupport_microxrcedds_c_tests
         - Downloaded rosidl_typesupport_microxrcedds_test_msg
         - Downloaded rosidl_typesupport_microxrcedds_c
         - Downloaded rosidl_runtime_cpp (ignored)
         - Downloaded rosidl_runtime_c
         - Downloaded rosidl_generator_c
         - Downloaded rosidl_typesupport_introspection_tests
         - Downloaded rosidl_typesupport_introspection_cpp (ignored)
         - Downloaded rosidl_typesupport_interface
         - Downloaded rosidl_parser
         - Downloaded rosidl_cmake
         - Downloaded rosidl_cli
         - Downloaded rosidl_adapter
         - Downloaded rosidl_typesupport_introspection_c
         - Downloaded rosidl_generator_cpp (ignored)
         - Downloaded rmw_implementation_cmake
         - Downloaded rmw
         - Downloaded rosgraph_msgs
         - Downloaded test_msgs
         - Downloaded lifecycle_msgs
         - Downloaded composition_interfaces
         - Downloaded builtin_interfaces
         - Downloaded rcl_interfaces
         - Downloaded action_msgs
         - Downloaded statistics_msgs
         - Downloaded rosidl_default_generators
         - Downloaded rosidl_default_runtime
         - Downloaded unique_identifier_msgs
         - Downloaded geometry_msgs
         - Downloaded stereo_msgs
         - Downloaded sensor_msgs_py
         - Downloaded visualization_msgs
         - Downloaded common_interfaces
         - Downloaded shape_msgs
         - Downloaded std_srvs
         - Downloaded nav_msgs
         - Downloaded sensor_msgs
         - Downloaded actionlib_msgs
         - Downloaded diagnostic_msgs
         - Downloaded std_msgs
         - Downloaded trajectory_msgs
         - Downloaded test_interface_files
         - Downloaded test_rmw_implementation
         - Downloaded rmw_implementation
         - Downloaded rcl_logging_noop
         - Downloaded rcl_logging_spdlog (ignored)
         - Downloaded rcl_logging_interface
         - Downloaded test_tracetools
         - Downloaded ros2trace
         - Downloaded tracetools_launch
         - Downloaded test_tracetools_launch
         - Downloaded tracetools_trace
         - Downloaded tracetools_read
         - Downloaded tracetools
         - Downloaded tracetools_test
         - Extra packages folder not found, skipping...
Building micro-ROS library
Build mcu micro-ROS environment failed: 
--- stderr: microxrcedds_client
/home/matt/src/deepdrive_micro/.pio/libdeps/pico/micro_ros_platformio/build/mcu/src/Micro-XRCE-DDS-Client/src/c/util/time.c: In function 'uxr_nanos':
/home/matt/src/deepdrive_micro/.pio/libdeps/pico/micro_ros_platformio/build/mcu/src/Micro-XRCE-DDS-Client/src/c/util/time.c:71:5: error: implicit declaration of function 'clock_gettime' [-Wimplicit-function-declaration]
   71 |     clock_gettime(CLOCK_REALTIME, &ts);
      |     ^~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/microxrcedds_client.dir/build.make:272: CMakeFiles/microxrcedds_client.dir/src/c/util/time.c.obj] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/microxrcedds_client.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
---
Failed   <<< microxrcedds_client [0.27s, exited with code 2]
Error calling StartServiceByName for org.freedesktop.Notifications: Process org.freedesktop.Notifications exited with status 1

========================================================= [FAILED] Took 35.89 seconds =========================================================

Additional information

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用 platformio.ini 配置重现该失败,并检查 .pio/libdeps/pico/micro_ros_platformio/build/mcu/src/Micro-XRCE-DDS-Client/src/c/util/time.c 的第 71 行。追踪 microxrcedds_client 的构建输入和工具链假设;当 humble pico 环境能够在没有 clock_gettime 错误的情况下成功构建时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
c, python, raspberry-pi
领域
build-system, embedded-iot
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。