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

Difference in Sage.jar between Windows and Linux builds #468

Open
jusjoken opened this issue Dec 30, 2021 · 6 comments
Open

Difference in Sage.jar between Windows and Linux builds #468

jusjoken opened this issue Dec 30, 2021 · 6 comments

Comments

@jusjoken
Copy link
Contributor

I have been working on rebuilding the Unraid Docker solution and was running into an issue with the Java8 docker as SageTV would run but a placeshifter would not connect. The issue was related to a change in Java between 8 and 9 and Byte(ByteBuffer).

The odd thing is I often test using Java 8 on windows and had no issues connection a placeshifter...both builds were the latest 9.2.6 releases.

So I copied the Sage.jar from the windows release into the linux docker and restarted SageTV and now I was able to connect the placeshifter to this Java 8 docker.

In my research I find that you can build a jar using JDK9 with the --release=8 option and it will resolve the Byte/ByteBuffer compatibility issue.

So are we using this --release option for the Windows jar build and not the Linux build or what is different in the 2 build processes that makes the Linux build fail on Java 8 but the Windows build works?

Thoughts?

@enternoescape
Copy link
Contributor

I obviously cannot speak for everyone, but this would allow the older docker container to work with Java 8 again which would address some compatibility issues with older plugins. On a side note, when I was building to fix an issue on Windows, I had to upgrade to Java 9 to be able to successfully compile the current code as it is on Github. I wasn't expecting that and spent a lot of time troubleshooting assuming I created the issue.

@wnjj
Copy link
Contributor

wnjj commented Dec 30, 2021

I’m pretty sure I built the last windows version with JDK 8 which would explain the difference. JDK9 was a result of needing to update the distribution for the automated build on GitHub.

@jusjoken
Copy link
Contributor Author

I currently do not have a build system for windows nor Linux but as time permits I will set one up again. If someone doesn't beat me to it I will test out the release=8 option under jdk9 and see what happens.

I think if we can support Java 8 as long as possible the better as we have many older in use plugins that could be affected. The Jetty issue may be the biggest but I am close to a jetty 9 release that works well on Java 8+

@jusjoken
Copy link
Contributor Author

jusjoken commented Jan 2, 2022

I found a resolution to this. I could not make it work with a build system that uses JDK9 as the --release option under Gradle is broken and Gradle does not plan to resolve it. So I built a build system as follows...

  • JDK 11 and ubuntu 20 (I actually used "adoptopenjdk/openjdk11:jdk-11.0.11_9" docker as my base image).
  • Gradle 7.3.3 (needed as it supports --release)
  • Had to change the gradle.build a bit to support Gradle 7+ as compile has been removed and now needed to use implementation

I manually uploaded the linux installer to my jusjoken/sagetv-linux forked repo and setup a Java 8 docker to use that as the sagetv install file and the docker works well.

If anyone want to try out the docker it is the one available in unraid and dockerhub under "sagetvopen/sagetv-server-java8"

I can create a PR for these changes but it would also force the github workflow process to be updated as in the end that is what is building the linux releases. I am not sure how to test those changes although in theory it should just be a matter of changing it to use ubuntu 20 and JDK 11. The --release flag is in the updated build.gradle file

Let me know your thoughts and I will clean up the changes from my testing and create a PR.

Ken

@jusjoken
Copy link
Contributor Author

jusjoken commented Jan 3, 2022

For record purposes on this issue I updated the PR to include the workflow changes needed to test build on ubuntu 20.04 and use JDK 11 and it passed the PR tests....good news. If the PR is accepted then the 9.2.7 build should run again on a java 8 docker (I guess I still need to change the version and push that too)

@jusjoken
Copy link
Contributor Author

jusjoken commented Jan 5, 2022

I did another PR to move the build process to use ubuntu 18.04 so the SageTV build would run on 18.04+. Although we could just expect users to update the linux os (that is what I did on the dockers), as 18.04 is under support for at least more than 1 more year I thought it better to also support 18.04.

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