Opened 7 months ago

Last modified 7 months ago

#69753 assigned defect

openjdk22 @22_0+release+server: insists on being re-built again and again but it is still broken because of /System/Library/Frameworks/JavaRuntimeSupport.framework does not exist

Reported by: JD-Veiga Owned by: breun (Nils Breunese)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc:
Port: openjdk22

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi,

I have installed openjdk22 in macOS 10.15.7 (Catalina) without any problem. However, when rev-upgrade is checked it claims that openjdk22 is broken and must be re-built. Re-building does not solve the problem since openjdk22 is still broken after the process is completed.

Could not open /System/Library/Frameworks/JavaRuntimeSupport.framework/Versions/A/JavaRuntimeSupport: Error opening or reading file (referenced from /opt/local/Library/Java/JavaVirtualMachines/jdk-22-macports.jdk/Contents/Home/lib/libawt.dylib)
--->  Found 6 broken files, matching files to ports      
Error: Port openjdk22 is still broken after rebuilding it more than 3 times.

Running port -d -y rev-upgrade yields the following report (only errors are shown here):

[...]
Could not open /System/Library/Frameworks/JavaRuntimeSupport.framework/Versions/A/JavaRuntimeSupport: Error opening or reading file (referenced from /opt/local/Library/Java/JavaVirtualMachines/jdk-22-macports.jdk/Contents/Home/lib/libawt.dylib)
DEBUG: Marking /opt/local/Library/Java/JavaVirtualMachines/jdk-22-macports.jdk/Contents/Home/lib/libawt.dylib as broken
[...]
DEBUG: Ignoring loadcommand containing @rpath in /opt/local/Library/Java/JavaVirtualMachines/jdk-22-macports.jdk/Contents/Home/lib/libawt_lwawt.dylib
DEBUG: Marking /opt/local/Library/Java/JavaVirtualMachines/jdk-22-macports.jdk/Contents/Home/lib/libawt_lwawt.dylib as broken
[...]
DEBUG: Marking /opt/local/Library/Java/JavaVirtualMachines/jdk-22-macports.jdk/Contents/Home/lib/libosx.dylib as broken
[...]
DEBUG: Marking /opt/local/Library/Java/JavaVirtualMachines/jdk-22-macports.jdk/Contents/Home/lib/libosxapp.dylib as broken
[...]
DEBUG: Marking /opt/local/Library/Java/JavaVirtualMachines/jdk-22-macports.jdk/Contents/Home/lib/libosxui.dylib as broken
[...]
DEBUG: Marking /opt/local/Library/Java/JavaVirtualMachines/jdk-22-macports.jdk/Contents/Home/lib/libsaproc.dylib as broken
[...]

So, it seems that the problem is :

Could not open /System/Library/Frameworks/JavaRuntimeSupport.framework/Versions/A/JavaRuntimeSupport: Error opening or reading file (referenced from /opt/local/Library/Java/JavaVirtualMachines/jdk-22-macports.jdk/Contents/Home/lib/libawt.dylib)

Actually, /System/Library/Frameworks/JavaRuntimeSupport.framework/Versions/A/JavaRuntimeSupport does not exit in my system at all. Indeed, parent directory /System/Library/Frameworks/JavaRuntimeSupport.framework does not exist.

I wonder if the installation process should create that /System/Library/Frameworks/JavaRuntimeSupport.framework directory in my system (or do not search for this directory in libawt.dylib).

Thank you.

Change History (6)

comment:1 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: breun removed
Description: modified (diff)
Owner: set to breun
Port: openjdk22 added; @openjdk22 removed
Status: newassigned

Obviously a port cannot create anything in /System; that's a directory for Apple to put things in and nobody else.

comment:2 Changed 7 months ago by JD-Veiga

That is true. I forgot that. So, any possible solution?

comment:3 Changed 7 months ago by breun (Nils Breunese)

I also don't find /System/Library/Frameworks/JavaRuntimeSupport.framework/Versions/A/JavaRuntimeSupport on macOS 14.4.1 arm64, but that doesn't seem to be a problem for building openjdk22.

It's interesting that you were able to install openjdk22 on Catalina 10.15.7, because according to https://ports.macports.org/port/openjdk22/details/ the build fails on Catalina and older.

I'm afraid that building OpenJDK 22 maybe just requires macOS 11+, but I haven't been able to find definitive system requirements for building OpenJDK from source.

comment:4 Changed 7 months ago by JD-Veiga

Well, building tests are not always accurate according to my experience. It is not the first time that I can install a port apparently not supported by my OS version (I am talking about Catalina and older macOSes). I suppose that some subtle differences between actual systems used by users and testing machines make it possible.

Obviously, I do not get any of the "error: invalid version number in '-mmacosx-version-min=11.00.00'" messages that appear in the macport's buildbot log. Maybe they are clang version related? I really do not know.

I will try to install openjdk22 in a sandboxed Catalina and see what happens (however, as you know, it is a lengthy compilation). I will inform you back.

On the other hand, I imagine that libawt.dylib is related to Java's AWT library. It is possible that AWT no longer supports Catalina since this OS is fading out. I have found that GUI-related libraries are one of most common reasons why applications are no longer supported by Catalina (for instance, Eclipse IDE, Qt6, etc.)

Thank you.

comment:5 Changed 7 months ago by JD-Veiga

I can confirm that it is possible to install openjdk22 port in macOS 10.15 (Catalina). I have checked in two "real" systems and in one sandboxed emulated OS.

Unfortunately, it seems that AWT package is not working in macOS 10.15 running JDK 22. It works in previous JDK 21.

I could not find any reference in documentation on this particular issue. macOS 10.15 is not a Oracle certified system since JDK 19 (see: https://www.oracle.com/java/technologies/javase/products-doc-jdk19certconfig.html and https://www.oracle.com/java/technologies/javase/products-doc-jdk22certconfig.html) However, Oracle's certification does not explain the whole thing since "Oracle does not certify on Operating System versions that are no longer supported by the Operating System provider" which is the case of Catalina. JDK 20 and JDK 21 seems to work smoothly on Catalina despite not being Oracle's certified OS, so it could be the case of 22.

I will try a different approach.

comment:6 in reply to:  4 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to breun:

I also don't find /System/Library/Frameworks/JavaRuntimeSupport.framework/Versions/A/JavaRuntimeSupport on macOS 14.4.1 arm64, but that doesn't seem to be a problem for building openjdk22.

It is normal not to find any system library in the filesystem on macOS 11 or later:

https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes

New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)

Replying to JD-Veiga:

Well, building tests are not always accurate according to my experience. It is not the first time that I can install a port apparently not supported by my OS version (I am talking about Catalina and older macOSes). I suppose that some subtle differences between actual systems used by users and testing machines make it possible.

Obviously, I do not get any of the "error: invalid version number in '-mmacosx-version-min=11.00.00'" messages that appear in the macport's buildbot log. Maybe they are clang version related? I really do not know.

I deliberately do not update Xcode and the command line tools to the very latest compatible version on most of the buildbot workers. Instead, I keep them at the last version that contains that OS version's SDK, because some software fails to build when the SDK version does not match the OS version. So, for example, as you can see here, the macOS 10.15 buildbot worker uses Xcode 11.7, the last version that contains the macOS 10.15 SDK, rather than Xcode 12.4, the last version compatible with macOS 10.15 but containing the macOS 11 SDK. Certainly, Xcode 11.7, having been released before macOS 11, will be unable to accommodate a request to build for a minimum macOS version of "11.00.00", and software built for a minimum macOS version of 11 would not be guaranteed to run on macOS versions earlier than 11.

Note: See TracTickets for help on using tickets.