Skip to content

Modifications to ensure compatibility with OpenXL and xlC on AIX - #7561

Merged
jdmpapin merged 2 commits into
eclipse-omr:masterfrom
midronij:openxl-final
Dec 16, 2024
Merged

jdmpapin merged 2 commits into
eclipse-omr:masterfrom
midronij:openxl-final

Conversation

@midronij

Copy link
Copy Markdown
Contributor

Modify compiler flags, macros, and linked libraries to ensure that OMR can be built with both OpenXL and xlC on AIX.

Updated version of #7447 and #7480

@midronij

Copy link
Copy Markdown
Contributor Author

@zl-wang here is the new OpenXL PR for OMR. Marked as a WIP since I'm still addressing the remaining review comments from Ishita's PRs

@midronij

Copy link
Copy Markdown
Contributor Author

I've just finished addressing the review comments from the previous version of this PR. @keithc-ca @zl-wang when you have a moment could you take a look to ensure that I didn't miss anything/provide any further feedback?

Comment thread compiler/control/OptimizationPlan.hpp Resolved
Comment thread compiler/cs2/bitmanip.h Resolved
Comment thread compiler/infra/Bit.hpp Resolved
Comment thread compiler/runtime/Runtime.cpp Resolved
Comment thread include_core/AtomicSupport.hpp Resolved
Comment thread port/unix/omrsignal.c Resolved
Comment thread util/omrutil/gettimebase.c Resolved
Comment thread configure Outdated
CC="$ac_save_CC $ac_arg"
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_c89=$ac_arg
if [ "$OMR_ENV_OPENXL" == "1" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be derived from configure.ac (which is not modified by this change).
How would OMR_ENV_OPENXL be defined? (Hint: it's not from OmrDetectSystemInformation.cmake).

@midronij midronij Nov 29, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is the solution you have in mind, but I opted to replace the check on OMR_ENV_OPENXL with the following condition:

if [[ "$CC" =~ 'ibm-clang' ]] && [[ "$CXX" =~ 'ibm-clang' ]]; then

since CC and CXX are both used in configure.ac, and when OpenXL being used, they should be set to the following:

* C Compiler:     Version 17.0.6 (at /opt/IBM/openxlC/17.1.2/bin/ibm-clang_r)
* C++ Compiler:   Version 17.0.6 (at /opt/IBM/openxlC/17.1.2/bin/ibm-clang++_r)

Is this a viable alternative?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

watch out for possible conflict with zOS using wyvern compiler:

  1. do they have the same names?
  2. if yes, can they use whatever under that condition?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The zOS installation of OpenXL does indeed use the same name. And I don't think there's anything under that condition that's incompatible with zOS, but I will test that out before we proceed just to make sure.

@midronij
midronij force-pushed the openxl-final branch 3 times, most recently from c1a8ebd to d3634f0 Compare December 3, 2024 16:15
@midronij midronij changed the title WIP: Modifications to ensure compatibility with OpenXL and xlC on AIX Modifications to ensure compatibility with OpenXL and xlC on AIX Dec 3, 2024

@dsouzai dsouzai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks fine to me; just had some questions and minor suggestions.

Comment thread compiler/ras/DebugCounter.cpp Resolved
Comment thread compiler/ras/DebugCounter.cpp Resolved
Comment thread configure Resolved
Comment thread configure Resolved
Comment thread tools/configure Resolved

@dsouzai dsouzai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, could you squash the commits?

To ensure that OMR can be built on AIX with both OpenXL and xlC, make
modifications to compiler flags, macros, and linked libraries.

Signed-off-by: midronij <jackie.midroni@ibm.com>
Initialize nlen, tindex, and myTag in TR_PPCTableOfConstants::lookUp()
to prevent unexpected behavior when building with OpenXL on AIX.

Signed-off-by: midronij <jackie.midroni@ibm.com>
@dsouzai

dsouzai commented Dec 11, 2024

Copy link
Copy Markdown
Contributor

jenkins build all

@jdmpapin

Copy link
Copy Markdown
Contributor

Windows and z/OS builds failed due to a lack of machines. RV ran into some groovy error

Jenkins build riscv

@jdmpapin

Copy link
Copy Markdown
Contributor

The RV problem happened again, but it looks like it's been happening in other PR builds as well

@jdmpapin
jdmpapin merged commit 470ed10 into eclipse-omr:master Dec 16, 2024
@keithc-ca

Copy link
Copy Markdown
Contributor

I would like to have answers to my questions (see #7561 (comment)):

  • Why is configure.ac not modified?
  • Why is OMR_ENV_OPENXL added to the environment for cmake builds?

@jdmpapin

jdmpapin commented Jan 6, 2025

Copy link
Copy Markdown
Contributor

@midronij ^

@midronij

midronij commented Jan 6, 2025 •

Copy link
Copy Markdown
Contributor Author

@keithc-ca

Why is configure.ac not modified?

As I understood it, the issue here was that the OMR_ENV_OPENXL variable was being used in configure without adding a definition for it in configure.ac. I am not the original author of this particular change, so admittedly I am not entirely certain of the motivation behind this approach. That being the case, I opted to replace this condition with a check on an already existing variable, CC:

omr/configure

Line 3767 in b2f9c71

if [[ "$CC" =~ 'ibm-clang' ]]; then

Is this a viable alternative? If not, then I am more than happy to fix it.

Why is OMR_ENV_OPENXL added to the environment for cmake builds?

I don't see OMR_ENV_OPENXL being used in any cmake files aside from OmrDetectSystemInformation.cmake, which is where it's set, so I believe that it can be removed, and should be defined for the UMA build instead. My apologies for the oversight.

I will open a PR for the necessary additional changes and link it here when it's ready. Here is the PR: #7605

@keithc-ca

Copy link
Copy Markdown
Contributor

In OMR, the only use of OMR_ENV_OPENXL that I see is in omrmakefiles/rules.aix.mk, so I don't see how it relates to my question about configure.ac (from which configure should be derived).

I'm glad to hear you plan to remove the definition of OMR_ENV_OPENXL for cmake builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants