pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lang/sun-jdk7 and lang/oracle-jdk8 not using built-in
* On 2016-02-15 at 06:17 GMT, J. Lewis Muir wrote:
> On 2/14/16 10:20 AM, Jonathan Perkin wrote:
> > * On 2016-02-14 at 14:21 GMT, J. Lewis Muir wrote:
> >> Now, back to the JDKs. I try apache-ant, and IS_BUILTIN.sun-jdk7 is
> >> empty:
> >>
> >> ===
> >> $ cd devel/apache-ant
> >> $ bmake show-var VARNAME=IS_BUILTIN.sun-jdk7
> >>
> >> ===
> >>
> >> So, this doesn't seem to be working. Ideas?
> >
> > The logic which handles this is mk/java-vm.mk. So, first check that
> > PKG_JVM is actually pointing at sun-jdk7 in your case, and then show
> > the _JRE_PKGSRCDIR variable to see which JRE buildlink is pulling in.
> >
> > Note that it is the JRE buildlink that is included, not the JDK, so in
> > your case would be "sun-jre7".
>
> Hi, Jonathan!
>
> Aha, again! Thank you for pointing out that I should be looking at
> IS_BUILTIN.sun-jre7, not IS_BUILTIN.sun-jdk7! I didn't realize the JRE
> was expected for apache-ant, and I had deleted the Oracle JRE 8 that
> came with the JDK 8 and had forgotten about that.
>
> After installing the Oracle JDK 8 again (to reinstall the JRE since it
> comes bundled with the JDK), now things work:
>
> ===
> $ cd devel/apache-ant
> $ bmake show-var VARNAME=PKG_JVM_DEFAULT
> sun-jdk7
> $ bmake show-var VARNAME=IS_BUILTIN.sun-jre7
> yes
> ===
>
> I can imagine some saying that I shouldn't delete the JRE, and that's
> fair enough, but part of me wishes I could delete it and that the JDK
> could satisfy a JRE dependency since the JDK is a superset of the JRE.
> Taking devel/apache-ant as an example, even though I had the built-in
> JDK, I couldn't build the apache-ant package because I didn't have the
> built-in JRE (even though the built-in JDK has everything the built-in
> JRE has). But maybe that makes things complicated or even confusing
> when it comes to dependency management, built-ins vs. pkgsrc packages,
> and expressing what is really desired.
>
> On another note, since the JRE is installed to
>
> /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
>
> there's no way for more than one version of a JRE to be installed at the
> same time. In my case, what's installed there is the JRE that came with
> the JDK 8:
>
> ===
> $ cd /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
> $ ./bin/java -version
> java version "1.8.0_74"
> Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
> Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
> ===
>
> However, as noted above for devel/apache-ant, "bmake show-var
> VARNAME=IS_BUILTIN.sun-jre7" reported "yes", but the JRE is actually
> Oracle JRE 8.
In that case we should add some logic to handle this correctly. If on
Darwin we could use /usr/libexec/java_home to set PKG_JVM and the
resulting variables correctly.
Do you want to have a go at adding this?
Cheers,
--
Jonathan Perkin - Joyent, Inc. - www.joyent.com
Home |
Main Index |
Thread Index |
Old Index