Bug 144128 - LibreOffice 7.2.0.4 Apple Arm - no Java functionality
Summary: LibreOffice 7.2.0.4 Apple Arm - no Java functionality
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: ARM macOS (All)
: highest critical
Assignee: Stephan Bergmann
URL:
Whiteboard:
Keywords:
: 149724 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-08-27 15:23 UTC by Alex Thurgood
Modified: 2022-06-29 08:57 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2021-08-27 15:23:40 UTC
Description:
Testing LO7204 for Arm Mac Silicon

Steps to Reproduce:
1. Start LibreOffice
2. Preferences > LibreOffice > Advanced
3. Note the inability to select any JDK

Actual Results:
No JDk is selectable in the Advanced Panel, making both the panel and much of the database functionality useless, and furthermore disabling any Java based extensions that might be installed.

Expected Results:
User should be able to select a JDK to be able to use and be able to apply that setting


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Mac OS X 11.5.2; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 1 Julien Nabet 2021-08-29 13:41:15 UTC
Stephan: seeing Java + Mac, thought you might be interested in this one.
Comment 2 Stephan Bergmann 2021-08-30 08:39:52 UTC
Addressed with <https://git.libreoffice.org/core/+/e529461bcb126e0975ffa3f86e1fd5a630551de2%5E%21> 
"Enable JVM also on macOS ARM64" on master towards LibreOffice 7.3.  But note that this is known to work (and not crash the soffice process) only with specific JDKs:

