Prerequisites
Required Build Tools
Before building Ghidra, ensure you have the following tools installed:Java Development Kit (JDK)
Java Development Kit (JDK)
- Version: JDK 21 64-bit
- Download: Eclipse Temurin
- Verify installation:
java -version
Gradle Build System
Gradle Build System
- Version: Gradle 8.5 or later
- Download: Gradle releases
- Alternative: Use the provided Gradle wrapper if Internet connection is available
- Verify installation:
gradle --version
Python 3
Python 3
- Version: 3.9 to 3.13 with bundled pip
- Download: Python downloads
- Verify installation:
python3 --versionandpip3 --version
Platform-Specific Requirements
- Linux
- macOS
- Windows
Required native build tools:Install on Fedora/RHEL:
- GCC or Clang compiler
- make
Getting the Source Code
Option 1: Download ZIP Archive
Option 2: Clone the Repository
Build Process
Step 1: Download Dependencies
Download non-Maven Central dependencies. This creates adependencies directory in the repository root:
If you didn’t install Gradle system-wide, you can use the Gradle wrapper instead:
- Linux/macOS:
./gradlew -I gradle/support/fetchDependencies.gradle - Windows:
.\gradlew.bat -I gradle/support/fetchDependencies.gradle
Step 2: Prepare Development Environment
Download Maven Central dependencies and setup the repository for development. By default, these will be stored at$HOME/.gradle/:
Step 3: Build Ghidra
Create a compressed development build:build/dist/.
Alternative Build Options
Build Uncompressed Distribution
Build Ghidra tobuild/dist in an uncompressed form:
Build Native Components Only
Build native components for your current platform (requires native tool chains):Compile Sleigh Files
Manually compile sleigh files (Ghidra will also do this at runtime when necessary):Build Documentation
Generate Javadoc documentation:Build Python Packages
Build Python3 packages for PyGhidra and the Debugger:Common Gradle Commands
Clean Build Files
Clean up repository build files (may be necessary after agit pull to fix unexplainable compilation errors):
Skip Specific Tasks
You can skip certain Gradle tasks to speed up your build using the-x <task> argument:
Generate Eclipse Project Files
Generate nested Eclipse project files for import:Offline Development
To move the Ghidra repository to an offline network and continue development:The
-g flag specifies the Gradle user home directory. Overriding it to be inside the Ghidra repository ensures all Maven Central dependencies are moved with the rest of the repository.Testing Your Build
Run Unit Tests
Run Integration Tests
Run All Tests and Generate Report
Headless Testing (CI/Docker)
For running tests in headless mode on Linux, in a CI environment, or in Docker:Next Steps
After successfully building Ghidra:- See the Development Setup guide to configure your IDE
- Review the Contributing Guide to learn how to submit changes
- Check the Troubleshooting guide if you encounter issues
