Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Loading libhalsim_guid.so on Linux AArch64 #7631

Open
dustinlieu opened this issue Jan 4, 2025 · 4 comments
Open

Error Loading libhalsim_guid.so on Linux AArch64 #7631

dustinlieu opened this issue Jan 4, 2025 · 4 comments
Labels
type: bug Something isn't working.

Comments

@dustinlieu
Copy link

I get the following error when trying to simulate a blank CPP project. It seems like the simulation is running, but the Sim GUI doesn't start.

HAL Extensions: Attempting to load: libhalsim_guid.so
HAL Extensions: Load failed: /home/person/robotics/1538-2025/build/install/frcUserProgram/linuxarm64/debug/lib/libhalsim_guid.so.debug: object file has no dynamic section
Trying modified name: libhalsim_guid.so.debug
HAL Extensions: Failed to load library: lib/home/person/robotics/1538-2025/build/install/frcUserProgram/linuxarm64/debug/lib/libhalsim_guid.so.debug.so: cannot open shared object file: No such file or directory

********** Robot program starting **********
Not loading CameraServerShared
NT: Listening on NT3 port 1735, NT4 port 5810

********** Robot program startup complete **********

Checking the library with readelf indeed shows that there is no dynamic section.

[person@fedora ~]$ readelf -d /home/person/robotics/1538-2025/build/install/frcUserProgram/linuxarm64/debug/lib/libh
alsim_guid.so.debug

There is no dynamic section in this file.

Hash of libhalsim_guid.so.debug

[person@fedora ~]$ sha256sum /home/person/robotics/1538-2025/build/install/frcUserProgram/linuxarm64/debug/lib/libhalsim_guid.so.debug
b1d923ca7101a742bd2b8a6b051f3869d4ee5c0c9821a3c644053e50294a5039  /home/person/robotics/1538-2025/build/install/frcUserProgram/linuxarm64/debug/lib/libhalsim_guid.so.debug

To Reproduce
Steps to reproduce the behavior:

  1. Create a new CPP project
  2. Simulate robot code with Sim GUI option

Expected behavior
The Sim GUI should open.

Desktop (please complete the following information):

  • OS: Linux
  • Project Information:
WPILib Information:
Project Version: 2025.1.1
VS Code Version: 1.96.2
WPILib Extension Version: 2025.1.1
C++ Extension Version: 1.23.2
Java Extension Version: 1.38.0
Java Debug Extension Version: 0.58.1
Java Dependencies Extension Version 0.24.1
Java Version: 17
Java Location: /home/person/wpilib/2025/jdk
Vendor Libraries:
    WPILib-New-Commands (1.0.0)
@dustinlieu dustinlieu added the type: bug Something isn't working. label Jan 4, 2025
@ThadHouse
Copy link
Member

Uh... That's very bizzare, and definitely not the library that should be being loaded.

Are you seeing this on a Raspberry Pi? Are you running this from VS Code? If you're running it from VS Code, can you send the terminal output from the terminal that pops up. I'm curious why its trying those libraries.

@ThadHouse
Copy link
Member

Ok, I found it.

https://github.com/wpilibsuite/GradleRIO/blob/main/src/main/java/edu/wpi/first/gradlerio/wpi/simulation/SimulationExtension.java#L213

This is a bug in gradlerio due to a difference in how we do libraries on arm platforms vs intel desktop platforms.

We need to be filtering out any .so.debug libraries found in there.

@dustinlieu dustinlieu changed the title Error Loading libhalsim_guid.so on Linux AArch6 Error Loading libhalsim_guid.so on Linux AArch64 Jan 4, 2025
@dustinlieu
Copy link
Author

Are you seeing this on a Raspberry Pi? Are you running this from VS Code? If you're running it from VS Code, can you send the terminal output from the terminal that pops up. I'm curious why its trying those libraries.

I'm running this on a Apple Silicon device running Linux.

Yes, I'm running it from VS Code, but the output I pasted in the original post is all I see. In the other tabs I just see "Build Successful" and the gdb output.

@ThadHouse
Copy link
Member

Yeah. I'm good, I see what the problem is. We'll look at getting it fixed. Nobody had ever really ran arm64 linux before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants