microxrcedds_agent.so fails to link in cross environment

Offen
#258 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
42/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
cpp
Bereich
build-system

Rechercherichtung

Beginne mit den Docker-basierten Cross-Kompilierungsanweisungen und dem Build-Befehl, der libmicroxrcedds_agent.so erzeugt. Untersuche, warum /opt/ros/humble/lib/libfastrtps.so.2.6.8 in den Linker-Eingaben statt der Bibliothek aus dem sysroot erscheint, und reproduziere anschließend den Build für die gemeldete Zielarchitektur. Die Aufgabe ist erledigt, wenn der Agent erfolgreich ausschließlich mit Bibliotheken aus dem sysroot gelinkt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
C++
Sterne
201
Forks
111
Ø Merge
1 T. 6 Std.
Gemergte PRs (30 T.)
10

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus micro-ROS/micro-ROS-Agent

Alle Issues in micro-ROS/micro-ROS-Agent

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.