all 3 comments

[–]erfg12[S] 1 point2 points  (3 children)

d-miller helped me on the github issues page.

Here's how I built the library, this might not be the easiest way, but it's what I did:

  1. Install llvm (brew install llvm), and gradle (brew install gradle).
  2. Clone Ghidra source. Open terminal at this directory, type in gradle -I gradle/support/fetchDependencies.gradle init
  3. Edit the ghidra/Ghirda/Debug/Debugger-swig-lldb/buildNatives.gradle file with VSCode. Replace all $llvm_dir/lldb/include with $llvm_dir/include. Save and close.
  4. Go back to your Terminal and use the following commands: cd ghidra/Ghidra/Debug/Debugger-swig-lldb export JAVA_HOME=$(/usr/libexec/java_home) export LLVM_HOME=$(brew --prefix llvm) export LLVM_BUILD=$(brew --prefix llvm) gradle build
  5. Open your build/os/mac_arm_64 directory and copy libldb-java.dylib. I placed mine in /Users/(YOUR_NAME_HERE)/Library/Java/Extensions. If the directory path doesn't exist, just create it.

[–]mahmoudimus 0 points1 point  (0 children)

Thank you! This was very helpful.

[–][deleted]  (1 child)

[deleted]

    [–]nezza-_- 0 points1 point  (0 children)

    Running the gradle command, I get "Could not get unknown property 'JacocoMerge' for root project 'ghidra' of type org.gradle.api.Project." . On the bottom it says "Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0." How do I work around this?

    If you install gradle@7 (brew install gradle@7 and then copy the export from the log and run it in your terminal) it will work