Theo Buehler <t...@theobuehler.org> wrote:
> Please keep replies on list
> 
> On Wed, Jul 13, 2022 at 10:46:23PM -0500, Matthew Martin wrote:
> > On Thu, Jul 14, 2022 at 05:30:44AM +0200, Theo Buehler wrote:
> > > On Fri, Jul 08, 2022 at 09:54:40AM +0200, Omar Polo wrote:
> > > > Rafael Sadowski <raf...@sizeofvoid.org> wrote:
> > > > > Update gradle to 7.4.2. OK?
> > > > 
> > > > briefly tested, but seems to work fine.  ok for me, thanks!
> > > > 
> > > 
> > > In my latest bulk, security/ghidra failed to build. Is this related to
> > > this update?

yep.  when testing the gradle update i failed to notice that ghidra uses
gradle to build (typoed something in show-reverse-deps probably), sorry!

> > > FAILURE: Build failed with an exception.
> > > 
> > > * Where:
> > > Script 
> > > '/tmp/pobj/ghidra-9.1.2/ghidra-Ghidra_9.1.2_build/gradle/helpProject.gradle'
> > >  line: 47
> > > 
> > > * What went wrong:
> > > A problem occurred evaluating script.
> > > > Could not find method helpIndexCompile() for arguments 
> > > > [javax.help:javahelp:2.0.05] on object of type 
> > > > org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
> > 
> > I suspect you'll need something like
> > https://github.com/NationalSecurityAgency/ghidra/commit/3a0ae8ee39a08277c623dc954560e343c7efe3d9#diff-9d6939fff317ec2b32527c6739a880db1b3b78a2159b23e75dce26f17edbf682

correct, but not really that easy.  The gradle files in the version
we're packaging and the one from that commit diverged quite a bit.
Furthermore, since upstream closed the pr for the OpenBSD support[0]
it's not simple updating to a newer version.

[0]: https://github.com/NationalSecurityAgency/ghidra/pull/490

if it helps someone, here's where I'm stuck; i've backported most of the
changes to build with the updated gradle, but now fails because of:

FAILURE: Build failed with an exception.

* Where:
Build file
'/home/_pobj/ghidra-9.1.2/ghidra-Ghidra_9.1.2_build/build.gradle' line: 316

* What went wrong:
Failed to notify task execution graph listener.
> Could not get unknown property 'runtime' for configuration container
of type 
org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.
> Could not get unknown property 'runtime' for configuration container
of type 
org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.
...

and zero ideas on how to fix it.

