fix zOS build

Description

There are 2 major problems:

  • no c++17 support by xlc, that is used currently by zOS option

  • .gitattributes has no zos encoding rules, cause files to be untagged and unreadable

 

As i can see, libicu v58.3 is the last version you can build on mainframe with IBM xlC, since newer versions require c++17.

OpenXL is a new compiler from IBM, based on Clang 18 and as result it has c++17 support. Also OpenXL has Clang style of options, not like XLc had.

For the zos encoding tags, some files has to be in IBM-1047, some can stay in UTF-8, it depends what application consumes it. In same time, some files have non-convertable UTF-8 characters like causing git on zos to replace it and file showup in diff later, example:

Activity

Show:

Markus Scherer 
May 23, 2024 at 4:25 PM

We discussed EBCDIC support briefly in our team meeting and decided to go ahead with reviewing your changes. At this time, we are not committing to formally support EBCDIC platforms, but we are also not going to remove what we have anytime soon.

Oleksandr Hubanov 
May 14, 2024 at 8:24 PM

Hello , I have opened PR to cover base fixes for build

Im planning to open another ticket for fixing UTF-8 encoding in test data files and one more ticket to fix utilities used to generate following files, as today it does not set BOM in file, leading ICU reading it on z/OS to fail:

icu4c/source/data/misc/currencyNumericCodes.txt
icu4c/source/data/misc/icustd.txt
icu4c/source/data/misc/zoneinfo64.txt

Markus Scherer 
May 9, 2024 at 3:19 PM

I guess I would first try to write UTF-8.

Oleksandr Hubanov 
May 9, 2024 at 1:47 PM

found reason for data build fail, the command to generate res_index.res based on echo written in file. on z/os that creates an IBM-1047 file and in order to read it, ICU has to have ibm-1047_P100-1995 convertor. that is why those two commands was fixing the build, it was generating missing convertors.

There are two ways to fix it:

  1. convert echo output to UTF-8

  2. adjust dependencies and generate convertors first

Which one should I implement?

Oleksandr Hubanov 
May 9, 2024 at 11:25 AM

hello , we have got the CLA signed and im ready to open a proper PR. Just to be clear, this is what i learned about requirements, please comment if got some wrong:

  1. every commit should have signature of author in commit message, i should use my github user (alexgubanow) and email (alex@0x0h.com), so it gets “verified“ by github later

  2. commit message should have Jira ticket number in name, easy

  3. PR shall have 1 commit, perhaps i will merge and squash changes to other branch and open PR from there

Meanwhile build runs almost fine, there is some issue with data directory, make does not generate prerequisites for some step, but after you run 2 commands manually - make runs fine:

Test are like 80% ok, many fail due to txt files that have UTF-8, do not have BOM to identify it is UTF-8. I will fix that in separate issue.

There are like 8-10 warnings across entire build, will address those in separate issue as well.

Fixed

Details

Assignee

Reporter

Components

Priority

Fix versions

Created March 28, 2024 at 8:00 AM
Updated September 21, 2024 at 12:15 AM
Resolved September 21, 2024 at 12:15 AM