On Tue, May 23, 2023 at 3:39 PM Matthew Benedict de Detrich
<[email protected]> wrote:
> The Pekko SBT build is currently configured to detect Java 8 installation via
> the JAVA_8_HOME environment variable (see
> https://github.com/apache/incubator-pekko/blob/85c2a469098abd064738dbf9bb50f3cc271dc73b/project/JdkOptions.scala#L94
> ).
>
> The reason why the ubuntu docker images/github actions CI can build Pekko
> without any additional JDK configuration/work is
> that the ubuntu image is already preinstalled with various JDK's installed
> with the relevant JAVA_<VERSION>_HOME
> environment variables exposed.

This might be drifting off-topic/too far down the rabbithole, but:
when JAVA_8_HOME is not set the build will fall back to auto-detecting
common JDK 8 installation directories using (ultimately) the logic at
https://github.com/sbt/sbt/blob/71adb62d86b976e0e08cbffbe66a1b56031d36fd/main/src/main/scala/sbt/internal/CrossJava.scala#L485
. I'm fairly sure Ubuntu doesn't set JAVA_8_HOME, but that logic
correctly discovers JDKs installed from the Ubuntu packages, so all is
well in the end :)


Kind regards,

Arnout

> On Tue, May 23, 2023 at 3:28 PM Claude Warren, Jr
> <[email protected]> wrote:
>
> > I have seen other packages that required the rt.jar from java8 be installed
> > in a specific directory for the build.  Something like the /lib directory.
> > I am trying to find that project to see if I can figure out what they did
> > and how it might work for Pekko.
> >
> >
> > On Tue, May 23, 2023 at 2:09 PM Matthew Benedict de Detrich
> > <[email protected]> wrote:
> >
> > > > But more to the point here, is there a Dockerfile to build the Docker
> > > image?
> > >
> > > There is an in progress PR at
> > > https://github.com/apache/incubator-pekko/pull/188
> > >
> > > >  Can we spell out how to configure a standard linux system to build
> > > Pekko without the docker image?
> > >
> > > Not entirely sure what you mean by "standard linux system to build".
> > > Linux's have
> > > different distributions/package managers and most developers install
> > things
> > > like
> > > OpenJDK via a package manager. While that in of itself is not
> > problematic,
> > > the issue
> > > here is the "multiple installs" part (or to be more accurate you need
> > > OpenJDK 11
> > > to be installed and you have to download a distribution of OpenJDK 8 to
> > get
> > > the
> > > rt.jar so that Pekko can compile sources that refer to sun.misc.unsafe
> > and
> > > feed that
> > > into sbt). There are other solutions like sdkman which can handle
> > multiple
> > > JDK
> > > installs, but the obvious issue here is the explosion of installation
> > > instructions (
> > > also this presumes that developers primary machines are Linux).
> > >
> > > The one big advantage that the Docker build has (aside from it just
> > working
> > > on any major OS) is that it uses the same docker image that github
> > actions
> > > does
> > > (at least this appears to be the case from a cursory glance).
> > >
> > > I will try and spend some time getting
> > > https://github.com/apache/incubator-pekko/pull/188
> > > finished and merged this week.
> > >
> > > On Tue, May 23, 2023 at 3:00 PM Claude Warren, Jr
> > > <[email protected]> wrote:
> > >
> > > > >
> > > > > Also I would like to point out/remind that even though making a
> > source
> > > > > package release is important
> > > > > for Apache, it's useless for Pekko's users. It's been stated many
> > times
> > > > on
> > > > > the mailing list that the people
> > > > > actually using Pekko ultimately only care about the maven binary jars
> > > > (i.e.
> > > > > 1.0.0 release) and that a lot
> > > > > of potential contributors are waiting for that 1.0.0 maven jar binary
> > > > > release. The ironic thing here is that
> > > > > we already have a method of creating proper artifacts, it's just done
> > > by
> > > > > github actions CI which doesn't
> > > > > adhere to Apache's processes for a release and that is an example of
> > > > what's
> > > > > making it more complicated
> > > > > (otherwise we could have been pushing RC's weeks/months ago).
> > > > >
> > > > >
> > > > I want to point out that most of the projects I work on are libraries,
> > > and
> > > > as you say most users just want the binary packages.
> > > >
> > > > But more to the point here, is there a Dockerfile to build the Docker
> > > > image?   Can we spell out how to configure a standard linux system to
> > > build
> > > > Pekko without the docker image?
> > > >
> > > > Claude

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to