Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impossible to build on java 11.0.9 ? #435

Closed
olof29 opened this issue Nov 12, 2020 · 13 comments
Closed

impossible to build on java 11.0.9 ? #435

olof29 opened this issue Nov 12, 2020 · 13 comments

Comments

@olof29
Copy link

olof29 commented Nov 12, 2020

on master and on development branches, when i want to build with
./gradlew build
i have this :

`FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine java version from '11.0.9'.

  • 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
    `
    i'm on linux debian buster (librazik 3) with openjdk-11-jdk 11.0.9

could i do something ?

@maximumspatium
Copy link
Contributor

maximumspatium commented Nov 12, 2020

Please open a new terminal window and execute the following commands:

cd [path to your Audiveris source directory]
git branch
./gradlew --version

What do the last two commands show?

@trebmuh
Copy link

trebmuh commented Nov 12, 2020

(probably related : #414)

@maximumspatium
Copy link
Contributor

maximumspatium commented Nov 12, 2020

@trebmuh The right solution for both issues has been already told:

If you want to run Audiveris under JDK 11, you has to build it from development branch.

The code in the master branch uses oldish Gradle Wrapper 4.6 that isn't compatible with JDK 11.
Updating it will be of no avail because the application code won't compile with JDK 11.

For now, the following rule holds:

  • master branch requires JDK 8
  • development branch supports JDK 11

P.S.: don't forget to clean the Gradle cache before rebuilding Audiviers to get rid of obsolete dependencies.

@trebmuh
Copy link

trebmuh commented Nov 12, 2020

@maximumspatium I saw that, that is why I made a comment here with link to #414 where one can find the solution.

@olof29
Copy link
Author

olof29 commented Nov 12, 2020

git branch gives me :
* development master
and ./gradlew --version gives :
`
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine java version from '11.0.9'.

  • 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
    `

@trebmuh
Copy link

trebmuh commented Nov 12, 2020

Then try git checkout development before doing ./gradlew.

@olof29
Copy link
Author

olof29 commented Nov 13, 2020

i am already on development branch

@trebmuh
Copy link

trebmuh commented Nov 13, 2020

Give us all the precise steps you're doing.

@maximumspatium
Copy link
Contributor

Try to clear Gradle cache:

rm -rf $HOME/.gradle

@olof29
Copy link
Author

olof29 commented Nov 13, 2020

i tried to clear gradle cahe, but it dont build :
`Downloading https://services.gradle.org/distributions/gradle-4.6-bin.zip
......................................................................
Unzipping /home/olivier/.gradle/wrapper/dists/gradle-4.6-bin/4jp4stjndanmxuerzfseyb6wo/gradle-4.6-bin.zip to /home/olivier/.gradle/wrapper/dists/gradle-4.6-bin/4jp4stjndanmxuerzfseyb6wo
Set executable permissions for: /home/olivier/.gradle/wrapper/dists/gradle-4.6-bin/4jp4stjndanmxuerzfseyb6wo/gradle-4.6/bin/gradle

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine java version from '11.0.9'.

  • 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
    `

But don't worry, i don't understand why it did'nt work on my computer, but olinux tried and it worked, then he realised a release from development branch for librazik 3 (debian buster) working well. Then, i don't need to try anymore to buil it.

thanks for your job and your help

@maximumspatium
Copy link
Contributor

The code in the development branch should download Gradle 5.6.4, not 4.6!
If it tries to download Gradle 4.6 you must be on the wrong branch.

I'd try the following steps:

  • ensure you've cloned the Git repository using git clone. Don't download Source ZIP! It won't work because the zip doesn't contain required Git files.
  • ensure the right branch is checked out:
    git checkout development
  • ensure the latest code is pulled:
    git pull
  • ensure Gradle cache doesn't contain incompatible dependencies:
    rm -rf $HOME/.gradle

If the above steps succeed, you'll should be able to compile and run Audiveris. A better approach would be to clone Audiveris to another directory and try from there.

@olof29
Copy link
Author

olof29 commented Nov 13, 2020

ok, i tried it, and it works this time.
thank you

@maximumspatium
Copy link
Contributor

Fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants