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

Can't build using OpenJDK 17 #72

Closed
gavv opened this issue Apr 3, 2023 · 5 comments · Fixed by #132
Closed

Can't build using OpenJDK 17 #72

gavv opened this issue Apr 3, 2023 · 5 comments · Fixed by #132
Assignees
Labels
build system Build scripts

Comments

@gavv
Copy link
Member

gavv commented Apr 3, 2023

Currently, I'm able to build roc-java using OpenJDK 8, but not OpenJDK 17.

OpenJDK 8 is not available in next debian stable candidate, so it would be nice to fix build with recent version. Otherwise you need to install older JDK manually.


When using OpenJDK 17, I get the following error:

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':roc_jni'.
> Could not open proj remapped class cache for 6ln1p28aqpsv1qjk04pyeijya (/home/victor/.gradle/caches/6.4/scripts-remapped/build_bvwlj1vorvl1q0nbtcfbai48m/6ln1p28aqpsv1qjk04pyeijya/proj68a30bfc7da5ef859cd7b983445462e5).
   > Could not open proj generic class cache for build file '/home/victor/dev/roc-streaming/roc-java/roc_jni/build.gradle' (/home/victor/.gradle/caches/6.4/scripts/6ln1p28aqpsv1qjk04pyeijya/proj/proj68a30bfc7da5ef859cd7b983445462e5).
      > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 61

* 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

BUILD FAILED in 2s

If I download JDK 8 from here and added it to PATH:

PATH="/some/path/jdk8u362-b09/bin:$PATH" ./gradlew build

everything works.

@gavv gavv added enhancement New feature or request good first issue Good for newcomers help wanted Contributions are welcome build system Build scripts and removed enhancement New feature or request labels Apr 3, 2023
@gavv
Copy link
Member Author

gavv commented Apr 13, 2023

If we update gradle, will it still work on java 8? If yes, I'd suggest to update.

@ortex
Copy link
Member

ortex commented Apr 13, 2023

If we update gradle, will it still work on java 8?

I think so. Now it works with java 11.

The main problem is that maven plugin was removed from 7+ version.
https://docs.gradle.org/current/userguide/upgrading_version_6.html#removal_of_the_legacy_maven_plugin

We using it for upload aar to maven central https://github.com/roc-streaming/roc-java/blob/main/android/roc-android/build.gradle#L2

But I guess it shouldn't be too hard to migrate to new maven-publish plugin :)

@gavv
Copy link
Member Author

gavv commented May 14, 2023

After fixing this, we'll need to add java17 step to CI jobs for linux and osx. Also we can switch release step to java17 too.

@gavv gavv removed good first issue Good for newcomers help wanted Contributions are welcome labels Oct 12, 2024
@gavv gavv self-assigned this Oct 12, 2024
gavv added a commit to gavv/roc-java that referenced this issue Oct 12, 2024
Closes: roc-streaming#72, roc-streaming#112, roc-streaming#116, roc-streaming#106, roc-streaming#107, roc-streaming#105

- Update requirements:
    for build: JDK 17+
    for running: JRE 8+
    Android API 29+ (Android 10)

- Bump gradle version and fix build on recent JDK versions

- CI:
    bump actions versions
    cleanup
    test JDK 21 and JDK 17
    switch to android-actions/setup-android
    downgrade roc-toolkit from master to v0.2.6
    automatically select best roc-toolkit git tag for release AAR

- README:
    document version requirements
    cleanup build & devel instructions
    document where versions are hard-coded

- Gradle:
    use io.freefair.android-lombok on Android
    run delombok before javadoc
    disable javadoc warnings
    switch from "maven" to "maven-publish" plugin
    fix cmake warnings due to incorrect invocation

- Sources:
    fix javadoc errors
    exclude gradle code from javadoc
gavv added a commit to gavv/roc-java that referenced this issue Oct 12, 2024
Closes: roc-streaming#72, roc-streaming#112, roc-streaming#116, roc-streaming#106, roc-streaming#107, roc-streaming#105

- Update requirements:
    for build: JDK 17+
    for running: JRE 8+
    Android SDK: 31+ (Android 12)
    Android API: 29+ (Android 10)

- Bump gradle version and fix build on recent JDK versions

