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

jre.zulu: initial addon #3653

Merged
merged 1 commit into from
Aug 2, 2019
Merged

jre.zulu: initial addon #3653

merged 1 commit into from
Aug 2, 2019

Conversation

vpeter4
Copy link
Contributor

@vpeter4 vpeter4 commented Jul 5, 2019

Java Runtime Environment 8 for Blu-ray Disc Java menus from Azul Systems.
Also includes libbluray-j2se-*.jar file. Maybe would be better to include this file as part of the image and use only JRE as addon?

@MilhouseVH
Copy link
Contributor

No aarch64 support?

I doubt anything JRE-related will be added to images any time soon - best to keep this entirely as an addon for those that want it.

@vpeter4
Copy link
Contributor Author

vpeter4 commented Jul 5, 2019

Will add aarch64.
I understand that JRE related things doesn't belong in small image (JRE itself is ~40MB). The question was more to include only libbluray-j2se-*.jar which is ~800kB.
Now the problem can happen with addon update when libbluray version is bumped. In this case addon will be bumped too and systems with old Kodi version will be upgraded to newer libbluray jar. Not sure if this can work. But for now users can just downgrade in this case. We can always change that in future updates.

@vpeter4
Copy link
Contributor Author

vpeter4 commented Jul 5, 2019

@chewitt: Can you make one nice icon please?

@chewitt
Copy link
Member

chewitt commented Jul 5, 2019

icon_jrezulu

@MilhouseVH
Copy link
Contributor

@vpeter On a point of etiquette, would you mind changing your copyright attribution to include your real name and email address (the same as it is in your git commits)? This would then be consistent with pretty much all other attributions in the code base. Thanks!

Copy link
Member

@CvH CvH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just nits

PKG_LICENSE="GPLv2"
PKG_SITE="https://www.azul.com/products/zulu-embedded/"
PKG_URL="http://cdn.azul.com/zulu-embedded/bin/zulu8.38.0.162-ca-jdk1.8.0_212-linux_aarch64.tar.gz"
PKG_DEPENDS_TARGET=""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PKG_DEPENDS_TARGET=""

PKG_LICENSE="GPLv2"
PKG_SITE="https://www.azul.com/products/zulu-embedded/"
PKG_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.38.0.163-ca-jdk1.8.0_212-linux_aarch32hf.tar.gz"
PKG_DEPENDS_TARGET=""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PKG_DEPENDS_TARGET=""

PKG_LICENSE="GPLv2"
PKG_SITE="https://www.azul.com/products/zulu-enterprise/"
PKG_URL="https://cdn.azul.com/zulu/bin/zulu8.38.0.13-ca-jdk8.0.212-linux_x64.tar.gz"
PKG_DEPENDS_TARGET=""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PKG_DEPENDS_TARGET=""

# Copyright (C) 2019-present Peter Vicman (peter.vicman@gmail.com)

PKG_NAME="jdk-x86_64-zulu"
PKG_VERSION="8u212"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PKG_VERSION not used at URL ? I see there is some meh versioning going on but maybe use at least 8.38.0.13 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8u212 is OpenJDK version which this zulu binary is based on. But will change to zulu binary version like 8.38.0.13 in this case.

PKG_DEPENDS_TARGET="jdk-${TARGET_ARCH}-zulu jre-libbluray libXext chrome-libXtst chrome-libXi chrome-libXrender jre-libXinerama"
PKG_SHORTDESC="Java Runtime Environment 8 for Blu-ray Disc Java menus from Azul Systems."
PKG_LONGDESC="$PKG_SHORTDESC"
PKG_TOOLCHAIN="manual"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PKG_TOOLCHAIN="manual"
PKG_TOOLCHAIN="manual"

@@ -0,0 +1,2 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)

@@ -0,0 +1,2 @@
# SPDX-License-Identifier: GPL-2.0-or-later
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-License-Identifier: GPL-2.0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to align with all other default.py files we have, because there is no copy worthy content here so just a placeholder? also this is addon is introduced 2019 so i guess 2019-present ?

@@ -0,0 +1,2 @@
101
- Initial release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Initial release
- Initial release
100
- private test version

@@ -0,0 +1,20 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)

@@ -0,0 +1,35 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)

@vpeter4 vpeter4 force-pushed the jre.m branch 2 times, most recently from cba5d58 to 503d6ea Compare July 6, 2019 17:17
@vpeter4
Copy link
Contributor Author

vpeter4 commented Jul 6, 2019

Still builds fine for Generic, RPi2 and Rockchip. Runs on Generic.

@MilhouseVH
Copy link
Contributor

MilhouseVH commented Jul 7, 2019

I'm not able to build jre-libbluray for Generic/x86_64 on Ubuntu 16.04 because ant isn't found during jre-libbluray configure.

