micro-ROS / micro_ros_arduino

micro-ROS library for Arduino
Apache License 2.0
436 stars 111 forks source link

Building the precompiled library with docker fails on ARM cores #1583

Open marklee56826 opened 9 months ago

marklee56826 commented 9 months ago

Hi, I need your help. I wanted to use docker to recompile the source code:

  1. docker pull microros/micro_ros_static_library_builder: iron (or humble)
  2. docker run -it --rm -v $(pwd):/project --env MICROROS_LIBRARY_FOLDER=extras microros/micro_ros_static_library_builder: iron (or humble)

My system: board ESP32-DevKit, agent machine: Intel NUC i5, Pi4, Ubuntu 22.04, ROS humble.

Problems: I could build the library on intel core, but always failed on ARM cores such as Pi 4.

Output with Pi 4: … /uros_ws/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc: 1: ELF: not found /uros_ws/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc: 1: Syntax error: Unterminated quoted string … Failed <<< microcdr [6.90s, exited with code 2] … /uros_ws/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-gcc: 1: ELF: not found /uros_ws/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-gcc: 2: Syntax error: "(" unexpected … CMake Error at CMakeLists.txt:3 (project): The CMAKE_CXX_COMPILER: /uros_ws/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-g++ is not a full path to an existing compiler tool. … Failed <<< rcutils [2.01s, exited with code 1] …

I did a lot of searches, without finding any solution.

hippo5329 commented 2 months ago

You may follow this wiki to install platformio on your pi4 and build firmware for esp32.