[pypy-issue] [issue902] pypy translation build fails due to non-POSIX time field usage
Shawn Walker
tracker at bugs.pypy.org
Tue Oct 11 21:58:51 CEST 2011
New submission from Shawn Walker <pypy+binarycrusader at gmail.com>:
While compiling a current pypy hg clone on Solaris, I encountered the following
compilation error:
[platform:execute] /usr/gcc/4.5/bin/gcc -c -O3 -pthread -fomit-frame-pointer -
Wall -Wno-unused -std=gnu99 -D__EXTENSIONS__ -DSEM_VALUE_MAX=INT_MAX
/tmp/usession-default-17/platcheck_45.c -o /tmp/usession-default-
17/platcheck_45.o
[platform:Error] /tmp/usession-default-17/platcheck_45.c: In function
‘dump_section_tm’:
[platform:Error] /tmp/usession-default-17/platcheck_45.c:116:27: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[platform:Error] /tmp/usession-default-17/platcheck_45.c:117:38: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[platform:Error] /tmp/usession-default-17/platcheck_45.c:118:3: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[platform:Error] /tmp/usession-default-17/platcheck_45.c:118:20: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[platform:Error] /tmp/usession-default-17/platcheck_45.c:118:35: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[platform:Error] /tmp/usession-default-17/platcheck_45.c:119:33: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[platform:Error] /tmp/usession-default-17/platcheck_45.c:120:25: error:
‘platcheck_t’ has no member named ‘tm_zone’
[platform:Error] /tmp/usession-default-17/platcheck_45.c:121:36: error:
‘platcheck_t’ has no member named ‘tm_zone’
[Timer] Timings:
[Timer] annotate --- 972.1 s
[Timer] ==========================================
[Timer] Total: --- 972.1 s
[translation:ERROR] Error:
[translation:ERROR] Traceback (most recent call last):
[translation:ERROR] File "translate.py", line 308, in main
[translation:ERROR] drv.proceed(goals)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/translator/driver.py", line 809, in
proceed
[translation:ERROR] return self._execute(goals, task_skip =
self._maybe_skip())
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/translator/tool/taskengine.py", line 116,
in _execute
[translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/translator/driver.py", line 286, in _do
[translation:ERROR] res = func()
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/translator/driver.py", line 323, in
task_annotate
[translation:ERROR] s = annotator.build_types(self.entry_point,
self.inputtypes)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line 103, in
build_types
[translation:ERROR] return self.build_graph_types(flowgraph, inputcells,
complete_now=complete_now)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line 194, in
build_graph_types
[translation:ERROR] self.complete()
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line 250, in
complete
[translation:ERROR] self.processblock(graph, block)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line 448, in
processblock
[translation:ERROR] self.flowin(graph, block)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line 508, in
flowin
[translation:ERROR] self.consider_op(block.operations[i])
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line 710, in
consider_op
[translation:ERROR] raise_nicer_exception(op, str(graph))
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py", line 707, in
consider_op
[translation:ERROR] resultcell = consider_meth(*argcells)
[translation:ERROR] File "<4160-codegen
/export/home/swalker/devel/pypy/pypy/annotation/annrpython.py:745>", line 3, in
consider_op_getattr
[translation:ERROR] return arg.getattr(*args)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/unaryop.py", line 687, in
getattr
[translation:ERROR] return bookkeeper.pbc_getattr(pbc, s_attr)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/bookkeeper.py", line 603, in
pbc_getattr
[translation:ERROR] return first.s_read_attribute(attr)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/description.py", line 918, in
s_read_attribute
[translation:ERROR] return self.bookkeeper.immutablevalue(value)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/bookkeeper.py", line 396, in
immutablevalue
[translation:ERROR] result.dictdef.generalize_value(self.immutablevalue(ev))
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/annotation/bookkeeper.py", line 469, in
immutablevalue
[translation:ERROR] elif hasattr(x, '_freeze_') and x._freeze_():
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/interpreter/mixedmodule.py", line 128, in
_freeze_
[translation:ERROR] self.getdict(self.space)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/interpreter/mixedmodule.py", line 121, in
getdict
[translation:ERROR] w_value = self.get(name)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/interpreter/mixedmodule.py", line 74, in
get
[translation:ERROR] w_value = self.getdictvalue(space, name)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/interpreter/mixedmodule.py", line 86, in
getdictvalue
[translation:ERROR] return self._load_lazily(space, name)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/interpreter/mixedmodule.py", line 96, in
_load_lazily
[translation:ERROR] w_value = loader(space)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/interpreter/mixedmodule.py", line 204, in
ifileloader
[translation:ERROR] d[name] = __import__(pkgroot+'.'+name, None, None,
[name])
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/module/rctime/interp_time.py", line 125,
in <module>
[translation:ERROR] for k, v in platform.configure(CConfig).items():
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/rpython/tool/rffi_platform.py", line 203,
in configure
[translation:ERROR] ignore_errors=ignore_errors))
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/rpython/tool/rffi_platform.py", line 687,
in run_example_code
[translation:ERROR] output = build_executable_cache(files, eci,
ignore_errors=ignore_errors)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/tool/gcc_cache.py", line 31, in
build_executable_cache
[translation:ERROR] result = platform.execute(platform.compile(c_files,
eci))
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/translator/platform/__init__.py", line 51,
in compile
[translation:ERROR] ofiles = self._compile_o_files(cfiles, eci, standalone)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/translator/platform/__init__.py", line 60,
in _compile_o_files
[translation:ERROR] ofiles.append(self._compile_c_file(self.cc, cfile,
compile_args))
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/translator/platform/posix.py", line 38, in
_compile_c_file
[translation:ERROR] cwd=str(cfile.dirpath()))
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/translator/platform/__init__.py", line
118, in _execute_c_compiler
[translation:ERROR] self._handle_error(returncode, stdout, stderr, outname)
[translation:ERROR] File
"/export/home/swalker/devel/pypy/pypy/translator/platform/__init__.py", line
130, in _handle_error
[translation:ERROR] raise CompilationError(stdout, stderr)
[translation:ERROR] CompilationError': CompilationError(err="""
[translation:ERROR] /tmp/usession-default-17/platcheck_45.c: In function
‘dump_section_tm’:
[translation:ERROR] /tmp/usession-default-17/platcheck_45.c:116:27: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[translation:ERROR] /tmp/usession-default-17/platcheck_45.c:117:38: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[translation:ERROR] /tmp/usession-default-17/platcheck_45.c:118:3: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[translation:ERROR] /tmp/usession-default-17/platcheck_45.c:118:20: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[translation:ERROR] /tmp/usession-default-17/platcheck_45.c:118:35: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[translation:ERROR] /tmp/usession-default-17/platcheck_45.c:119:33: error:
‘platcheck_t’ has no member named ‘tm_gmtoff’
[translation:ERROR] /tmp/usession-default-17/platcheck_45.c:120:25: error:
‘platcheck_t’ has no member named ‘tm_zone’
[translation:ERROR] /tmp/usession-default-17/platcheck_45.c:121:36: error:
‘platcheck_t’ has no member named ‘tm_zone’
[translation:ERROR] """)
[translation:ERROR] .. v10 = getattr(space_0, ('builtin_modules'))
[translation:ERROR] .. '(pypy.module.imp.interp_imp:140)init_builtin'
[translation:ERROR] Processing block:
[translation:ERROR] block at 3 is a <class
'pypy.objspace.flow.flowcontext.SpamBlock'>
[translation:ERROR] in (pypy.module.imp.interp_imp:140)init_builtin
[translation:ERROR] containing the following operations:
[translation:ERROR] v11 = getattr(space_0, ('str_w'))
[translation:ERROR] v12 = simple_call(v11, w_name_0)
[translation:ERROR] v10 = getattr(space_0, ('builtin_modules'))
[translation:ERROR] v13 = contains(v10, v12)
[translation:ERROR] v14 = is_true(v13)
[translation:ERROR] --end--
tm_gmtoff and tm_zone are BSD/GNU libc extensions and are not part of the POSIX
standard or strictly ISO C conforming environments.
Solaris does not provide these fields at all.
What confuses me is that pypy/config/pypyoption.py seems to account for this:
68 if sys.platform == "sunos5":
69 del working_modules['mmap'] # depend on ctypes, can't get at c-level
'errono'
70 del working_modules['rctime'] # depend on ctypes, missing
tm_zone/tm_gmtoff
----------
messages: 3292
nosy: binarycrusader, pypy-issue
priority: bug
release: 1.6
status: unread
title: pypy translation build fails due to non-POSIX time field usage
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue902>
________________________________________
More information about the pypy-issue
mailing list