kermitt2 / grobid

A machine learning software for extracting information from scholarly documents
https://grobid.readthedocs.io
Apache License 2.0
3.59k stars 459 forks source link

FAILURE: gradle clean install or ./gradlew clean install #1147

Closed RLWOHIO closed 3 weeks ago

RLWOHIO commented 3 months ago

Hi,

I am unable to install GroBid with my local gradle (8.3 or 8.9) or the gradlew wrapper included in the grobid download. My system: HPC Linux cluster (4.18.0-553.8.1.el8_10.x86_64), JDK 20. Below are the errors. Please see details in the attached log files. I looked through the previous issues with regard to installation and did't get much help from the discussions therein. Thanks much for your help!

log.gradleWrapperIncluded.errors.txt log.gradle8.9.errors.txt

./gradlew clean install FAILURE: Build failed with an exception.

gradle clean install //locally installed gradle 8.3 or 8.9 FAILURE: Build failed with an exception.

Before creating a new issue, make sure you had a look at the official documentation. For specific questions, you can try the Mendable Q/A chat (NOTE: This is rather experimental, if not sure, make sure you double-check using the official documentation.)

kermitt2 commented 3 months ago

Hello @RLWOHIO !

I think gradle 7.2 is not compatible with JDK 20 - thus the error "Unsupported class file major version 64". To solve the issue, you can use JDK 17 for building the project.

(the Grobid gradle wrapper uses the version of gradle indicated under gradle/wrapper/gradle-wrapper.properties, the version of Jacoco currently used in build.gradle is also not compatible with gradle >=8, so we will need some updates in the future to support Gradle 8).

RLWOHIO commented 3 months ago

Thanks so much @kermitt2 ! The included gradle 7.2 does indeed require JDK 17. The build was successful! I have been warned by my admin though that JDK 17 is outdated and may pose security risks. Hopefully GroBid will update to newer versions of gradle and JDK soon.