Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove macro redefinitions that cause issues with Open XL #7413

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Deigue
Copy link
Contributor

@Deigue Deigue commented Jul 18, 2024

Couple instances where the toupper() and tolower() macros are undef and re-defined that cause problems with the native headers. These may be unnecessary and are removed.

@r30shah
Copy link
Contributor

r30shah commented Jul 26, 2024

jenkins build zos

@0xdaryl 0xdaryl self-assigned this Jul 30, 2024
@0xdaryl
Copy link
Contributor

0xdaryl commented Jul 30, 2024

Can you confirm this builds successfully with OpenJ9 (mainly because that is a broader test base than what OMR provides)?

@keithc-ca FYI since it is in DDR code.

@keithc-ca
Copy link
Member

That OMR build specifies -DOMR_DDR=OFF, so it doesn't exercise this change.
DDR tooling doesn't use tolower() or toupper(), so the declarations from the compile should be irrelevant.

I did notice that the macros in stricmp.c are just wrong for EBCDIC (letters are not contiguous).

@keithc-ca
Copy link
Member

Can you confirm this builds successfully with OpenJ9

I assume this question is for @Deigue.

@0xdaryl
Copy link
Contributor

0xdaryl commented Jul 30, 2024

I assume this question is for @Deigue.

Yes, the author.

Couple instances where the toupper() and tolower() macros
are undef and re-defined that cause problems with the
native headers. These may be unnecessary and are removed.

Signed-off-by: Gaurav Chaudhari <[email protected]>
@Deigue
Copy link
Contributor Author

Deigue commented Aug 7, 2024

j21 build actually seems like it is not passing with the changes

[2024-08-07T15:30:14.624Z] [  0%] Building CXX object runtime/j9vm31/CMakeFiles/jvm31.dir/jnimisc.cpp.o
[2024-08-07T15:30:15.039Z] "/usr/include/xlocale", line 673.33: CCN5816 (W) Too many arguments are specified for the macro "tolower". The extra arguments are ignored.
[2024-08-07T15:30:15.039Z] "/jenkins/workspace/Build_JDK21_s390x_zos_Personal/omr/cmake/modules/platform/os/../../../../util/a2e/headers/ctype.h", line 97.25: CCN5425 (I) "tolower" is defined on line 97 of "/jenkins/workspace/Build_JDK21_s390x_zos_Personal/omr/cmake/modules/platform/os/../../../../util/a2e/headers/ctype.h".
[2024-08-07T15:30:15.039Z] "/usr/include/xlocale", line 677.33: CCN5816 (W) Too many arguments are specified for the macro "toupper". The extra arguments are ignored.
[2024-08-07T15:30:15.039Z] "/jenkins/workspace/Build_JDK21_s390x_zos_Personal/omr/cmake/modules/platform/os/../../../../util/a2e/headers/ctype.h", line 96.25: CCN5425 (I) "toupper" is defined on line 96 of "/jenkins/workspace/Build_JDK21_s390x_zos_Personal/omr/cmake/modules/platform/os/../../../../util/a2e/headers/ctype.h".
[2024-08-07T15:30:15.039Z] "/usr/include/xlocale", line 806.33: CCN5816 (W) Too many arguments are specified for the macro "tolower". The extra arguments are ignored.
[2024-08-07T15:30:15.039Z] "/jenkins/workspace/Build_JDK21_s390x_zos_Personal/omr/cmake/modules/platform/os/../../../../util/a2e/headers/ctype.h", line 97.25: CCN5425 (I) "tolower" is defined on line 97 of "/jenkins/workspace/Build_JDK21_s390x_zos_Personal/omr/cmake/modules/platform/os/../../../../util/a2e/headers/ctype.h".
[2024-08-07T15:30:15.039Z] "/usr/include/xlocale", line 810.33: CCN5816 (W) Too many arguments are specified for the macro "toupper". The extra arguments are ignored.
[2024-08-07T15:30:15.039Z] "/jenkins/workspace/Build_JDK21_s390x_zos_Personal/omr/cmake/modules/platform/os/../../../../util/a2e/headers/ctype.h", line 96.25: CCN5425 (I) "toupper" is defined on line 96 of "/jenkins/workspace/Build_JDK21_s390x_zos_Personal/omr/cmake/modules/platform/os/../../../../util/a2e/headers/ctype.h".
[2024-08-07T15:30:15.039Z] "/usr/include/xlocale", line 804.23: CCN5063 (S) The text "_C" is unexpected.
[2024-08-07T15:30:15.039Z] [  0%] Linking C static library ../lib/libffi.a
[2024-08-07T15:30:15.039Z] [  0%] Generating NLS files
[2024-08-07T15:30:15.039Z] [  0%] Building CXX object runtime/omr/ddr/test/CMakeFiles/ddrgentest.dir/test.cpp.o
[2024-08-07T15:30:15.422Z] CCN0793(I) Compilation failed for file /jenkins/workspace/Build_JDK21_s390x_zos_Personal/omr/ddr/lib/ddr-ir/ClassType.cpp.  Object file not created.
[2024-08-07T15:30:15.422Z] [  0%] Copying schema/feature-v2.xsd to the build directory
[2024-08-07T15:30:15.422Z] make[6]: *** [runtime/omr/ddr/lib/ddr-ir/CMakeFiles/omr_ddr_ir.dir/build.make:75: runtime/omr/ddr/lib/ddr-ir/CMakeFiles/omr_ddr_ir.dir/ClassType.cpp.o] Error 12
[2024-08-07T15:30:15.422Z] make[5]: *** [CMakeFiles/Makefile2:4689: runtime/omr/ddr/lib/ddr-ir/CMakeFiles/omr_ddr_ir.dir/all] Error 2

@keithc-ca is this being caused by the redefinitions being missing, or is it pointing to something else? wasn't sure what Error 12 meant, and the main error I see is this: [2024-08-07T15:30:15.039Z] "/usr/include/xlocale", line 804.23: CCN5063 (S) The text "_C" is unexpected.

@babsingh
Copy link
Contributor

@Deigue What is the original error that you are trying to resolve with this fix?

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