question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build failure for :Decompiler:ip

See original GitHub issue

Describe the bug Running “gradle buildGhidra” results in a build failure if the project has been built in Eclipse.

To Reproduce Steps to reproduce the behavior:

  1. Load the Ghidra repository into Eclipse and build it.
  2. Run “gradle buildGhidra” from the command line
  3. The build fails with a “No IP found for $HOME/git/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/xml.cc” error.

Expected behavior Build succeeds

Screenshots

(...)

> Task :DebugUtils:compileJava
Note: /home/philpem/git/ghidra/Ghidra/Features/DebugUtils/src/main/java/db/DbViewer.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :Decompiler:ip FAILED

FAILURE: Build failed with an exception.

* Where:
Script '/home/philpem/git/ghidra/gradle/support/ip.gradle' line: 125

* What went wrong:
Execution failed for task ':Decompiler:ip'.
> No IP found for /home/philpem/git/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/xml.cc in module: /home/philpem/git/ghidra/Ghidra/Features/Decompiler. Expression: (ip != null). Values: ip = null

* 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 https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.0/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 6m 1s
141 actionable tasks: 89 executed, 52 up-to-date

Environment (please complete the following information):

  • OS: Ubuntu 18.04.2 LTS
  • Java Version: 11.0.3
  • Ghidra Version: Current master (25894ff9ae6b670811ce4e3ed1aea973069a5e21)

Additional context Disabling the IP dependency in ghidra/gradle/support/ip.gradle allows the build to run to completion.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
hedgebergcommented, Oct 31, 2019

FYI, this bug can be worked around by changing the assert(ip != null) at like 125 in gradle\support\ip.gradle to nesting the following lines in an if statement. Modified code looks like:

tree.each { file ->
    String ip = getIp(p.projectDir, file)
    //assert ip != null : "No IP found for "+file.path+ " in module: "+p.projectDir
    if (ip != null) {
        String ipString = ip.replace(' ','_')
        assert allowedIP.contains(ipString) : "Found non-allowed IP: "+ip+" for file "+file.path+" in module: "+p.projectDir
        addToMap(map, ip, getRelativePath(p.projectDir, file))
    }
}

This appears to fix the build without causing any further errors, since the failure case just seemed to be when the getAllowedIP() function was hitting an empty directory.

0reactions
ryanmkurtzcommented, Jul 1, 2019

The intent is that Gradle is used to build the native binaries, including the decompiler. Our Gradle tasks (native or prepDev) will not produce these source files in a location that will fail the IP check. I suppose the best answer for now is try to prevent Eclipse CDT from automatically building the decompiler. In my setup, that did not happen. I am going to close this for now since there is not an action we are going to take, but if you get more insight into why Eclipse automatically built it, feel free to comment here again and we can revisit the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven build Compilation error : Failed to execute goal org ...
Using java 12, I am able to do clean package on my simple project via the command line. But when I try to...
Read more >
Snap-desktop build failure - development - STEP Forum
I'm trying to build snap-desktop on OS X 10.10.5, using maven 3.3.3 and java 1.8.0_05, I have the latest version of snap-desktop from...
Read more >
Navigating the Regulatory Landscape in China's US$25 ...
Unscrupulous companies and individuals would crack/decompile/rip a popular game from another developer and then submit it to distribution ...
Read more >
5 | How to solve maven compilation failure in Jenkins/Eclipse ...
How to solve maven compilation failure in Jenkins/Eclipse ?[INFO] BUILD FAILURE [INFO] ...
Read more >
Improve Gradle & Maven Build Reliability with Build Failure ...
Faulty build infrastructure and bad dependency configurations are two of the most common causes of unexpected build failures that halt ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found