jdk8u: -Wno-regsiter to support newer compilers

Stewart X Addison sxa at redhat.com
Wed Aug 7 11:48:37 UTC 2024


Hi Elazar,

> How is adoptium building it? Does it use specific compiler?

Yes - Adoptium uses our own build of gcc 7.5.0 to build Temurin's jdk8u on
Linux. If you wish to use the same environment as us, the simplest way is
to pull the `adoptopenjdk/centos7_build_image` and use that which will be a
preconfigured environment (replace centos7 with centos6 if on x64 for
exactly the one we use, but 7 will likely work too) and you should be able
to use the temurin-build scripts in that container. The 7.5.0 compiler is
under `/usr/local/gcc` in that image. Other GCC versions are installed
under /usr/local that we use for different versions of the JDK. If you
specifically want to go down the route of creating those containers
yourself from scratch, they are set up using ansible in the dockerfiles
from https://github.com/adoptium/infrastructure/tree/master/ansible/docker.

> FTR using temurin-build repository and scripts, fails for other reasons,
and fails even with -D/--podman docker containers.

Thanks for the info. If you could raise an issue with the details of that
over at https://github.com/adoptium/temurin-build that would be
appreciated. While we don't use those options in the main temurin build
processes they are useful for other users of our scripts and someone has
been updating and testing those options recently (after a bit of
stagnation) to add the support for podman so I believe they should be in a
reasonable state at the moment. Hopefully we can get that fixed if they are
currently misbehaving in some environments.

Hope that helps.

Regards,

Stewart...
--
Working for Red Hat <https://www.redhat.com> on Adoptium Temurin
<https://adoptium.net> and Node.js
<http://nodejs.org>
https://fosstodon.org/@sxa
https://github.com/sxa
<http://nodejs.org>



On Tue, 6 Aug 2024 at 17:37, Magnus Ihse Bursie <
magnus.ihse.bursie at oracle.com> wrote:

> Hi Elazar,
>
> I see that you never got any replies here. I suggest that you re-ask
> your question on the jdk8u mailing list instead (cc'd).
>
> /Magnus
>
> On 2024-07-19 16:20, Elazar Leibovich wrote:
> > When trying to compile the latest jdk8u on linux I get failures over
> > warnings with the register keywords.
> >
> > I'm using https://github.com/openjdk/jdk8u-dev.git which seems to be
> > pretty up to date (I'm using master), and last commit is less than two
> > days ago.
> >
> > This is a workaround I had to use:
> > diff --git a/hotspot/make/linux/makefiles/gcc.make
> > b/hotspot/make/linux/makefiles/gcc.make
> > index 7dde7f0963..81f156574a 100644
> > --- a/hotspot/make/linux/makefiles/gcc.make
> > +++ b/hotspot/make/linux/makefiles/gcc.make
> > @@ -202,7 +202,7 @@ else
> >  endif
> >
> >  # Compiler warnings are treated as errors
> > -WARNINGS_ARE_ERRORS = -Werror
> > +WARNINGS_ARE_ERRORS = -Werror -Wno-register
> >
> > But I guess the best solution is to remove the register keywords from
> > the codebase.
> >
> > How is adoptium building it? Does it use specific compiler? Is the
> > supported compiler documented anywhere?
> >
> > FTR using temurin-build repository and scripts, fails for other
> > reasons, and fails even with -D/--podman docker containers.
> >
> > This patch builds it with centos stream 9 on amd64.
> >
> > Am I doing something wrong? What's the recommended way of building jdk8?
> >
> > Thanks,
> > Elazar Leibovich
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20240807/54e5bfa7/attachment.htm>


More information about the build-dev mailing list