See <https://lists.freedesktop.org/archives/libreoffice/2021-June/087539.html> "Re: Using Java on macOS ARM64" and the libera.chat #libreoffice-dev excerpt from June 29, 2021:
> Jun 29 16:37:00 <loircbot>    LibreOffice (core) sbergman · jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx · Enable JVM also on macOS ARM64
> Jun 29 16:44:02 <cloph_away>  sberg__: ^ any reasons that'd speak against cherry-picking that for 7-2 branch as well?
> Jun 29 16:44:57 <sberg__>     cloph_away, do we even do ARM64 macOS builds?
> Jun 29 16:45:18 <cloph_away>  sberg__: unofficial/unsupported/not explicitly listed on the dl-pages (at least for now)
> Jun 29 16:46:42 <cloph_away>  sberg__: native builds feel snappier, so might even add them to the DL-page as an experimental option for 7.2
> Jun 29 16:46:47 <sberg__>     cloph_away, and I'm not sure whether it's really worth backporting, as other JDK versions still appear to crash LO (I never understood what the issue is, whether it's a bug in the JVMs, or a bug in macOS, or a bug in M1, or maybe for some odd reason even a bug in LO ;)
Comment 3 Alex Thurgood 2021-08-30 09:01:59 UTC
(In reply to Stephan Bergmann from comment #2)
> Addressed with
> <https://git.libreoffice.org/core/+/
> e529461bcb126e0975ffa3f86e1fd5a630551de2%5E%21> 
> "Enable JVM also on macOS ARM64" on master towards LibreOffice 7.3.  But
> note that this is known to work (and not crash the soffice process) only
> with specific JDKs:
> 

Can't wait to try, thanks Stephan !
Comment 4 Alex Thurgood 2021-09-24 07:53:47 UTC
Is there anyway to backport this to 7.2 for macOS aarch64 ?

Is there a release plan for this arch, or will the project wait until 7.3 ?

Otherwise, 7.2.x aarch64 risks getting released without any functional Java interface.

This is especially so since Oracle has now released JDK 17 in both x64 and aarch64 versions (but see bug 144695 for the confusion that generates) and changed the licensing to allow free use for business and personal users alike.
Comment 5 Alex Thurgood 2021-09-24 07:56:33 UTC
(In reply to Stephan Bergmann from comment #2)
> Addressed with
> <https://git.libreoffice.org/core/+/
> e529461bcb126e0975ffa3f86e1fd5a630551de2%5E%21> 
> "Enable JVM also on macOS ARM64" on master towards LibreOffice 7.3.  But
> note that this is known to work (and not crash the soffice process) only
> with specific JDKs:
> 

I don't see any aarch64 macOS dev builds for master, so no possibility to test whether this is now working ?
Comment 7 Alex Thurgood 2021-10-14 18:13:40 UTC
(In reply to steve from comment #6)
> @Alex: 7.2.2 release blog post
> https://blog.documentfoundation.org/blog/2021/10/14/libreoffice-7-2-2-
> community/ has this link:
> https://download.documentfoundation.org/libreoffice/stable/7.2.2/mac/aarch64/

Thanks Steve, but I don't see any mention of Java support being fixed in the release notes or rc fixes.
Comment 8 Stephan Bergmann 2021-10-15 07:29:31 UTC
(In reply to Alex Thurgood from comment #7)
> (In reply to steve from comment #6)
> > @Alex: 7.2.2 release blog post
> > https://blog.documentfoundation.org/blog/2021/10/14/libreoffice-7-2-2-
> > community/ has this link:
> > https://download.documentfoundation.org/libreoffice/stable/7.2.2/mac/aarch64/
> 
> Thanks Steve, but I don't see any mention of Java support being fixed in the
> release notes or rc fixes.

Indeed, those 7.2 builds are still done without Java support (i.e., without a backport of <https://git.libreoffice.org/core/+/e529461bcb126e0975ffa3f86e1fd5a630551de2%5E%21> "Enable JVM also on macOS ARM64").

If we ever release macOS ARM64 builds with Java support enabled (which will happen if we release such builds of LO 7.3; adding cloph in cc), we should first make sure that users are not likely to combine that LO installation with a Java installation that will make LO crash at runtime:

1  We could hope that by then effectively all versions of Java that are in wide circulation no longer suffer from the underlying issue (whatever caused it exactly) that made soffice crash with SIGBUS after a JVM was instantiated in-process.

2  We could list know-good Java versions in the release notes and warn users against the consequences of using other Java installations.  (We should probably do some experimentation first to identify a useful set of known-good versions from various vendors, beyond the one <https://cdn.azul.com/zulu/bin/zulu17.0.63-ea-jdk17.0.0-ea.27-macosx_aarch64.zip> I have identified so far.)

3  We could potentially extend jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml (for ARM64 only) to only list known-good vendor/minVersion combinations (after the same experimentation as for item 2).
Comment 9 Alex Thurgood 2021-10-16 13:59:47 UTC
My testing with Oracle GA JDK 17 for aarch64 seems to work pretty stably with Lodev aarch64.
Comment 10 Stephan Bergmann 2021-10-21 11:18:21 UTC
(In reply to Stephan Bergmann from comment #8)
> 3  We could potentially extend
> jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml (for ARM64 only)
> to only list known-good vendor/minVersion combinations (after the same
> experimentation as for item 2).

see <https://gerrit.libreoffice.org/c/core/+/123989> "Restrict macOS ARM64 to Java >= 17"
Comment 11 Frank Fuchs 2022-01-16 18:43:21 UTC
With the new RC2 of LibreOffice 7.3.0 (7.3.0.2), Java on macOS ARM is gone, i.e. it is no longer shown / selectable in the LibreOffice settings.
In 7.3.0.1 you could select it.

macOS 12.1 on MacBook Pro 16" with M1 Max
Oracle JDK for macOS ARM (not the Intel version), Version 17.0.1
Comment 12 Alex Thurgood 2022-01-16 20:30:13 UTC
(In reply to Frank Fuchs from comment #11)
> With the new RC2 of LibreOffice 7.3.0 (7.3.0.2), Java on macOS ARM is gone,
> i.e. it is no longer shown / selectable in the LibreOffice settings.
> In 7.3.0.1 you could select it.
> 
> macOS 12.1 on MacBook Pro 16" with M1 Max
> Oracle JDK for macOS ARM (not the Intel version), Version 17.0.1

@Frank, can you open a new report against 7.3 RC2? 
I'll mark it as regression if I can confirm it tomorrow.
Comment 13 Frank Fuchs 2022-01-16 21:21:34 UTC
@Alex: I opened a new bug id=146801 and linked it to this one.
Comment 14 Stephan Bergmann 2022-01-17 09:55:47 UTC
[setting back to RESOLVED FIXED after discussion started in comment 11 has moved to bug 146801]
Comment 15 Alex Thurgood 2022-06-29 08:57:39 UTC
*** Bug 149724 has been marked as a duplicate of this bug. ***