<div dir="ltr">Thanks,<div>I still fail to understand how JDK8u developers are building the project.</div><div>Is there a docker file specifying the build environment? What's the recommended way of doing that?</div><div>Removing the register keyword, plus disabling an overflow warning in a specific test with pragma did the trick for me, but:<br>1. I could not get it built in Mac OS X<br>2. I felt as if I'm paving my own path building it, instead of following the Yellow Brick Road, which I'm trying to locate.</div><div><br></div><div>Thanks again,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 6 Aug 2024 at 21:10, Zdeněk Žamberský <<a href="mailto:zzambers@redhat.com">zzambers@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
this is known issue, which should get fixed by JDK-8281096:<br>
<a href="https://github.com/openjdk/jdk8u-dev/pull/357" rel="noreferrer" target="_blank">https://github.com/openjdk/jdk8u-dev/pull/357</a><br>
<br>
(see also: <a href="https://github.com/openjdk/jdk8u-dev/pull/508" rel="noreferrer" target="_blank">https://github.com/openjdk/jdk8u-dev/pull/508</a>)<br>
<br>
TLDR:<br>
Jdk 8 explicitly specifies older c++ version (gnu++98, which not yet <br>
deprecated<br>
'register' keyword), but flags are not propagated to ADLC build due to bug.<br>
(correct me, if I am wrong)<br>
<br>
<br>
When it comes to Adoptium, I don't know exactly, but I think they are using<br>
older compiler, which uses older c++ standard by default.<br>
<br>
On 06. 08. 24 18:37, Magnus Ihse Bursie wrote:<br>
> Hi Elazar,<br>
><br>
> I see that you never got any replies here. I suggest that you re-ask <br>
> your question on the jdk8u mailing list instead (cc'd).<br>
><br>
> /Magnus<br>
><br>
> On 2024-07-19 16:20, Elazar Leibovich wrote:<br>
>> When trying to compile the latest jdk8u on linux I get failures over <br>
>> warnings with the register keywords.<br>
>><br>
>> I'm using <a href="https://github.com/openjdk/jdk8u-dev.git" rel="noreferrer" target="_blank">https://github.com/openjdk/jdk8u-dev.git</a> which seems to be <br>
>> pretty up to date (I'm using master), and last commit is less than <br>
>> two days ago.<br>
>><br>
>> This is a workaround I had to use:<br>
>> diff --git a/hotspot/make/linux/makefiles/gcc.make <br>
>> b/hotspot/make/linux/makefiles/gcc.make<br>
>> index 7dde7f0963..81f156574a 100644<br>
>> --- a/hotspot/make/linux/makefiles/gcc.make<br>
>> +++ b/hotspot/make/linux/makefiles/gcc.make<br>
>> @@ -202,7 +202,7 @@ else<br>
>> endif<br>
>><br>
>> # Compiler warnings are treated as errors<br>
>> -WARNINGS_ARE_ERRORS = -Werror<br>
>> +WARNINGS_ARE_ERRORS = -Werror -Wno-register<br>
>><br>
>> But I guess the best solution is to remove the register keywords from <br>
>> the codebase.<br>
>><br>
>> How is adoptium building it? Does it use specific compiler? Is the <br>
>> supported compiler documented anywhere?<br>
>><br>
>> FTR using temurin-build repository and scripts, fails for other <br>
>> reasons, and fails even with -D/--podman docker containers.<br>
>><br>
>> This patch builds it with centos stream 9 on amd64.<br>
>><br>
>> Am I doing something wrong? What's the recommended way of building jdk8?<br>
>><br>
>> Thanks,<br>
>> Elazar Leibovich<br>
><br>
<br>
-- <br>
Zdeněk Žamberský<br>
OpenJDK QE<br>
Red Hat<br>
<br>
</blockquote></div>