tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Preferred (11) JDK and NetBSD



On 11/05, Greg Troxel wrote:
> David Brownlee <abs%absd.org@localhost> writes:
> > This is not an ideal situation for NetBSD, as both adoptopenjdk11-bin
> > and openjdk-bin are Linux binaries. In this case openjdk11 would
> > probably make a better default. Would anyone object to me adjusting
> > this to:
> >
> > +# adoptopenjdk11-bin openjdk-bin do not provide native NetBSD binaries
> > +.if ${OPSYS} == "NetBSD"
> > +_PKG_JVMS.9=           openjdk11 adoptopenjdk11-bin openjdk-bin
> > +.else
> >  _PKG_JVMS.9=           adoptopenjdk11-bin openjdk-bin openjdk11
> > +.endif
> 
> If it builds on all places the linux binary works, no objection from me.
> 
> Aguably we should be picking the source ones first everywhere, as this
> is pkgsrc not pkgbin, as someone eloquently and crankily said earlier.

I'm not even sure "arguably" applies.  Building from source should
always be the default; defaulting to a binary distribution should be the
exception rather than the rule.  So, I'd say that in the above case, the
logic should be inverted to default to source for all platforms and only
add special cases for the platforms that need the binary distribution as
the default.

> But java seems to have a binary culture, so maybe not.

If you mean for the JDK (i.e., the VM and core Java platform), then I'd
say this is because of three main reasons:

1. Historically, the JDK from Sun was closed source, so you could only
   get a binary distribution.

2. Historically, after the release of the JDK source code, it has been
   rather difficult to build it from source.  That is, the code wasn't
   very portable, and the build would fail for some reason or another.

3. Historically, there have been licensing issues where certain parts of
   the core Java platform were proprietary, so then you had this weird
   situation where even if you could successfully build it from source,
   it wasn't actually a fully functional Java platform because some
   parts of the core Java platform were missing!  Ridiculous.

A very frustrating JDK build-from-source situation.  I think this is the
reason for the, in your words, binary culture: it has simply been the
only practical way to get a solid JDK for a long time.  I think this is
starting to change now with OpenJDK, but I suspect it's got a long way
to go.  I haven't tried building from source in a long time, but if it
doesn't build from source as easily as, say, Python or Ruby, on as many
platforms, then I'd say it's not there yet.

One thing I'm glad about, though, is that the JDK has not decided to
self-host: it does not depend on an older version of itself to build
itself (i.e., the VM is not written in Java).  Actually, I'm just
talking about OpenJDK here; I know there are VMs written entirely or
mostly in Java.  Why do so many projects do this?!  I think I know the
answer: it's cool and they'd rather write in their own language and take
advantage of the benefits of their own language.  I get that, but this
makes building from source so much harder, *forever*, from that point
on!  It seems like Go, Haskell, and Rust (and I'm sure others) are in
this category and are rather difficult to build from source compared to,
again, Python or Ruby.

Lewis


Home | Main Index | Thread Index | Old Index