microxrcedds_agent.so fails to link in cross environment
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- build-system
Research direction
Start with the dockerized cross-compilation instructions and the build command that produces libmicroxrcedds_agent.so. Inspect why /opt/ros/humble/lib/libfastrtps.so.2.6.8 appears in the linker inputs instead of the sysroot library, then reproduce the build for the reported target architecture. Done means the agent links successfully using only libraries from the sysroot.
Written by the indexing model from the issue text.
Description
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:
- Clone repo on this branch and follow the dockerized instructions: https://github.com/Ryanf55/x-ros/tree/micro-ros-agent
- Compile the micro ros agent as explained
- 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.
- Dominant language
- C++
- Stars
- 201
- Forks
- 111
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micro-ROS/micro-ROS-Agent
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
micro-ROS/micro-ROS-Agent#270 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
micro-ROS/micro-ROS-Agent#269 ·
-
Release to apt Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
micro-ROS/micro-ROS-Agent#267 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
micro-ROS/micro-ROS-Agent#266 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
micro-ROS/micro-ROS-Agent#265 · 1 comment ·
All issues in micro-ROS/micro-ROS-Agent
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·