micro-ROS / micro-ROS/micro-ROS-Agent

microxrcedds_agent.so fails to link in cross environment

Đang mở
#258 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
C++
Star
201
Fork
111
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
10

Mô tả

**Describe the bug**
I tried using a cross compile workflow for Micro ROS Agent and it has linker errors.

**To Reproduce**
Steps to reproduce the behaviour:
1. Clone repo on this branch and follow the dockerized instructions: https://github.com/Ryanf55/x-ros/tree/micro-ros-agent
2. Compile the micro ros agent as explained
3. Observe the following error:

```
# [ 2%] Linking CXX shared library libmicroxrcedds_agent.so
# /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: /opt/ros/humble/lib/libfastrtps.so.2.6.8: error adding symbols: file in wrong format
```

The linker is incorrectly trying to link to /opt/ros/humble/lib/libfastrtps.so.2.6.8. It should be linking to the shared library in the sysroot, not the host.

**Expected behaviour**
Successful compilation in a sysroot and linkage only to libraries in the sysroot.

**System information (please complete the following information):**
- OS: Host OS Ubuntu 22
- ROS 2 humble on host OS
- Target OS: Ubuntu 22

**Additional context**

I have ROS 2 humble installed on the host OS. MicroROS should compile in the sysroot and ignore all host libraries.
Because it does not ignore host libraries, it is finding libraries of the wrong architecture.

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 hướng dẫn biên dịch chéo trong Docker và lệnh build tạo ra libmicroxrcedds_agent.so. Kiểm tra lý do /opt/ros/humble/lib/libfastrtps.so.2.6.8 xuất hiện trong các đầu vào của linker thay vì thư viện trong sysroot, sau đó tái hiện build cho kiến trúc đích được báo cáo. Hoàn thành khi agent liên kết thành công chỉ bằng các thư viện từ sysroot.

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

Đánh giá

Công nghệ
cpp
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 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
42/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.