Log: http://ix.io/1NTv

This build includes the latest #3655 and #3661.

Command line:

git clone https://github.com/LibreELEC/LibreELEC.tv.git LibreELEC.tv-test
cd LibreELEC.tv-test
git checkout -b vpeter
wget -q https://github.com/LibreELEC/LibreELEC.tv/pull/3655.patch -O- | git am
wget -q https://github.com/LibreELEC/LibreELEC.tv/pull/3661.patch -O- | git am
wget -q https://github.com/LibreELEC/LibreELEC.tv/pull/3653.patch -O- | git am
PROJECT=Generic ARCH=x86_64 scripts/create_addon jre.zulu

History: http://ix.io/1NTx, Plan: http://ix.io/1NTy

apache-ant has been built successfully, but you're not appending $(get_build_dir apache-ant)/binary/bin to $PATH during the configure_target() phase, so the package configure doesn't find a usable ant - I don't have any version of ant installed on this build host but you presumably do which may explain why this doesn't fail for you.

I would suggest installing ant into $TOOLCHAIN/bin (and associated Java classes into something like $TOOLCHAIN/java or similar - your choice, whatever is "standard" for Java these days) and this then avoids fiddling with $PATH both during configure_target and everywhere else.

At the very least if you copied binary/bin/ant into $TOOLCHAIN/bin it's enough to keep configure happy and then this PR builds (using this patch: http://ix.io/1NTA) but that's just a temporary hack solution so I'd rather we installed a working version of ant into $TOOLCHAIN and removed the $PATH modifications. Thanks!

@MilhouseVH
Copy link
Contributor

This patch applies on top of this PR and installs ant to $TOOLCHAIN allowing this PR to build successfully on systems without ant, and without modifying $PATH.

This add-on now builds (for Generic) but not run-time tested. Will try building for RPi2/arm.

@MilhouseVH
Copy link
Contributor

No issues building Generic, RPi2 and RPi with ant patch, although there's probably very little point building this add-on for DEVICE=RPi (RPi0, RPi1 etc.) as I doubt anyone will be mad enough to install it.

I'm not able to run-time test these add-ons, but I have uploaded them here (for LE master/Kodi 18.3):

http://milhouse.libreelec.tv/other/jbd-addons

@vpeter4
Copy link
Contributor Author

vpeter4 commented Jul 7, 2019

Ah, I missed configure phase. And I was checking to not miss something.
Fixes applied.

And regarding running this on RPi1: I know one guy who did. He doesn't have any disk to test but BD-J games indeed work so menu was showed.

Your Generic addon works. Also RPi2 on Wetek Play. No arm64 device here.

To test you can try playing game Ukko's Journey (Blu-Play version) from http://www.pouet.net/prod.php?which=68910

@MilhouseVH
Copy link
Contributor

Squash them down, and stick a fork in it? 😄

This PR is now dependent on #3661 but I'd hope that merges soon (next few days).

@MilhouseVH
Copy link
Contributor

@vpeter just an FYI - I tried a test build (image) that includes #3667, and built this addon (also with #3667), and it no longer works with the test video.

This is the debug log when using libbluray-1.1.2 and opening the Blu-ray menu from the test disk: http://ix.io/1NZI

Not really sure if it's the ISO that is the problem - it's my only test disk.

I don't know when we will merge libbluray-1.1.2, I suspect we may wait for Team Kodi to make the first move which I suspect will happen during Kodi 19, but thought you might want to know there may be an issue with this add-on.

@MilhouseVH
Copy link
Contributor

When I say it no longer works, what I mean is you see a Kai Toast appear with the message
"
Playback of Blu-ray failed
The menu of this blu-ray is not supported
"

s1

@vpeter4
Copy link
Contributor Author

vpeter4 commented Jul 8, 2019

I assume it is because of this?

CBlurayCallback::Logger - bdj.c:583: Cant access AWT jar file /storage/.kodi/addons/tools.jre.zulu/libbluray-awt-j2se-1.1.2.jar

It is companion file to libbluray-j2se-1.1.2.jar. Introduced in 1.1.0.

Java Runtime Environment 8 for Blu-ray Disc Java menus from Azul Systems.
Also includes libbluray-j2se-*.jar file.
@MilhouseVH
Copy link
Contributor

I just deleted all my libbluray-1.1.2 based build directories, but if you have a patch I can rebuild the RPi2 image and this add-on with libbluray-1.1.2 and try again?

@vpeter4
Copy link
Contributor Author

vpeter4 commented Jul 8, 2019

It was pushed 32 minutes ago :-)

@vpeter4
Copy link
Contributor Author

vpeter4 commented Jul 8, 2019

