[tz] iana build failures on Windows

Manuela Friedrich Manuela.Friedrich at actian.com
Fri Apr 23 08:24:15 UTC 2021


I believe the line you are quoting is expected because the same happens in Paul's Linux output:
Africa/Abidjan  -9223372036854775808 = NULL

We are linking the other objects into zdump.exe, see nmake output:

/out:zdump.exe
zdump.obj
getopt.obj
localtime.obj
asctime.obj
strftime.obj

It is probably this line from tools.ini:

TZDOBJSW=	zdump$(O) getopt$(O) localtime$(O) asctime$(O) strftime$(O)

See the ful tools.ini file:

[NMAKE] 
!IF [ if not "%PLATFORM%" == "x64" exit /b 1 ] == 0
CFLAGSW  = /Zi -DHAVE_SYS_WAIT_H=0 -DHAVE_UNISTD_H=0 -DHAVE_INTTYPES_H=0 -DHAVE_POSIX_DECLS=0 -DHAVE_LINK=0 -DHAVE_SYMLINK=0 -DHAVE_DECL_ASCTIME_R=0 -Dssize_t=__int64 -DHAVE_STRTOLL=0 -DRESERVE_STD_EXT_IDS -DSUPPRESS_TZDIR -DHAVE_TZNAME=1 -DZIC_BLOAT_DEFAULT="""fat"""
!ELSE
CFLAGSW  = /Zi -DHAVE_SYS_WAIT_H=0 -DHAVE_UNISTD_H=0 -DHAVE_INTTYPES_H=0 -DHAVE_POSIX_DECLS=0 -DHAVE_LINK=0 -DHAVE_SYMLINK=0 -DHAVE_DECL_ASCTIME_R=0 -Dssize_t=int -DHAVE_STRTOLL=0 -DRESERVE_STD_EXT_IDS -DSUPPRESS_TZDIR -DHAVE_TZNAME=1 -DZIC_BLOAT_DEFAULT="""fat"""
!ENDIF
LINKW = cl $(LDFLAGS)
CCW  = cl /c
LDLIBSW  =
X   = .exe
O   = .obj
PACKAGE=	tzcode


BUGEMAIL=	tz at iana.org 
TZCOBJSW=	zic$(O) getopt$(O)
TZDOBJSW=	zdump$(O) getopt$(O) localtime$(O) asctime$(O) strftime$(O)

root:		zic$(X) zdump$(X)

version:	
!IF [git describe > nul 2>&1] == 0
		if not exist version for /f "delims=-" %%a in ('git describe') do echo %%a > version
!ELSE
		if not exist version echo $(VERSION) > version
!ENDIF

version.h:
		echo static char const PKGVERSION[]="($(PACKAGE)) "; >version.h
		for /F %%H in ('type version') do echo static char const TZVERSION[]="%%H"; >> version.h
		echo static char const REPORT_BUGS_TO[]="$(BUGEMAIL)"; >>version.h

zic$(X):	$(TZCOBJSW)
		$(LINKW) $(CFLAGSW) $(TZCOBJSW) /link /out:$@ 

zdump$(X):	$(TZDOBJSW)
		$(LINKW) $(CFLAGSW) $(TZDOBJSW) /link /out:$@ 

clean_misc:
		del  *$(O) *.out version.h

clean:		clean_misc
		del zdump$(X) zic$(X)

asctime$(O):	private.h tzfile.h
date$(O):	private.h
difftime$(O):	private.h
localtime$(O):	private.h tzfile.h
strftime$(O):	private.h tzfile.h
zdump$(O):	version.h
zic$(O):	private.h tzfile.h version.h
getopt$(O):	

.c.obj:
		$(CCW) $*.c $(CFLAGSW) 

.PHONY: root

Regards
Manu


-----Original Message-----
From: Guy Harris <gharris at sonic.net> 
Sent: Freitag, 23. April 2021 09:38
To: Manuela Friedrich <Manuela.Friedrich at actian.com>
Cc: Paul Eggert <eggert at cs.ucla.edu>; Steven Shuriff <Steven.Shuriff at actian.com>; Time zone mailing list <tz at iana.org>
Subject: Re: [tz] iana build failures on Windows

On Apr 22, 2021, at 11:22 PM, Manuela Friedrich via tz <tz at iana.org> wrote:

> please find the tracing output attached.
> I have only kept the first 136 lines believing it provides enough information.

	...

> d:\devsrc\treasure_test\iana\zoneinfo\iana\Africa\Abidjan  -9223372036854775808 = NULL

Is zdump linked with the rest of the tz code, or is it only linked with the Visual Studio C library?

If it's only linked with the Visual Studio C library, so that the localtime() that zdump calls is the Visual Studio C library's localtime(), rather than the tz code's localtime(), then it Will Not Work for any time before January 1, 1970, 00:00:00 UTC - localtime() in the Visual Studio C library returns NULL for all such date/time values:

	https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/localtime-localtime32-localtime64?view=msvc-160



More information about the tz mailing list