micro-ROS / micro-ROS/micro-ROS-Agent
microxrcedds_agent.so fails to link in cross environment
Personne n'a encore pris cette issue.
- Langage dominant
- C++
- Étoiles
- 201
- Forks
- 111
- Merge moyen
- 1 j 6 h
- PR mergées (30 j)
- 10
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:
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par les instructions de compilation croisée dans Docker et la commande de compilation qui produit libmicroxrcedds_agent.so. Examinez pourquoi /opt/ros/humble/lib/libfastrtps.so.2.6.8 apparaît dans les entrées de l'éditeur de liens au lieu de la bibliothèque du sysroot, puis reproduisez la compilation pour l'architecture cible indiquée. La tâche est terminée lorsque l'agent se lie correctement en utilisant uniquement des bibliothèques du sysroot.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- cpp
- Domaine
- build-system
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100