micro-ROS / micro-ROS/micro_ros_setup

spdlog Cmake error when building firmware

Đang mở
#768 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Shell
Star
509
Fork
183
Merge trung bình
22 giờ 26 phút
Pull request đã merge (30 ngày)
7

Mô tả

## Issue template

- Hardware description: microblaze
- RTOS: FreeRTOS
- Installation type: micro_ros_setup
- Version or commit hash: humble

I am trying to compile a custom static library for the Microblaze processor using the command:
`ros2 run micro_ros_setup create_firmware_ws.sh generate_lib`

I am using the following cmake file:
```
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_CROSSCOMPILING 1)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(CMAKE_C_COMPILER mb-gcc)
set(CMAKE_CXX_COMPILER mb-g++)

set(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "")
set(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")

set(INCLUDE_PATH_FREERTOS "/home/niko/vitis_ws/microblaze_freeRTOS/microblaze_0/freertos10_xilinx_domain/bsp/microblaze_0/include")
set(FLAGS "-O2 -ffunction-sections -fdata-sections -fno-exceptions -nostdlib --param max-inline-insns-single=500 -DF_CPU=100000000L -I'${INCLUDE_PATH_FREERTOS}' -D'RCUTILS_LOG_MIN_SEVERITY=RCUTILS_LOG_MIN_SEVERITY_NONE' -D'PLATFORM_NAME_FREERTOS'" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_INIT "-std=c11 ${FLAGS} -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_INIT "-std=c++11 ${FLAGS} -fno-rtti -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='" CACHE STRING "" FORCE)
```

This is the .meta file:
```
{
"names": {
"tracetools": {
"cmake-args": [
"-DTRACETOOLS_DISABLED=ON",
"-DTRACETOOLS_STATUS_CHECKING_TOOL=OFF"
]
},
"rosidl_typesupport": {
"cmake-args": [
"-DROSIDL_TYPESUPPORT_SINGLE_TYPESUPPORT=ON"
]
},
"rcl": {
"cmake-args": [
"-DBUILD_TESTING=OFF",
"-DRCL_COMMAND_LINE_ENABLED=OFF",
"-DRCL_LOGGING_ENABLED=ON"
]
},
"rcutils": {
"cmake-args": [
"-DENABLE_TESTING=OFF",
"-DRCUTILS_NO_FILESYSTEM=ON",
"-DRCUTILS_NO_THREAD_SUPPORT=ON",
"-DRCUTILS_NO_64_ATOMIC=ON",
"-DRCUTILS_AVOID_DYNAMIC_ALLOCATION=ON"
]
},
"microxrcedds_client": {
"cmake-args": [
"-DUCLIENT_PIC=OFF",
"-DUCLIENT_PROFILE_UDP=OFF",
"-DUCLIENT_PROFILE_TCP=OFF",
"-DUCLIENT_PROFILE_DISCOVERY=OFF",
"-DUCLIENT_PROFILE_SERIAL=OFF",
"-UCLIENT_PROFILE_STREAM_FRAMING=ON",
"-DUCLIENT_PROFILE_CUSTOM_TRANSPORT=ON",
"-DUCLIENT_MAX_SESSION_CONNECTION_ATTEMPTS=10",
"-DUCLIENT_MIN_SESSION_CONNECTION_INTERVAL=1000000"
]
},
"rmw_microxrcedds": {
"cmake-args": [
"-DRMW_UXRCE_MAX_NODES=5",
"-DRMW_UXRCE_MAX_PUBLISHERS=5",
"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=5",
"-DRMW_UXRCE_MAX_SERVICES=1",
"-DRMW_UXRCE_MAX_CLIENTS=1",
"-DRMW_UXRCE_MAX_HISTORY=4",
"-DRMW_UXRCE_TRANSPORT=custom"
]
}
}
}
```

However, when executing the command to build the firmware, I get the following error for the spdlog:
```
ros2 run micro_ros_setup build_firmware.sh $(pwd)/my_custom_toolchain.cmake $(pwd)/my_custom_colcon.meta

CMake Error at cmake/get_default_rcl_logging_implementation.cmake:43 (find_package):
By not providing "Findrcl_logging_spdlog.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"rcl_logging_spdlog", but CMake did not find one.

Could not find a package configuration file provided by
"rcl_logging_spdlog" with any of the following names:

rcl_logging_spdlogConfig.cmake
rcl_logging_spdlog-config.cmake

Add the installation prefix of "rcl_logging_spdlog" to CMAKE_PREFIX_PATH or
set "rcl_logging_spdlog_DIR" to a directory containing one of the above
files. If "rcl_logging_spdlog" provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:27 (get_default_rcl_logging_implementation)
```

I already checked the installation of the spdlog library.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với cmake/get_default_rcl_logging_implementation.cmake và lời gọi build_firmware.sh, sau đó kiểm tra cách toolchain và các tệp .meta được cung cấp cấu hình việc tìm kiếm gói. Tái hiện quá trình build firmware và xác minh rằng rcl_logging_spdlog được tìm thấy và lệnh hoàn tất mà không gặp lỗi CMake đã báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cmake, shell
Lĩnh vực
build-system, embedded-iot
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.