eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 722 forks source link

Update xlc compiler version #19098

Open keithc-ca opened 8 months ago

keithc-ca commented 8 months ago

The minimum was changed to 17.1.1.4 in https://github.com/ibmruntimes/openj9-openjdk-jdk/commit/b0474fc291128169f16db15b6cf616a59568cec5. A warning is now generated at configuration time - see https://openj9-jenkins.osuosl.org/job/Build_JDKnext_ppc64_aix_OpenJDK/633:

[2024-03-07T05:41:51.867Z] configure: WARNING: You are using xlc 16.01.0000.0011 which is older than 17.1.1.4. This is not a supported configuration.
pshipton commented 8 months ago

Yes we should update the head stream. Afaik xlc 17 options aren't compatible with xlc 16 options so we can't just switch. We need to add support to OpenJ9/OMR to use the correct option syntax.

keithc-ca commented 8 months ago

The options can't be too different or the build would have failed (if openjdk used xlc 17 options that xlc 16 doesn't understand), although it's possible that OpenJ9 or OMR use options that won't work as is with xlc 17.

pshipton commented 8 months ago

OpenJDK added support for xlc 17, if we tried to do a build using it OpenJDK would detect xlc 17 and do the appropriate thing.

keithc-ca commented 8 months ago

I don't see anything that's sensitive to the version of xlc (other than the warning that 16.1 is unsupported), got an example?

pshipton commented 8 months ago

I think it was a misunderstanding on my part. Looking back when I asked for xlC 17 to be installed on a machine, it seems I only got openxlC / ibm-clang, which uses different options. At the time I must have thought that was the only option. I've again requested getting xlc 17 installed in order to give it a try.

pshipton commented 8 months ago

There is https://github.com/ibmruntimes/openj9-openjdk-jdk22/commit/2e9cfe2d806

keithc-ca commented 8 months ago

Yes ibm-clang is very different from xlc (which openjdk mistakenly refers to as "Open XL").

pshipton commented 8 months ago

ibm-clang comes in a directory called openxlC. I'm not yet 100% sure there is anything else. https://www.ibm.com/products/open-xl-cpp-aix-compiler-power describes Open XL and links to "classic compilers" https://www.ibm.com/docs/en/xl-c-and-cpp-aix which only includes up to 16.

keithc-ca commented 8 months ago

It's my understanding that ibm-clang is the name of an executable in "Open XL"; IBM doesn't refer to the toolchain that includes xlc as "Open" (even though openjdk does) - that's the "classic" toolchain.

pshipton commented 8 months ago

Checking with Julian about 17, "macro(s) and options are not compatible anymore". There is an ongoing effort to get OpenJ9 working.

keithc-ca commented 7 months ago

The complaint has been upgraded to an error; see https://openj9-jenkins.osuosl.org/job/Build_JDKnext_ppc64_aix_OpenJDK/635 where the configure step fails:

[2024-03-15T14:50:21.167Z] configure: Using default toolchain clang (clang/LLVM)
[2024-03-15T14:50:21.167Z] configure: Will use user supplied compiler CC=xlclang
[2024-03-15T14:50:21.422Z] checking for xlclang... /opt/IBM/xlC/16.1.0/bin/xlclang
[2024-03-15T14:50:21.422Z] checking resolved symbolic links for CC... /opt/IBM/xlC/16.1.0/bin/xlclang++
[2024-03-15T14:50:21.422Z] configure: The C compiler (located as /opt/IBM/xlC/16.1.0/bin/xlclang) does not seem to be the required clang compiler.
[2024-03-15T14:50:21.422Z] configure: The result from running with --version was: "IBM XL C/C++ for AIX, V16.1.0  (5725-C72, 5765-J12)
[2024-03-15T14:50:21.422Z] Version: 16.01.0000.0011"
[2024-03-15T14:50:21.422Z] configure: error: A clang compiler is required. Try setting --with-tools-dir.
[2024-03-15T14:50:21.677Z] configure exiting with result code 1

A compiler that says "clang" in the version output is required.

pshipton commented 7 months ago

We could try removing the error to see if it works anyway. It may be some time before OpenJ9 is ready to build with Open XL 17.

keithc-ca commented 7 months ago

I started an internal build with 8327701: Remove the xlc toolchain reverted. It has gotten past the configuration issue. I'll create a pull request for that change if all goes well.

keithc-ca commented 7 months ago

Internally, it didn't go as smoothly as I had hoped: trying externally via https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/757.

pshipton commented 7 months ago

SHAs for the last acceptance build where AIX compiled using xlc 16. OpenJ9: ae0c76e4fdb OMR: 107d389e6a3 OpenJDKnext: a8c3007f8fb - openj9-openjdk-jdk

keithc-ca commented 6 months ago

We need not delay use of OpenXL 17 until OpenJ9 and OMR can build with that compiler; jdknext can be configured using --with-openj9-cc and --with-openj9-cxx so OpenJ9 and OMR can continue to use xlc.

pshipton commented 6 months ago

Should we be doing that rather than merging https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/757 ?

pshipton commented 6 months ago

To answer my own question, we don't have machines ready to support using Open XL 17.

keithc-ca commented 6 months ago

Even if we did have suitable machines, I wouldn't expect them to be updated immediately, so I suggest https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/757 be merged for now; we can revert those changes when we have Open XL 17 installed.