micro-ROS / micro-ROS/micro-ROS-Agent
microxrcedds_agent.so fails to link in cross environment
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C++
- Estrellas
- 201
- Forks
- 111
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 10
Descripción
**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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con las instrucciones de compilación cruzada mediante Docker y el comando de compilación que produce libmicroxrcedds_agent.so. Investiga por qué /opt/ros/humble/lib/libfastrtps.so.2.6.8 aparece en las entradas del enlazador en lugar de la biblioteca del sysroot y, a continuación, reproduce la compilación para la arquitectura de destino indicada. La tarea está terminada cuando el agente se enlaza correctamente usando únicamente bibliotecas del sysroot.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- cpp
- Área
- build-system
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100