Hi, I have download and compiled timezone code and data base from https://opensource.apple.com/source/TimeZoneData/TimeZoneData-88/ tzcode2018e.tar.gz<https://opensource.apple.com/source/TimeZoneData/TimeZoneData-88/tzcode2018e...> tzdata2018e.tar.gz<https://opensource.apple.com/source/TimeZoneData/TimeZoneData-88/tzdata2018e...> Ran tzselect, zdump, zic however unable to execute successfully. What are causes and any suggestion? [cid:17778879-34f0-4bb4-99a5-6e7c0e5ff4ee] Regards, JinQuan Seagate Internal
On 1/19/22 16:41, Jin Quan Shen via tz wrote:
~ # cd /usr/bin /usr/bin# ls tz* tzselect -ash: tzselect: not found /usr/bin # zdump > /usr/bin/zdump: line 1: syntax error: unexpected ")"> /usr/bin # zic /usr/sbin/zic: line 1: syntax error: unexpected ")"
It looks like your /usr commands were built for some machine architecture other than what you're running. This is a common problem when cross-compiling.
Hi Paul, Thank you for reply. I can run tzselect command as below now. Found that TZDIR in Makefile and tzselect.ksh must be different. TZDIR in Makefile need point to build result directory in VM machine TZDIR in tzselect.ksh need point directory in target machine, /usr/bin/ But i still have many compile error when compile the opensource code for zdump, zic. And not every files is compiled when call Makefile, the error occurred in log as following, seem localtime.c was not get compiled localtime.o: file not recognized: File format not recognized [cid:6714fd68-0998-45c0-acb1-24e07cc87df0] Regards, JInQuan ________________________________ From: Paul Eggert <eggert@cs.ucla.edu> Sent: Tuesday, January 25, 2022 1:22 AM To: Jin Quan Shen <jinquan.shen@seagate.com> Cc: Time zone mailing list <tz@iana.org> Subject: Re: [tz] TZ data base and code This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. On 1/19/22 16:41, Jin Quan Shen via tz wrote:
~ # cd /usr/bin /usr/bin# ls tz* tzselect -ash: tzselect: not found /usr/bin # zdump > /usr/bin/zdump: line 1: syntax error: unexpected ")"> /usr/bin # zic /usr/sbin/zic: line 1: syntax error: unexpected ")"
It looks like your /usr commands were built for some machine architecture other than what you're running. This is a common problem when cross-compiling. Seagate Internal
On 1/25/22 03:00, Jin Quan Shen wrote:
Found that TZDIR in Makefile and tzselect.ksh must be different. TZDIR in Makefile need point to build result directory in VM machine TZDIR in tzselect.ksh need point directory in target machine, /usr/bin/
That doesn't sound right. Normally the two TZDIR values should be the same. TZDIR is supposed to be where the data are installed, and /usr/bin does not sound like the right place for that as /usr/bin is supposed to be where commands are installed.
i still have many compile error when compile the opensource code for zdump, zic.
That's a sign of concern, and you should investigate the diagnostics. I don't get any diagnostics when I build on Ubuntu, or on Fedora. Do things work for you on one of these more-typical systems? If so, you can investigate the first place where your build goes wrong and investigate why it went wrong there.
And not every files is compiled when call Makefile, the error occurred in log as following, seem localtime.c was not get compiled localtime.o: file not recognized: File format not recognized
It sounds like your build system is misconfigured, as it is not even recognizing its own .o files. This is something you need to fix on your end; I can't help much. You can practice by compiling, linking and running a trivial C program 'int main (void) { return 0; }'; once that works, use the same flags to build and run zic and zdump. PS. Please don't send diagnostics as images, as deliberately-corrupted images are a common way to attempt to break into recipients' systems. Instead, just send text.
Hi Paul, I have some typo in previous email, correction as below Found that TZDIR in Makefile and tzselect.ksh must be different. TZDIR in Makefile need point to build result directory in VM machine TZDIR in tzselect.ksh need point directory in target machine, /usr/share/zoneinfo/ Found reason is because in Makefile , TZDIR is for compilation result, however tzselect.ksh is run on target machine so that its TZDIR needs to point to actual accessing folder /usr/share/zoneinfo/ Another i have figured out problem that cause compilation error for ARM In Makefile, when change compilation for ARM to generate zic, the generated zic cannot be executed in VM with 0x86 CPU when the Makefile requires zic to execute. I can run tzselect and zdump as following in target machine with ARM CPU now, still need to bring up other items in timezone for target machine. Thank you for help. Regards, JinQuan =========== run tzselect in target machine ============== /usr/bin # sh tzselect Please identify a location so that time zone rules can be set correctly. Please select a continent, ocean, "coord", or "TZ". 1) Africa 2) Americas 3) Antarctica 4) Asia 5) Atlantic Ocean 6) Australia 7) Europe 8) Indian Ocean 9) Pacific Ocean 10) coord - I want to use geographical coordinates. 11) TZ - I want to specify the time zone using the Posix TZ format. #? 4 Please select a country whose clocks agree with yours. 1) Afghanistan 2) Armenia 3) Azerbaijan 4) Bahrain 5) Bangladesh 6) Bhutan 7) Brunei 8) Cambodia 9) China 10) Cyprus 11) East Timor 12) Georgia 13) Hong Kong 14) India 15) Indonesia 16) Iran 17) Iraq 18) Israel 19) Japan 20) Jordan 21) Kazakhstan 22) Korea (North) 23) Korea (South) 24) Kuwait 25) Kyrgyzstan 26) Laos 27) Lebanon 28) Macau 29) Malaysia 30) Mongolia 31) Myanmar (Burma) 32) Nepal 33) Oman 34) Pakistan 35) Palestine 36) Philippines 37) Qatar 38) Russia 39) Saudi Arabia 40) Singapore 41) Sri Lanka 42) Syria 43) Taiwan 44) Tajikistan 45) Thailand 46) Turkmenistan 47) United Arab Emirates 48) Uzbekistan 49) Vietnam 50) Yemen #? 40 The following information has been given: Singapore Therefore TZ='Asia/Singapore' will be used. Selected time is now: Thu Feb 3 09:46:14 +08 2022. Universal Time is now: Thu Feb 3 01:46:14 UTC 2022. Is the above information OK? 1) Yes 2) No #? 1 You can make this change permanent for yourself by appending the line TZ='Asia/Singapore'; export TZ to the file '.profile' in your home directory; then log out and log in again. Here is that TZ value again, this time on standard output so that you can use the tzselect command in shell scripts: Asia/Singapore ========= run zdump in target machine ==================== /usr/bin # zdump /usr/share/zoneinfo/Asia/Singapore /usr/share/zoneinfo/Asia/Singapore Thu Feb 3 09:50:00 2022 +08 /usr/bin # zdump /usr/share/zoneinfo/Asia/Singapore ________________________________ From: Paul Eggert <eggert@cs.ucla.edu> Sent: Wednesday, January 26, 2022 12:36 AM To: Jin Quan Shen <jinquan.shen@seagate.com> Cc: Time zone mailing list <tz@iana.org> Subject: Re: [tz] TZ data base and code This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. On 1/25/22 03:00, Jin Quan Shen wrote:
Found that TZDIR in Makefile and tzselect.ksh must be different. TZDIR in Makefile need point to build result directory in VM machine TZDIR in tzselect.ksh need point directory in target machine, /usr/bin/
That doesn't sound right. Normally the two TZDIR values should be the same. TZDIR is supposed to be where the data are installed, and /usr/bin does not sound like the right place for that as /usr/bin is supposed to be where commands are installed.
i still have many compile error when compile the opensource code for zdump, zic.
That's a sign of concern, and you should investigate the diagnostics. I don't get any diagnostics when I build on Ubuntu, or on Fedora. Do things work for you on one of these more-typical systems? If so, you can investigate the first place where your build goes wrong and investigate why it went wrong there.
And not every files is compiled when call Makefile, the error occurred in log as following, seem localtime.c was not get compiled localtime.o: file not recognized: File format not recognized
It sounds like your build system is misconfigured, as it is not even recognizing its own .o files. This is something you need to fix on your end; I can't help much. You can practice by compiling, linking and running a trivial C program 'int main (void) { return 0; }'; once that works, use the same flags to build and run zic and zdump. PS. Please don't send diagnostics as images, as deliberately-corrupted images are a common way to attempt to break into recipients' systems. Instead, just send text. Seagate Internal
participants (2)
-
Jin Quan Shen -
Paul Eggert