Working fine with libbluray-1.1.2 too.

@MilhouseVH
Copy link
Contributor

MilhouseVH commented Jul 8, 2019

Thanks, seems to be working fine now with 1.1.2 on RPi2.

However, I did experience a crash with my libbluray-1.1.2 build: http://ix.io/1O0z - I had been watching a BDISO video started from the BD-J menu, and then it crashed several minutes after the video started (it had been fine up until the crash). I'll see if I can reproduce with libbluray-1.0.2.

Edit:

I found this entry in the system log:

Jul 08 10:20:34 rpi22 kodi.sh[701]: #
Jul 08 10:20:34 rpi22 kodi.sh[701]: # A fatal error has been detected by the Java Runtime Environment:
Jul 08 10:20:34 rpi22 kodi.sh[701]: #
Jul 08 10:20:34 rpi22 kodi.sh[701]: #  SIGSEGV (0xb) at pc=0x007fd4cc, pid=705, tid=0x3c9b0380
Jul 08 10:20:34 rpi22 kodi.sh[701]: #
Jul 08 10:20:34 rpi22 kodi.sh[701]: # JRE version: OpenJDK Runtime Environment (8.0_212-b163) (build 1.8.0_212-b163)
Jul 08 10:20:34 rpi22 kodi.sh[701]: # Java VM: OpenJDK Client VM (25.212-b163 mixed mode, Evaluation linux-aarch32 )
Jul 08 10:20:34 rpi22 kodi.sh[701]: # Problematic frame:
Jul 08 10:20:34 rpi22 kodi.sh[701]: # C  [kodi.bin+0x7f54cc]  CDVDInputStreamBluray::OpenMVCDemux(int)+0x14c
Jul 08 10:20:34 rpi22 kodi.sh[701]: #
Jul 08 10:20:34 rpi22 kodi.sh[701]: # Core dump written. Default location: //core or core.705
Jul 08 10:20:34 rpi22 kodi.sh[701]: #
Jul 08 10:20:34 rpi22 kodi.sh[701]: # An error report file with more information is saved as:
Jul 08 10:20:34 rpi22 kodi.sh[701]: # /tmp/hs_err_pid705.log
Jul 08 10:20:34 rpi22 kodi.sh[701]: #
Jul 08 10:20:34 rpi22 kodi.sh[701]: # If you would like to submit a bug report, please visit:
Jul 08 10:20:34 rpi22 kodi.sh[701]: #   http://www.azulsystems.com/support/
Jul 08 10:20:34 rpi22 kodi.sh[701]: #

/tmp/hs_err_pid705.log -> http://ix.io/1O0C

@MilhouseVH
Copy link
Contributor

I had a crash during 3D BD ISO video playback (in monoscopic mode) with libbluray-1.0.2: http://ix.io/1O0L - this seemed to be MVC related so may be a different issue and unrelated to this add-on. So far I haven't reproduced a JVM crash with libbluray-1.0.2, however the JVM crash with libbluray-1.1.2 also occurred during 3D BDISO playback (monoscopic), so maybe it's being triggered by an MVC issue?

@vpeter4
Copy link
Contributor Author

vpeter4 commented Jul 8, 2019

This crash is for someone else who understand how things work.

The main idea about this addon was to collect some informations about this BD-J area. Maybe in time we can get better user experience. Because there are questions on forum from time to time about this menus.

@vpeter4
Copy link
Contributor Author

vpeter4 commented Jul 8, 2019

For me playing 8-bit Memoirs Issue #1 English http://www.pouet.net/prod.php?which=72494 causes Kodi to restart without crashlog or any useful info.
Mhm: OOM is the cause?
At some point Kodi starts eating memory. Sadly don't know how to identify the place.

Seems libbluray version doesn't matter.
Same problem also with Oracle JRE.

@CvH CvH merged commit 9254a8d into LibreELEC:master Aug 2, 2019
@MilhouseVH
Copy link
Contributor

MilhouseVH commented Aug 2, 2019

@vpeter4 do you want to backport this to libreelec-9.2? I think it should backport easily enough. Then we can include it with 9.1.003 etc.

@vpeter4
Copy link
Contributor Author

vpeter4 commented Aug 2, 2019

Let me look and test over weekend.

@vpeter4
Copy link
Contributor Author

vpeter4 commented Aug 3, 2019

Seems this PR can be directly used on libreelec-9.2 branch (checked with Generic and RPi2 ). If you want you can send PR (I have limited access for next few days).

@MilhouseVH
Copy link
Contributor

Backport added to #3734. Thanks!

@vpeter4
Copy link
Contributor Author

vpeter4 commented Aug 5, 2019

Thank you!

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

Successfully merging this pull request may close these issues.

4 participants