Bug 237990 - sysutils/facter: allow building when OpenJDK 12 is used in make.conf
Summary: sysutils/facter: allow building when OpenJDK 12 is used in make.conf
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: FreeBSD Puppet Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-20 02:24 UTC by Tommy P
Modified: 2019-05-28 04:10 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (puppet)


Attachments
Patch for CMakeLists.txt to allow building with OpenJDK 12 (435 bytes, patch)
2019-05-20 02:26 UTC, Tommy P
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tommy P 2019-05-20 02:24:56 UTC
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
Comment 1 Tommy P 2019-05-20 02:26:05 UTC
Created attachment 204473 [details]
Patch for CMakeLists.txt to allow building with OpenJDK 12
Comment 2 Zach Leslie freebsd_committer 2019-05-24 04:44:05 UTC
Great, thank you for the report.  I can take a look this weekend.
Comment 3 Zach Leslie freebsd_committer 2019-05-27 20:30:03 UTC
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.)
Comment 4 Tommy P 2019-05-28 04:05:53 UTC
(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 :)
Comment 5 Tommy P 2019-05-28 04:08:17 UTC
hmm... somehow the r got in the version 1.6.  It should be just 1.6[+]