Issue 127876 - unbreak ODK build with Java 8
Summary: unbreak ODK build with Java 8
Status: RESOLVED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: sdk (show other issues)
Version: 4.1.6-dev
Hardware: All All
: P5 (lowest) Normal
Target Milestone: 4.1.8
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-01 19:07 UTC by Don Lewis
Modified: 2020-09-24 12:43 UTC (History)
2 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: 4.1.7
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Don Lewis 2018-09-01 19:07:34 UTC
When building OpenOffice with the --enable-odk option, the build fails if Java 8 in installed.  Since earlier versions of Java are difficult to obtain, this could be problematical for anyone who attempts to build OpenOffice 4.1.6 if they don't already have an older version of Java installed.

To fix, these commits should be merged from trunk:
  https://svn.apache.org/viewvc?view=revision&revision=1591062 (partial)
  https://svn.apache.org/viewvc?view=revision&revision=1697228
  https://svn.apache.org/viewvc?view=revision&revision=1697237
  https://svn.apache.org/viewvc?view=revision&revision=1697247
  https://svn.apache.org/viewvc?view=revision&revision=1697306
  https://svn.apache.org/viewvc?view=revision&revision=1697312

The merge of 1591062 is only needed to prevent a merge conflict in one of the later merges.  It is only a partial merge because a full merge of 1591062 fails with a merge conflict.

In the top level directory of AOO416:
  svn merge -c 1591062 '^/openoffice/trunk/main/xmerge' main/xmerge
  svn merge -c 1697228 '^/openoffice/trunk' .
  svn merge -c 1697237 '^/openoffice/trunk' .
  svn merge -c 1697247 '^/openoffice/trunk' .
  svn merge -c 1697306 '^/openoffice/trunk' .
  svn merge -c 1697312 '^/openoffice/trunk' .

Fix tested in 4.1.6 on 32-bit Windows 7 with java 8 and CentOS 6 x86_64 with java 1.7.
Comment 1 Matthias Seidel 2018-09-01 19:20:57 UTC
I did some experiments with these commits on Windows:

With trunk (built with JAVA 8) I can use JAVA 7 or 8 (both installed).
With AOO 4.1.x (built with Java 8) I can only use JAVA 8. JAVA 7 will not be recognized.

Since both versions are found in trunk, there may be a minor issue in detecting JAVA 7 left in 4.1.x.
Comment 2 Peter 2018-09-16 09:25:26 UTC
Accepted for 4.1.6
Comment 3 SVN Robot 2018-10-08 06:19:25 UTC
"petko" committed SVN revision 1843109 into branches/AOO416:
Issue 127876 - unbreak ODK build with Java 8
Comment 4 Matthias Seidel 2018-10-13 11:28:00 UTC
Revoked with r1843571.

Since Java 7 isn't detected on Windows anymore after applying these patches I think we should hold back this issue until this is solved.

There are a lot of people who still use Java 7 (or older) on Windows.
Comment 5 Peter 2018-10-15 19:59:15 UTC
Okay moving this out of the 4.1.6 release and into 4.2.0
Comment 6 Peter 2018-10-15 20:02:22 UTC
changed to much. Sry
Comment 7 Matthias Seidel 2018-10-15 20:03:56 UTC
(In reply to Peter from comment #5)
> Okay moving this out of the 4.1.6 release and into 4.2.0

4.2.0 already has all these fixes.
We just need to get older Java versions detected in 4.1.x. like they are in trunk.
Comment 8 Don Lewis 2018-10-15 22:08:19 UTC
I don't know why this is affecting Java 8 detection.  Almost all of the changes are to comments in .java files that are only parsed to produce documentation for ODK.

Unfortunately I can't test Java 7 on Windows since I don't have it installed in my Win7 VM and it is no longer downloadable.
Comment 9 Matthias Seidel 2018-10-15 22:11:56 UTC
(In reply to Don Lewis from comment #8)
> I don't know why this is affecting Java 8 detection.  Almost all of the
> changes are to comments in .java files that are only parsed to produce
> documentation for ODK.

Something might be missing, as detection works in trunk.
 
> Unfortunately I can't test Java 7 on Windows since I don't have it installed
> in my Win7 VM and it is no longer downloadable.

https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
Comment 10 Don Lewis 2018-10-20 21:23:31 UTC
I just built and installed unmodified AOOO416 and it also doesn't detect JAVA7.
Comment 11 Matthias Seidel 2018-10-20 21:26:57 UTC
(In reply to Don Lewis from comment #10)
> I just built and installed unmodified AOOO416 and it also doesn't detect
> JAVA7.

Did you build with Java 8 or Java 7?
Comment 12 Don Lewis 2018-10-20 22:49:04 UTC
Java 8.  I'm starting a Java 7 build now.
Comment 13 Don Lewis 2018-10-20 22:52:14 UTC
BTW, the java detection code appears to be in jvmfwk, and that really hasn't changed in a long time.
Comment 14 Don Lewis 2018-10-21 01:51:00 UTC
If I build AOO416 with this patch and Java 7, then OpenOffice detects both Java 7 and Java 8.  That sounds about like what we observed previously.
Comment 15 Matthias Seidel 2018-10-21 22:27:51 UTC
Yes, basically we seem to have another bug that building 4.1.x with Java 8 disables detection of Java 7 (and maybe older versions).

The ODK patch itself is OK and can be applied after this is fixed.
(Detection of Java 7 works in trunk, when AOO is built with Java 8)
Comment 16 Don Lewis 2018-10-21 23:41:06 UTC
The jvmfwk code appears to be identical between trunk and AOO416.  The only thing that shows up in the output of diff are some typo fixes in comments.
Comment 17 Matthias Seidel 2020-09-24 12:43:27 UTC
Committed to AOO418 with:

https://github.com/apache/openoffice/pull/95