[tlbuild] Building r26077 on FreeBSD: icu-4.9 problem

Nikola Lečić nikola.lecic at anthesphoria.net
Mon Apr 23 22:11:29 CEST 2012


On Mon, Apr 23, 2012 at 09:41:28AM +0200
  in <alpine.LNX.2.00.1204230929070.17197 at pcl321.mppmu.mpg.de>
  Peter Breitenlohner <peb at mppmu.mpg.de> wrote:

> Hi Nikola,
> 
> very strange. This piece of code is reached only when <time.h> defines
> neither 'timezone' nor '__timezone' nor '_timezone'.  I don not think that
> this is the case for FreeBSD?
> 
> The file 'Work/build.log' should say
>    checking for timezone... no
>    checking for __timezone... no
>    checking for _timezone... no
> and 'Work/libs/icu/icu-build/config.log' then gives the reason why the test
> programs trying to detect timezone, __timezone, or _timezone have failed.

Hi Peter,

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

Despite that, the test fails like this:

  configure:6759: checking for timezone
  configure:6782: gcc -o conftest  -O2   conftest.c -lm  >&5
  conftest.c: In function 'main':
  conftest.c:35: error: lvalue required as left operand of assignment

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

The previous version doesn't set compiler flag U_HAVE_TIMEZOME, so the
problematic check in putil.cpp doesn't fail.

Best,
-- 
Nikola Lečić = Никола Лечић
fingerprint : FEF3 66AF C90E EDC3 D878  7CDC 956D F4AB A377 1C9B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the tlbuild mailing list