Dependency problems

 Task :extractIncludeProto FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':extractIncludeProto' (type 'ProtobufExtract').
  - Gradle detected a problem with the following location: '/home/kali/binexport/java/BinExport/lib/protobuf-java-3.13.0.jar'.
    Reason: Task ':extractIncludeProto' uses this output of task ':copyDependencies' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    Possible solutions:
      1. Declare task ':copyDependencies' as an input of ':extractIncludeProto'.
      2. Declare an explicit dependency on ':copyDependencies' from ':extractIncludeProto' using Task#dependsOn.
      3. Declare an explicit dependency on ':copyDependencies' from ':extractIncludeProto' using Task#mustRunAfter.
    For more information, please refer to in the Gradle documentation.


You should really get that caps-lock key fixed, it is quite annoying to get shouted at constantly.

Regarding your error, you have a copyDependencies task, that probably copies things around, especially protobuf-java-3.13.0.jar into /home/kali/binexport/java/BinExport/lib/ and you have a task extractIncludeProto that has this file as input without having a dependency on that copy task. That is what the error is telling you.

Without the proper dependency, you might use stale ouputs or even get failure as the input file is not there yet, hence the error by gradle.

Hot to fix is properly is hard to say without seeing code. but most often this happens if you hard-code pathes instead of properly wiring task outputs to task inputs in which case you get the necessary task dependencies automatically.

im trying to perform binary diffing using ghidra, like automating the process. its chapter 4 for gray hat hacking book. im stuck at this point. please try to look into it and thanks for cooperating.

Your screenshot instructs to use Gradle 6.5.
Your error shows that you use Gradle 8.2.1.
Obviously, that build has a serious flaw that with Gradle 8 now is recognized and makes the build fail. That’s why every Gradle build should have the 4 wrapper files that define with which Gradle version the build should be run and it’s compatible with.
So imho, the project you are coming has a big for not having the wrapper files. And additionally, its readme says you need Gradle 5.6 or later which obviously is not correct, but something you should complain to them.

tried what the exact version book said, still facing some issue. i’ve attached 2 screenshots, first ss contains full command which i saw in book, then i tried similar command with sudo in ss2, error again.

I only see one screenshot with two errors.
First means you messed up your fine permissions.
Second means you run Gradle with an incompatible Java version: Compatibility Matrix

here is another one

okay i understand. how do i fix the problem? i’ve latest java runtime installed in linux too

That’s exactly the problem. Read the link I gave you.

└─$ sudo git clone --single --depth=1 --branch=master \ ~/binexport && cd ~/binexport/java/BinExport && /opt/gradle-7.3/bin/gradle \-PGHIDRA_INSTALL_DIR=~/ghidra_10.3.2_PUBLIC 
Cloning into '/home/kali/binexport'...
remote: Enumerating objects: 3272, done.
remote: Counting objects: 100% (3272/3272), done.
remote: Compressing objects: 100% (2162/2162), done.
remote: Total 3272 (delta 1175), reused 2714 (delta 1054), pack-reused 0
Receiving objects: 100% (3272/3272), 38.35 MiB | 208.00 KiB/s, done.
Resolving deltas: 100% (1175/1175), done.
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

Welcome to Gradle 7.3!

Here are the highlights of this release:
 - Easily declare new test suites in Java projects
 - Support for Java 17
 - Support for Scala 3

For more details see

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Gradle could not start your build.
> Could not create service of type CrossBuildFileHashCache using BuildSessionServices.createCrossBuildFileHashCache().
   > Failed to create parent directory '/home/kali/binexport/java/BinExport/.gradle' when creating directory '/home/kali/binexport/java/BinExport/.gradle/7.3/fileHashes'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at


Here, I tried gradle 7.3 build comaptible with java 17. im using latest ghidra version 10.3.2. Could there be issue with ghidra version as well?

You clone with sudo for whatever reason, making all files and folders belong to root and then try to build without sudo which naturally fails. You probably shouldn’t use sudo at all

i tried gradle 7.5 version , then it worked. thanks for cooperating.

1 Like