-
Notifications
You must be signed in to change notification settings - Fork 396
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
base: master
Are you sure you want to change the base?
Conversation
jenkins build zos |
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. |
That OMR build specifies I did notice that the macros in stricmp.c are just wrong for EBCDIC (letters are not contiguous). |
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]>
j21 build actually seems like it is not passing with the changes
@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: |
@Deigue What is the original error that you are trying to resolve with this fix? |
Here is the snippet of the log encountered with Open XL (I had also contacted the cpp team internally and they mentioned that the tolower and toupper are inline functions in C++, and as such the overloading/scoping causes issues) In file included from /omr/ddr/include/ddr/scanner/dwarf/DwarfScanner.hpp:28:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/map:2193:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/functional:526:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/vector:325:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__format/formatter_bool.h:20:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__format/formatter_integral.h:35:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/locale:202:
/xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__locale:501:35: error: expected ')'
501 | _LIBCPP_HIDE_FROM_ABI char_type toupper(char_type __c) const { return do_toupper(__c); }
| ^
/omr/ddr/include/ddr/std/unordered_map.hpp:42:36: note: expanded from macro 'toupper'
42 | #define toupper(c) (islower(c) ? (c & _XUPPER_ASCII) : c)
| ^
/xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__locale:501:35: note: to match this '('
/omr/ddr/include/ddr/std/unordered_map.hpp:42:24: note: expanded from macro 'toupper'
42 | #define toupper(c) (islower(c) ? (c & _XUPPER_ASCII) : c)
| ^
/xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__locale:501:57: error: expected ';' at end of declaration list
501 | _LIBCPP_HIDE_FROM_ABI char_type toupper(char_type __c) const { return do_toupper(__c); }
| ^
/xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__locale:503:68: error: too many arguments provided to function-like macro invocation
503 | _LIBCPP_HIDE_FROM_ABI const char_type* toupper(char_type* __low, const char_type* __high) const {
| ^
/omr/ddr/include/ddr/std/unordered_map.hpp:42:9: note: macro 'toupper' defined here
42 | #define toupper(c) (islower(c) ? (c & _XUPPER_ASCII) : c)
| ^
In file included from omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp:22:
In file included from omr/ddr/include/ddr/scanner/dwarf/DwarfScanner.hpp:28:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/map:2193:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/functional:526:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/vector:325:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__format/formatter_bool.h:20:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__format/formatter_integral.h:35:
In file included from /xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/locale:202:
/xlc210/usr/lpp/IBM/cnw/v2r1/openxl/bin/../include/c++/v1/__locale:596:68: error: too many arguments provided to function-like macro invocation
596 | _LIBCPP_HIDE_FROM_ABI const char_type* tolower(char_type* __low, const char_type* __high) const {
| ^
omr/ddr/include/ddr/std/unordered_map.hpp:43:9: note: macro 'tolower' defined here
43 | #define tolower(c) (isupper(c) ? (c | _XLOWER_ASCII) : c)
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated. |
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.