Opened 7 months ago

Last modified 7 months ago

#68450 new defect

AppleCommander @1.8.0: missing required Java version

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: AppleCommander

Description

AppleCommander fails to build if Java is not installed:

https://build.macports.org/builders/ports-13_x86_64-builder/builds/52558/steps/install-port/logs/stdio

--->  Building AppleCommander
DEBUG: Executing org.macports.build (AppleCommander)
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_emulators_AppleCommander/AppleCommander/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
GRADLE_USER_HOME='/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_emulators_AppleCommander/AppleCommander/work/gradle'
JAVA_HOME=''
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='13.0'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
Executing:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_emulators_AppleCommander/AppleCommander/work/AppleCommander" && ./gradlew assemble 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_emulators_AppleCommander/AppleCommander/work/AppleCommander" && ./gradlew assemble 
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.

It succeeds if, for example, the openjdk11 port is installed.

The port already includes the java 1.0 portgroup. What else must I do to get this port to use a MacPorts Java, if a system Java is not already installed?

Change History (1)

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

Summary: AppleCommander @1.6.0: The operation couldn’t be completed. Unable to locate a Java Runtime.AppleCommander @1.8.0: missing required Java version

I updated AppleCommander to 1.8.0 which now requires Java 11 or later so I added this to the Portfile:

java.version        11

Then the build failed with:

DEBUG: java-portgroup: Trying to find JVM version: 11
DEBUG: java-portgroup: Detected JVMs: 17 /opt/local/Library/Java/JavaVirtualMachines/openjdk17-zulu/Contents/Home
DEBUG: Discovered JAVA_HOME via /usr/libexec/java_home: /opt/local/Library/Java/JavaVirtualMachines/openjdk17-zulu/Contents/Home
DEBUG: Adding dependency on JDK fallback openjdk17-zulu
Error: AppleCommander requires Java 11 but no such installation could be found.
Error: Failed to fetch AppleCommander: missing required Java version

This led me to think that what I specified above was unintentionally an exact version requirement. While I think it's weird that the java portgroup installed a version different from the one I said I needed, and then complained about it, I changed it, hopefully, to allow the use of Java 11 or later:

java.version        11+

But this then failed to build with:

DEBUG: java-portgroup: Trying to find JVM version: 11+
DEBUG: No value for java JAVA_HOME was automatically discovered
DEBUG: Adding dependency on JDK fallback openjdk17-zulu
Error: AppleCommander requires Java 11+ but no such installation could be found.
Error: Failed to fetch AppleCommander: missing required Java version

Evidently I have no idea how to use the java portgroup.

Note: See TracTickets for help on using tickets.