Would not build due to '-source 1.6' and OpenJDK12 requires '-source 7' when: JAVA_VERSION=12.0 JAVA_VENDOR=openjdk Please see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237054
Created attachment 204473 [details] Patch for CMakeLists.txt to allow building with OpenJDK 12
Great, thank you for the report. I can take a look this weekend.
Looks like this is waiting on bsd.java.mk changes to allow 12.0 to be specified as the JAVA_VERSION. Is there an expected time for this to land in the tree? When testing the options provided, I receive this error: facter-3.13.2_1: Makefile error: "12.0" is not a valid value for JAVA_VERSION. It should be one or more of: 1.6 1.7 1.8 1.9 (with an optional "+" suffix.)
(In reply to Zach Leslie from comment #3) When I originally submitted the patch to allow JDK 11 & 12, I kept it 11.0 and 12.0 to conform previous versioning scheme x.y. However, it was suggested, which I also agree, to drop decimal and use integers ($FEATURE) as Oracle did starting with Java 9: $FEATURE.$INTERIM.$UPDATE.$PATCH $FEATURE — The feature-release counter, incremented for every feature release regardless of release content. Features may be added in a feature release; they may also be removed, if advance notice was given at least one feature release ahead of time. Incompatible changes may be made when justified. $INTERIM — The interim-release counter, incremented for non-feature releases that contain compatible bug fixes and enhancements but no incompatible changes, no feature removals, and no changes to standard APIs. $UPDATE — The update-release counter, incremented for compatible update releases that fix security issues, regressions, and bugs in newer features. $PATCH — The emergency patch-release counter, incremented only when it's necessary to produce an emergency release to fix a critical issue. from https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.Version.html Furthermore, because of the current bsd.java.mk doesn't allow specific usage and selects the most current ie 1.8 for now, I've recently submitted the patch to use DEFAULT_VERSIONS+=java=11 where valid versions: 1.6 1.7 1.8 11 12 JAVA_VERSION is used by ports r1.6[+] 1.7[+] 1.8[+] 11[+] 12[+]. Please see BR 237054. Thus, if you use my proposed latest patch from BR 237054 and specify DEFAULT_VERSIONS+=java=12, you'll get the error I mentioned. I've also submitted various patches: BR 238092: java/openjdk11 missing javawrapper - any port build or applications would fail if JDK 11 is the only JDK in the system BR 237991: java/openjdk12 missing javawrapper - any port build or applications would fail if JDK 12 is the only JDK in the system BR 223304: java/javavmwrapper - update to use same versioning as BR 273054 and remove outdated versions. I guess this probably would have to wait for BR 237054, 238092, 237991, and 223304 to officially committed :)
hmm... somehow the r got in the version 1.6. It should be just 1.6[+]