Make test fails on time module with Python 1.5.2/Linux2/EGCS! Help!

M.-A. Lemburg mal at lemburg.com
Wed May 12 16:45:53 EDT 1999


Neel Krishnaswami wrote:
> 
> In article <MPG.11a2a389f734af92989728 at news.online.no>,
> Alexander Staubo <nospam at mop.no> wrote:
> >After doing a "make; make test", I get a failure in testing test_time.py.
> >Here's the output when I run the test on its own:
> >
> >tradecenter:/usr/src/python# python Lib/test/test_time.py
> >Traceback (innermost last):
> >  File "Lib/test/test_time.py", line 3, in ?
> >    time.altzone
> >AttributeError: altzone
> >
> >Maybe Python has a problem with EGCS? That said, the compilator does not
> >seem to output any errors (I'd be only happy to forward the make output
> >to anyone interested.) I have not tried making with plain GCC.
> 
> I can confirm that it's not limited to egcs, because I'm getting the
> same error with gcc 2.7.2 and libc5. :) None of the module-level
> variables in the time module are appearing for me, either.

Looks like the #ifdefs in Module/timemodule.c are buggy: the
globals are only set if HAVE_TM_ZONE is true in case the
symbol __GNU_LIBRARY__ is defined. Well for libc5 the latter
is defined, but the configure script only tests for the
tm.tm_zone field and not for tm.__tm_zone__ that libc5 defines.
That's why you don't see the globals.

I don't know why the GNU lib is special cased (it wasn't in previous
versions), but I guess at least for libc5 the correct
workaround is adding a

#undef __GNU_LIBRARY__

to the timemodule.c file.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                            Y2000: 233 days left
Business:                                      http://www.lemburg.com/
Python Pages:                 http://starship.python.net/crew/lemburg/





More information about the Python-list mailing list