Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947615 - app-office/projectlibre-bin-1.9.3 runs only with java 1.8
Summary: app-office/projectlibre-bin-1.9.3 runs only with java 1.8
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-06 16:12 UTC by Konstantin Münning
Modified: 2025-04-05 22:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild with fixed RDEPEND and patch for start script (projectlibre-bin-1.9.3-r1.ebuild,1.24 KB, application/vnd.gentoo.ebuild)
2025-01-06 16:12 UTC, Konstantin Münning
Details
patch for run script to limit autodetect java version to 8 (java-version.patch,814 bytes, patch)
2025-01-06 16:13 UTC, Konstantin Münning
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Münning 2025-01-06 16:12:23 UTC
Created attachment 915998 [details]
ebuild with fixed RDEPEND and patch for start script

This probably applies to all projectlibre-bin-1.9.* versions.
Running it with java version higher than openjdk-8 results in buggy behavior as not being able to insert or delete lines.
Current ebuild has RDEPEND=">=virtual/jre-1.8". I attach a modified ebuild with RDEPEND="virtual/jre:1.8".
In addtion the start script has an java autodetection which only checks for min-version 6. I also add a patch to extend the check with a max-version of 8. Probably a completely new gentoo oriented start script to directly use JAVA_EXE="/usr/lib/jvm/openjdk-8/bin/java" may be simpler but I didn't want to change too much. As for my testing this now works good with many installed jvm's no matter what is set as system java-vm.
Comment 1 Konstantin Münning 2025-01-06 16:13:12 UTC
Created attachment 915999 [details, diff]
patch for run script to limit autodetect java version to 8
Comment 2 Volkmar W. Pogatzki 2025-01-06 17:43:52 UTC
(In reply to Konstantin Münning from comment #0)
> [...]
> Current ebuild has RDEPEND=">=virtual/jre-1.8". I attach a modified ebuild
> with RDEPEND="virtual/jre:1.8".

Should be RDEPEND=">=virtual/jre-1.8:*" and add java-pkg-2 to inherit.  There are examples in the tree such like 'app-misc/rundeck-cli-bin'.

For reference, see https://wiki.gentoo.org/wiki/Java_Developer_Guide#JDK.2FJRE
Comment 3 Konstantin Münning 2025-01-06 21:08:03 UTC
I think this is not appropriate here. As the Java Developer Guide mentions your remark is valid for packages building from source but projectlibre is binary. The present case is not directly covered but there is stated:

Package compiling only with JDK 1.8 but running fine with newer JDKs too:
DEPEND="virtual/jdk:1.8"
RDEPEND=">=virtual/jre-1.8:*"

Here building is not the issue and as the binary runs only with JDK 1.8 RDEPEND="virtual/jre:1.8" seems to be the proper selection IMHO.
Comment 4 Volkmar W. Pogatzki 2025-01-07 09:56:16 UTC
The question is, why doesn't it work with Java versions higher than 1.8.
It seems it is built with '-source 1.5 -target 1.5' in the build.xml files, and Java 8 was the last version supporting those values.
Building from source might help. 
see https://wiki.gentoo.org/wiki/Java_Developer_Guide/Using_eant
Comment 5 Konstantin Münning 2025-01-07 11:24:30 UTC
That's a good question which I can't answer. I can currently only tell that certain basic functions don't work which drastically reduces the usability of the software and that java > 1.8 throws a lot more warning than 1.8 which make little sense to me without knowing the source code.
As I didn't create this ebuild and it uses the "official" upstream build I just wanted to give a quick fix for the apparent problem. IMHO having a non-binary ebuild would be better anyway but I currently don't have the resources to create one myself. So if someone is volunteering please go ahead, I'd be happy to use a version working with recent Java :-).