Opened 3 years ago

Last modified 3 years ago

#63345 closed defect

openjdk16-temurin @16.0.2_0: libjli.dylib code signature invalid after upgrading to new openjdk16-temerin — at Version 2

Reported by: JD-Veiga Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: nils@…
Port: openjdk16-temurin

Description (last modified by JD-Veiga)

Hi,

I have been experienced difficulties with Java after upgrading openjdk16 to version 16.0.2 (which adds port openjdk16-temurin).

When I try to run Eclipse from terminal, I got the following message:

Error loading /Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/MacOS/libjli.dylib:  dlopen(/Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/MacOS/libjli.dylib, 265): no suitable image found.  Did find:
	/Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/MacOS/libjli.dylib: code signature invalid for '/Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/MacOS/libjli.dylib'

Conversely, when I ran Eclipse from its icon (app), I got a different message:

The JVM shared library "/Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/Home/bin/../lib/server/libjvm.dylib"
does not contain the JNI_CreateJavaVM symbol.

However, I think that the ultimate cause could be that libjli.dylib is not properly signed.

Whatever the cause, both libjli.dylib and libjvm.dylib exist in their corresponding directories.

I am running:

  • macos Mojave 10.14.6
  • MacPorts 2.7.1

Thanks a lot.

Change History (2)

comment:1 Changed 3 years ago by breun (Nils Breunese)

MacPorts doesn't build or sign these files, MacPorts just installs the Eclipse Temurin binary distribution and on my machine (macOS Big Sur 11.5.1) both libjli.dylib and libjvm.dylib seem OK:

❯ codesign -v -v /Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/MacOS/libjli.dylib          
/Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/MacOS/libjli.dylib: valid on disk
/Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/MacOS/libjli.dylib: satisfies its Designated Requirement
❯ codesign -v -v /Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/Home/lib/server/libjvm.dylib      
/Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/Home/lib/server/libjvm.dylib: valid on disk
/Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/Home/lib/server/libjvm.dylib: satisfies its Designated Requirement

Can you check the output of these commands on your machine?

By running Eclipse, do you mean Eclipse IDE (https://www.eclipse.org/eclipseide/)? I don't use this myself, but according to https://www.eclipse.org/downloads/packages/installer the latest installer includes a JRE to run the IDE.

There is also the openjdk16-zulu port which provides the Azul Zulu build of OpenJDK 16. Maybe you could try to see if that one works for you?

Last edited 3 years ago by breun (Nils Breunese) (previous) (diff)

comment:2 Changed 3 years ago by JD-Veiga

Description: modified (diff)
Note: See TracTickets for help on using tickets.