flathub / org.ghidra_sre.Ghidra

https://flathub.org/apps/details/org.ghidra_sre.Ghidra
7 stars 8 forks source link

Cannot use IN-VM gdb local, missing libutil.so #25

Closed leftmostcat closed 2 years ago

leftmostcat commented 2 years ago

I am opening a file in the debugger, adding a debugger target for the IN-VM GNU gdb local debugger. When I press the Connect button, I receive the following error message:

java.lang.UnsatisfiedLinkError: libutil.so: cannot open shared object file: No such file or directory

Build Date: 2022-May-23 1651 UTC Ghidra Version: 10.1.4 Java Home: /app/jdk JVM Version: Flathub 11.0.14 OS: Linux 5.17.7-300.fc36.x86_64 amd64

mpi3d commented 2 years ago

Can we have the full Ghidra logs?

leftmostcat commented 2 years ago

application.log Attached is a full run of ghidra including the failed gdb open.

mpi3d commented 2 years ago

Ok, thanks. We can fix the libutil.so error by adding the environment var LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu.

Then it complains about gdb. I was able to fix that by installing runtime/org.freedesktop.Sdk/x86_64/21.08 and adding --devel in the flapak run command.

@hadess Is it possible to use --devel for regular use?

mpi3d commented 2 years ago

@leftmostcat You can try the fix: flatpak install --user https://dl.flathub.org/build-repo/92465/org.ghidra_sre.Ghidra.flatpakref

hadess commented 2 years ago

Is your test application a win32 application? I don't know how well launching an x86_64 gdb would work against a win32 binary.

hadess commented 2 years ago

I didn't see the libutil.so problems when debugging an x86_64 binary, so please open a new issue if you still see the problem with the latest version of Ghidra.

leftmostcat commented 2 years ago

Sorry for the lack of response; the previous fix worked for me and I've just confirmed that the updated flatpak works as well, with a 32-bit binary on a 64-bit system. (It's enough to run the x86_64 gdb and connect to an already-running mingw i686 gdbserver.)

mpi3d commented 2 years ago

Working for me too.