- CI:
    bump actions versions
    cleanup
    test JDK 21 and JDK 17
    switch to android-actions/setup-android
    downgrade roc-toolkit from master to v0.2.6
    automatically select best roc-toolkit git tag for release AAR

- README:
    document version requirements
    cleanup build & devel instructions
    document where versions are hard-coded

- Gradle:
    use io.freefair.android-lombok on Android
    run delombok before javadoc
    disable javadoc warnings
    switch from "maven" to "maven-publish" plugin
    fix cmake warnings due to incorrect invocation

- Sources:
    fix javadoc errors
    exclude gradle code from javadoc
@gavv gavv mentioned this issue Oct 12, 2024
gavv added a commit to gavv/roc-java that referenced this issue Oct 12, 2024
Closes: roc-streaming#72, roc-streaming#112, roc-streaming#116, roc-streaming#106, roc-streaming#107, roc-streaming#105

- Update requirements:
    for build: JDK 17+
    for running: JRE 8+
    Android SDK: 31+ (Android 12)
    Android API: 29+ (Android 10)

- Bump gradle version and fix build on recent JDK versions

- CI:
    bump actions versions
    cleanup
    test JDK 21 and JDK 17
    switch to android-actions/setup-android
    downgrade roc-toolkit from master to v0.2.6
    automatically select best roc-toolkit git tag for release AAR

- README:
    document version requirements
    cleanup build & devel instructions
    document where versions are hard-coded

- Gradle:
    use io.freefair.android-lombok on Android
    run delombok before javadoc
    disable javadoc warnings
    switch from "maven" to "maven-publish" plugin
    fix cmake warnings due to incorrect invocation

- Sources:
    fix javadoc errors
    exclude gradle code from javadoc
gavv added a commit to gavv/roc-java that referenced this issue Oct 12, 2024
Closes: roc-streaming#72, roc-streaming#112, roc-streaming#116, roc-streaming#106, roc-streaming#107, roc-streaming#105

- Update requirements:
    for build: JDK 17+
    for running: JRE 8+
    Android SDK: 31+ (Android 12)
    Android API: 29+ (Android 10)

- Bump gradle version and fix build on recent JDK versions

- CI:
    bump actions versions
    cleanup
    test JDK 21 and JDK 17
    switch to android-actions/setup-android
    downgrade roc-toolkit from master to v0.2.6
    automatically select best roc-toolkit git tag for release AAR

- README:
    document version requirements
    cleanup build & devel instructions
    document where versions are hard-coded

- Gradle:
    use io.freefair.android-lombok on Android
    run delombok before javadoc
    disable javadoc warnings
    switch from "maven" to "maven-publish" plugin
    fix cmake warnings due to incorrect invocation

- Sources:
    fix javadoc errors
    exclude gradle code from javadoc
gavv added a commit to gavv/roc-java that referenced this issue Oct 15, 2024
Closes: roc-streaming#72, roc-streaming#112, roc-streaming#116, roc-streaming#106, roc-streaming#107, roc-streaming#105

- Update requirements:
    for build: JDK 17+
    for running: JRE 8+
    Android SDK: 31+ (Android 12)
    Android API: 29+ (Android 10)

- Bump gradle version and fix build on recent JDK versions

- CI:
    bump actions versions
    cleanup
    test JDK 21 and JDK 17
    switch to android-actions/setup-android
    downgrade roc-toolkit from master to v0.2.6
    automatically select best roc-toolkit git tag for release AAR

- README:
    document version requirements
    cleanup build & devel instructions
    document where versions are hard-coded

- Gradle:
    use io.freefair.android-lombok on Android
    run delombok before javadoc
    disable javadoc warnings
    switch from "maven" to "maven-publish" plugin
    fix cmake warnings due to incorrect invocation

- Sources:
    fix javadoc errors
    exclude gradle code from javadoc
@gavv gavv closed this as completed in #132 Oct 16, 2024
@gavv gavv closed this as completed in 8f85b10 Oct 16, 2024
@gavv
Copy link
Member Author

gavv commented Oct 16, 2024

We now actually require JDK 17+ for building.

(We still support Java 8+ for running).

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

Successfully merging a pull request may close this issue.

2 participants