I have a weird problem. I am attempting to update...
# community-support
m
I have a weird problem. I am attempting to update gradle for building C++ gcc stuff on linux aarch64. I have played with both HEAD and 8.7.0 (because that is our production version). Both have the same problem. When I build the gradle bin.zip on the aarch64 machine, I get weird errors in normal configuration phase of gradle. This has zero to do with my changes. If I do the same 8.7.0 build on my intel linux machine and push it to the aarch64 machine, same weird configuration errors. However, configuration phase works just fine if I pull 8.7 from gradle.org repository. (Yes, I was cleaning out ~/.gradle/wrapper/dists when moving .zip file around.) What might be different in the gradle.org repository's build? Is there a specific java flavor that creates the build?
Also, both intel and aarch64 builds work fine on intel box.
openjdk 11.0.23 on intel openjdk 11.0.24 on aarch64
c
What is “push to aarch64”, that sounds atypical. Generally you’d check out the same repo on each machine, run ‘./gradlew’ which downloads/installs/executes Gradle.
m
"Push" is related to me making changes to gradle itself, not using it for building another project. I am struggling with a local build of gradle that is having weird problems only on the aarch64 linux. I tried to isolate the issue by building gradle on both intel and aarch64 platforms, then copying the bin.zip to the other machine. My builds of gradle on intel and aarch64 fail on execution only on aarch64. Both builds work fine on intel. Again, I did clean ~/.gradle/wrapper/dist to ensure replacement bin.zip used. Only the bin.zip that downloads from gradle.org works correctly. Hence my question about details of how it is built ... so that maybe I can duplicate and use locally.
I am testing the newly built copies of gradle against an existing project that is many, many years old. The failures are happening during the configuration phase.
Downloaded Oracle's jdk for java 11 as suggested in CONTRIBUTING.md. No change. The line that fails is:
Copy code
from components.java-platform
in a maven-publish publishing block. The error is
Copy code
Could not get unknown property 'java' for SoftwareComponent container of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.
The subproject executes (verified)
Copy code
apply plugin: 'java-platform'
within subproject {} block before the "from" statement above executes. Is my build somehow missing or reordered a constructor? Don't know.
Follow-up: decided that I was going to have to debug gradle and did not want to do that against an AWS server in Oregon. Created a docker image of ubuntu 20.04 on a local mac-mini with M1 chip (rosetta is not installed, and gradle says it sees aarch64). The gradle build in this linux environment worked the first time. The weird bug just disappeared. And now I can go back to worrying about C++ stuff in our code.