[tlbuild] Building r26077 on FreeBSD: icu-4.9 problem
Peter Breitenlohner
peb at mppmu.mpg.de
Tue Apr 24 10:46:09 CEST 2012
On Tue, 24 Apr 2012, Nikola Lecic wrote:
> FreeBSD defines timezone. You can take a look:
>
> http://www.freebsd.org/cgi/cvsweb.cgi/src/include/time.h
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/time.h
Hi Nikola,
indeed, but <time.h> defines
#if __BSD_VISIBLE
char *timezone(int, int); /* XXX XSI conflict */
void tzsetwall(void);
time_t timelocal(struct tm * const);
time_t timegm(struct tm * const);
#endif /* __BSD_VISIBLE */
whereas <sys/time.h> defines
struct timezone {
int tz_minuteswest; /* minutes west of Greenwich */
int tz_dsttime; /* type of dst correction */
};
and both conflict with the Posix declaration
extern long timezone;
and do not define an lvalue.
> conftest.c: In function 'main':
> conftest.c:35: error: lvalue required as left operand of assignment
See above.
> However, the same test fails in the same way with icu-4.8 as well, but
> icu-4.8 builds fine. I found that the difference was that icu-4.8
> configure contained the following code:
>
> if test $ac_cv_var__timezone = yes; then
> U_TIMEZONE=_timezone
> U_HAVE_TIMEZONE=1
> fi
>
> while icu-4.9 configure has:
>
> if test $ac_cv_var__timezone = yes; then
> U_TIMEZONE=_timezone
> U_HAVE_TIMEZONE=1
> else
> CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TIMEZONE=0"
> fi
This whole area has been changed; much of what used to be done by configure
is now done in C (or C++) code, and parts of that are broken.
The value of U_HAVE_TIMEZONE is set in configure and put into
CONFIG_CPPFLAGS as well as AC_SUBST'd but these values are never used.
The real problem are lines 113-123 of common/putilimp.h assuming that
everyone except U_PF_OS400 has a Posix conformant timezone. It seems that
is just not the case for your FreeBSD (although it seems to be true for
kFreeBSD).
Your change adding -DU_TIMEZONE=0 to CONFIG_CPPFLAGS does not address the
real problem but is good enough for TeX Live not using timezones.
For the moment please just keep it as your local modification until we find
a proper fix. It would help if you can send me the output from
touch foo.h; cpp -dM foo.h
Regards
Peter Breitenlohner <peb at mppmu.mpg.de>
More information about the tlbuild
mailing list