Re: Iana build failures on Windows

On 2024-12-17 07:53, Manuela Friedrich wrote:
It's worth noticing that I had to add -DHAVE_SYS_STAT_H=0 to the tools.ini file we use on Windows.
Thanks for mentioning that, but unfortunately I don't know why -DHAVE_SYS_STAT_H=0 was needed (I don't use MS-Windows). Some fumbling with Microsoft documentation eventually led me to <https://learn.microsoft.com/en-us/cpp/c-runtime-library/compatibility?view=m...> which hints (but does not say) that by default MS-Windows <sys/stat.h> doesn't define the 'stat' function if you use some compilation options. I installed the attached patch to try to work around this portability problem. Does this patch fix things so that -DHAVE_SYS_STAT_H=0 need not be added to tools.ini? If not, what problems do you observe? With the patch, do you see warnings when compiling? Does compiling with -D_CRT_SECURE_NO_WARNINGS cut down on the number of warnings? What's in your tools.ini file for building tzcode?

WARNING: This e-mail has been altered by MIMEDefang. Following this paragraph are indications of the actual changes made. For more information about your site's MIMEDefang policy, contact MIMEDefang Administrator's Full Name <postmaster@localhost>. For more information about MIMEDefang, see: http://www.roaringpenguin.com/mimedefang/enduser.php3 An attachment named tools.ini was removed from this document as it constituted a security hazard. If you require this document, please contact the sender and arrange an alternate means of receiving it. Hello Paul, we updated tools.ini for this error localtime.obj : error LNK2019: unresolved external symbol S_ISREG referenced in function tzloadbody strftime.obj : error LNK2001: unresolved external symbol S_ISREG zdump.exe : fatal error LNK1120: 1 unresolved externals which is not resolved by the new patch. I attached tools.ini. Kind regards Manuela Friedrich On Tue, Dec 17, 2024 at 7:23 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
On 2024-12-17 07:53, Manuela Friedrich wrote:
It's worth noticing that I had to add -DHAVE_SYS_STAT_H=0 to the tools.ini file we use on Windows.
Thanks for mentioning that, but unfortunately I don't know why -DHAVE_SYS_STAT_H=0 was needed (I don't use MS-Windows).
Some fumbling with Microsoft documentation eventually led me to < https://learn.microsoft.com/en-us/cpp/c-runtime-library/compatibility?view=m...>
which hints (but does not say) that by default MS-Windows <sys/stat.h> doesn't define the 'stat' function if you use some compilation options. I installed the attached patch to try to work around this portability problem. Does this patch fix things so that -DHAVE_SYS_STAT_H=0 need not be added to tools.ini? If not, what problems do you observe?
With the patch, do you see warnings when compiling? Does compiling with -D_CRT_SECURE_NO_WARNINGS cut down on the number of warnings?
What's in your tools.ini file for building tzcode?

On 2024-12-18 00:34, Manuela Friedrich wrote:
unresolved external symbol S_ISREG
OK, let's try again. I installed the first attached patch, which I hope fixes that.
CFLAGSW = ... -Dssize_t=__int64 ...
This doesn't feel right, as ssize_t is the type returned by 'read', and from what I can see on microsoft.com that type is int even on 64-bit MS-Windows. POSIX allows ssize_t to have fewer bits than size_t, so this behavior of MS-Windows conforms to POSIX. I installed the second attached patch to adjust the suggested definition of ssize_t in the commentary, and you might want to adjust your tools.ini accordingly.

Thank you, Paul! The new patches are working fine. Kind regards On Wed, Dec 18, 2024 at 11:13 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
On 2024-12-18 00:34, Manuela Friedrich wrote:
unresolved external symbol S_ISREG
OK, let's try again. I installed the first attached patch, which I hope fixes that.
CFLAGSW = ... -Dssize_t=__int64 ...
This doesn't feel right, as ssize_t is the type returned by 'read', and from what I can see on microsoft.com that type is int even on 64-bit MS-Windows. POSIX allows ssize_t to have fewer bits than size_t, so this behavior of MS-Windows conforms to POSIX.
I installed the second attached patch to adjust the suggested definition of ssize_t in the commentary, and you might want to adjust your tools.ini accordingly.
participants (2)
-
Manuela Friedrich
-
Paul Eggert