[MacPorts] #69474: 'port install openjdk8-openj9' oddities

MacPorts noreply at macports.org
Mon Mar 11 07:52:08 UTC 2024


#69474: 'port install openjdk8-openj9' oddities
------------------------------+----------------------
  Reporter:  jf               |      Owner:  breun
      Type:  defect           |     Status:  assigned
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:
Resolution:                   |   Keywords:
      Port:  openjdk8-openj9  |
------------------------------+----------------------
Changes (by ryandesign):

 * owner:  (none) => breun
 * status:  new => assigned
 * keywords:  openjdk8-openj9 =>


Comment:

 Replying to [ticket:69474 jf]:
 > 1: it looks like `port install` does not (is this a macports issue?
 surely not?) detect my CPU type (I am on Apple Silicon). After `port
 install`, running `java -version` produces
 > {{{
 > exec failed: Error Domain=NSPOSIXErrorDomain Code=86 "Bad CPU type in
 executable" UserInfo={NSLocalizedFailureReason=Failed to execute
 /opt/local/Library/Java/JavaVirtualMachines/openjdk8-openj9/Contents/Home/bin/java:
 Bad CPU type in executable}
 > }}}

 On an Apple Silicon Mac you should still be able to run x86_64 software,
 at least if you have installed Rosetta 2.

 What is the architecture of that executable? (Find out with `file
 /opt/local/Library/Java/JavaVirtualMachines/openjdk8-openj9/Contents/Home/bin/java`)

 For what architecture does MacPorts think it has installed the port? (Find
 out with `port -v installed openjdk8-openj9`)

 > 2: During a port install I see this scrolling by (multiple times, in
 fact):
 > {{{
 > Warning: openjdk8-openj9 installs files outside the common directory
 structure.
 > }}}
 >
 > This doesn't really help (especially if the `port install` fails; but
 that's another issue). I'm assuming this message is letting me know that I
 need to do further cleanup after `port uninstall`? if that's not the case
 it should make it clear so that there's no confusion.

 No, it does not mean that. It means the port installs to unusual places
 (i.e. not /opt/local, /Applications/MacPorts, or /Library/LaunchDaemons).
 A comment in the Portfile explains why it does this:

 {{{#!tcl
 # macOS Java tools expect to find Java virtual machines under
 /Library/Java/JavaVirtualMachines, which is not under ${prefix}.
 }}}

 MacPorts will still uninstall those files from those unusual locations
 properly. The warning comes from MacPorts base, not from this port, so if
 you want it to change, file a separate ticket against MacPorts base.

-- 
Ticket URL: <https://trac.macports.org/ticket/69474#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list