Index: patches/patch-GPL_DMG_build_gradle
===================================================================
RCS file: patches/patch-GPL_DMG_build_gradle
diff -N patches/patch-GPL_DMG_build_gradle
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-GPL_DMG_build_gradle  14 Jul 2022 15:03:38 -0000
@@ -0,0 +1,39 @@
+backport (partial) of "GP-849: Gradle 7 support"
+https://github.com/NationalSecurityAgency/ghidra/commit/3a0ae8ee39a08277c623dc954560e343c7efe3d9#diff-9d6939fff317ec2b32527c6739a880db1b3b78a2159b23e75dce26f17edbf682
+
+Index: GPL/DMG/build.gradle
+--- GPL/DMG/build.gradle.orig
++++ GPL/DMG/build.gradle
+@@ -13,7 +13,7 @@ if (findProject(':Generic') != null) {
+       }
+ }
+ else {
+-      apply plugin: 'java'
++      apply plugin: 'java-library'
+ }
+ apply plugin: 'eclipse'
+ 
+@@ -36,12 +36,10 @@ sourceSets {
+       }
+ }
+ 
+-eclipse.classpath.plusConfigurations += [configurations.dmgCompile]
+-
+ dependencies {
+-      dmgCompile ':csframework@jar'
+-      dmgCompile ':hfsx@jar'
+-      dmgCompile ':hfsx_dmglib@jar'
++      dmgImplementation ':csframework@jar'
++      dmgImplementation ':hfsx@jar'
++      dmgImplementation ':hfsx_dmglib@jar'
+ }
+ 
+ 
/***************************************************************************************
+@@ -51,6 +49,6 @@ dependencies {
+  
***************************************************************************************/
+ 
+ jar {
+-      destinationDir = file("build/data/lib")
++      destinationDirectory = file("build/data/lib")
+       from sourceSets.dmg.output
+ }
Index: patches/patch-GPL_nativeBuildProperties_gradle
===================================================================
RCS file: 
/home/cvs/ports/security/ghidra/patches/patch-GPL_nativeBuildProperties_gradle,v
retrieving revision 1.4
diff -u -p -r1.4 patch-GPL_nativeBuildProperties_gradle
--- patches/patch-GPL_nativeBuildProperties_gradle      11 Mar 2022 19:53:24 
-0000      1.4
+++ patches/patch-GPL_nativeBuildProperties_gradle      14 Jul 2022 15:12:48 
-0000
@@ -19,8 +19,8 @@ Index: GPL/nativeBuildProperties.gradle
 +              // Force use of Clang
 +              clang(Clang) {
 +                      eachPlatform { tools ->
-+                              tools.cppCompiler.executable = "${CXX}"
-+                              tools.linker.executable = "${CXX}"
++                              tools.cppCompiler.executable = "c++"
++                              tools.linker.executable = "c++"
 +                              println "C++ compiler is 
[${tools.cppCompiler.executable}]"
 +                              println "Linker is [${tools.linker.executable}]"
 +                      }
Index: patches/patch-GhidraBuild_BuildFiles_JsonDoclet_build_gradle
===================================================================
RCS file: patches/patch-GhidraBuild_BuildFiles_JsonDoclet_build_gradle
diff -N patches/patch-GhidraBuild_BuildFiles_JsonDoclet_build_gradle
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-GhidraBuild_BuildFiles_JsonDoclet_build_gradle        14 Jul 
2022 15:25:11 -0000
@@ -0,0 +1,19 @@
+backport (partial) of "GP-849: Gradle 7 support"
+https://github.com/NationalSecurityAgency/ghidra/commit/3a0ae8ee39a08277c623dc954560e343c7efe3d9#diff-9d6939fff317ec2b32527c6739a880db1b3b78a2159b23e75dce26f17edbf682
+
+Index: GhidraBuild/BuildFiles/JsonDoclet/build.gradle
+--- GhidraBuild/BuildFiles/JsonDoclet/build.gradle.orig
++++ GhidraBuild/BuildFiles/JsonDoclet/build.gradle
+@@ -1,10 +1,10 @@
+ apply plugin: 'eclipse'
+ eclipse.project.name = '_JsonDoclet'
+ 
+-apply plugin: 'java'
++apply plugin: 'java-library'
+ 
+ dependencies {
+-      compile('com.googlecode.json-simple:json-simple:1.1.1') {
++      api('com.googlecode.json-simple:json-simple:1.1.1') {
+               exclude group: 'junit', module: 'junit'
+       }
+ }
Index: 
patches/patch-GhidraBuild_EclipsePlugins_GhidraDev_GhidraDevPlugin_build_gradle
===================================================================
RCS file: 
patches/patch-GhidraBuild_EclipsePlugins_GhidraDev_GhidraDevPlugin_build_gradle
diff -N 
patches/patch-GhidraBuild_EclipsePlugins_GhidraDev_GhidraDevPlugin_build_gradle
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 
patches/patch-GhidraBuild_EclipsePlugins_GhidraDev_GhidraDevPlugin_build_gradle 
    14 Jul 2022 15:19:49 -0000
@@ -0,0 +1,23 @@
+backport (partial) of "GP-849: Gradle 7 support"
+https://github.com/NationalSecurityAgency/ghidra/commit/3a0ae8ee39a08277c623dc954560e343c7efe3d9#diff-9d6939fff317ec2b32527c6739a880db1b3b78a2159b23e75dce26f17edbf682
+
+Index: GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/build.gradle
+--- GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/build.gradle.orig
++++ GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/build.gradle
+@@ -1,4 +1,4 @@
+-apply plugin: 'java'
++apply plugin: 'java-library'
+ 
+ //This project requires the eclpse PDE plugin. To create eclipse files for 
this project, run 
+ //    "gradle eclipse -PeclipsePDE" 
+@@ -33,8 +33,8 @@ sourceCompatibility = 1.8
+ targetCompatibility = 1.8
+ 
+ dependencies {
+-      compile project(':Utility')
+-      compile project(':LaunchSupport')
++      api project(':Utility')
++      api project(':LaunchSupport')
+ }
+ 
+ // We are currently building this with Eclipse, so prevent gradle from trying.
Index: patches/patch-GhidraDocs_build_gradle
===================================================================
RCS file: patches/patch-GhidraDocs_build_gradle
diff -N patches/patch-GhidraDocs_build_gradle
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-GhidraDocs_build_gradle       14 Jul 2022 15:21:37 -0000
@@ -0,0 +1,28 @@
+backport (partial) of "GP-849: Gradle 7 support"
+https://github.com/NationalSecurityAgency/ghidra/commit/3a0ae8ee39a08277c623dc954560e343c7efe3d9#diff-9d6939fff317ec2b32527c6739a880db1b3b78a2159b23e75dce26f17edbf682
+
+Index: GhidraDocs/build.gradle
+--- GhidraDocs/build.gradle.orig
++++ GhidraDocs/build.gradle
+@@ -1,4 +1,4 @@
+-apply plugin: 'java'
++apply plugin: 'java-library'
+ apply plugin: 'eclipse'
+ eclipse.project.name = '_GhidraDocs'
+ 
+@@ -11,7 +11,7 @@ sourceSets {
+ }
+ 
+ dependencies {
+-      compile project(':Base') 
++      api project(':Base') 
+ }
+ 
+ rootProject.assembleDistribution {
+@@ -22,4 +22,4 @@ rootProject.assembleDistribution {
+               into "docs"
+       
+       }
+-}
+\ No newline at end of file
++}
Index: patches/patch-Ghidra_Features_FileFormats_build_gradle
===================================================================
RCS file: patches/patch-Ghidra_Features_FileFormats_build_gradle
diff -N patches/patch-Ghidra_Features_FileFormats_build_gradle
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Ghidra_Features_FileFormats_build_gradle      14 Jul 2022 
15:09:07 -0000
@@ -0,0 +1,19 @@
+backport (partial) of "GP-849: Gradle 7 support"
+https://github.com/NationalSecurityAgency/ghidra/commit/3a0ae8ee39a08277c623dc954560e343c7efe3d9#diff-9d6939fff317ec2b32527c6739a880db1b3b78a2159b23e75dce26f17edbf682
+
+Index: Ghidra/Features/FileFormats/build.gradle
+--- Ghidra/Features/FileFormats/build.gradle.orig
++++ Ghidra/Features/FileFormats/build.gradle
+@@ -28,10 +28,10 @@ dependencies {
+       compile 'net.sf.sevenzipjbinding:sevenzipjbinding:9.20-2.00beta'
+       compile ':AXMLPrinter2'
+       
+-      runtime 
'net.sf.sevenzipjbinding:sevenzipjbinding-all-platforms:9.20-2.00beta'
++      runtimeOnly 
'net.sf.sevenzipjbinding:sevenzipjbinding-all-platforms:9.20-2.00beta'
+       
+       helpPath project(path: ":Base", configuration: 'helpPath')
+ 
+       // include code from src/test/slow in Base
+-      testCompile project(path: ':Base', configuration: 
'integrationTestArtifacts')   
++      testImplementation project(path: ':Base', configuration: 
'integrationTestArtifacts')    
+ }
Index: patches/patch-Ghidra_Framework_SoftwareModeling_build_gradle
===================================================================
RCS file: 
/home/cvs/ports/security/ghidra/patches/patch-Ghidra_Framework_SoftwareModeling_build_gradle,v
retrieving revision 1.3
diff -u -p -r1.3 patch-Ghidra_Framework_SoftwareModeling_build_gradle
--- patches/patch-Ghidra_Framework_SoftwareModeling_build_gradle        11 Mar 
2022 19:53:24 -0000      1.3
+++ patches/patch-Ghidra_Framework_SoftwareModeling_build_gradle        14 Jul 
2022 15:28:07 -0000
@@ -8,9 +8,23 @@ Execution failed for task ':SoftwareMode
 > Failed to run Gradle ANTLR Worker
    > org/stringtemplate/v4/STGroup
 
+> Could not find method runtime() for arguments [msv:relaxngDatatype:20050913]
+  on object of type
+  org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
+
+
 Index: Ghidra/Framework/SoftwareModeling/build.gradle
 --- Ghidra/Framework/SoftwareModeling/build.gradle.orig
 +++ Ghidra/Framework/SoftwareModeling/build.gradle
+@@ -22,7 +22,7 @@ dependencies {
+       compile "msv:xsdlib:20050913"
+       compile "org.antlr:antlr-runtime:3.5.2"
+       
+-      runtime "msv:relaxngDatatype:20050913"
++      runtimeOnly "msv:relaxngDatatype:20050913"
+       compile "msv:isorelax:20050913" 
+       
+       testCompile "org.jmockit:jmockit:1.44"  
 @@ -30,6 +30,8 @@ dependencies {
        // Must specify the specific antlr implementation to use or it will 
default to trying to find
        // version 2.7.7 (which we don't have)
Index: patches/patch-gradle_helpProject_gradle
===================================================================
RCS file: patches/patch-gradle_helpProject_gradle
diff -N patches/patch-gradle_helpProject_gradle
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gradle_helpProject_gradle     14 Jul 2022 15:03:36 -0000
@@ -0,0 +1,17 @@
+backport (partial) of "GP-849: Gradle 7 support"
+https://github.com/NationalSecurityAgency/ghidra/commit/3a0ae8ee39a08277c623dc954560e343c7efe3d9#diff-9d6939fff317ec2b32527c6739a880db1b3b78a2159b23e75dce26f17edbf682
+
+Index: gradle/helpProject.gradle
+--- gradle/helpProject.gradle.orig
++++ gradle/helpProject.gradle
+@@ -44,8 +44,8 @@ sourceSets {
+ }
+ 
+ dependencies {
+-      helpIndexCompile "javax.help:javahelp:2.0.05"
+-      helpIndexCompile project(path: ':Help', configuration: 'archives')
++      helpIndexImplementation "javax.help:javahelp:2.0.05"
++      helpIndexImplementation project(':Help')
+ }
+ 
+ // Task for calling the java help indexer, which creates a searchable index 
of the 

Reply via email to