[pypy-issue] [issue904] pypy build translation fails due to use of non-standard ifr_ifindex

Shawn Walker tracker at bugs.pypy.org
Tue Oct 11 23:56:07 CEST 2011


New submission from Shawn Walker <pypy+binarycrusader at gmail.com>:

While compiling an hg clone of pypy trunk, I encountered the following 
compilation error:

$ python2.6 translate.py -Ojit
[platform:msg] Setting platform to 'host' cc=None
[translation:info] Translating target as defined by targetpypystandalone
...
[platform:Error] /tmp/usession-default-21/platcheck_4.c: In function 
‘dump_section_ifreq’:
[platform:Error] /tmp/usession-default-21/platcheck_4.c:4327:29: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_4.c:4328:40: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_4.c:4329:3: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_4.c:4329:22: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_4.c:4329:39: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_4.c:4330:35: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
...
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-21/platcheck_27.c -o /tmp/usession-default-
21/platcheck_27.o
[platform:Error] /tmp/usession-default-21/platcheck_27.c: In function 
‘dump_section_ifreq’:
[platform:Error] /tmp/usession-default-21/platcheck_27.c:4327:29: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_27.c:4328:40: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_27.c:4329:3: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_27.c:4329:22: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_27.c:4329:39: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_27.c:4330:35: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
...

[translation] PyPy config object:
[translation] [objspace]
[translation]     honor__builtins__ = False
[translation]     nofaking = True
[translation]     [opcodes]
[translation]         CALL_METHOD = True
[translation]     [std]
[translation]         builtinshortcut = True
[translation]         getattributeshortcut = True
[translation]         newshortcut = True
[translation]         optimized_list_getitem = True
[translation]         withcelldict = True
[translation]         withmapdict = True
[translation]         withmethodcache = True
[translation]         withprebuiltchar = True
[translation]         withrangelist = True
[translation]         withtypeversion = True
[translation]     [usemodules]
[translation]         __pypy__ = True
[translation]         _ast = True
[translation]         _bisect = True
[translation]         _codecs = True
[translation]         _collections = True
[translation]         _continuation = True
[translation]         _ffi = True
[translation]         _io = True
[translation]         _locale = True
[translation]         _lsprof = True
[translation]         _md5 = True
[translation]         _multibytecodec = True
[translation]         _multiprocessing = True
[translation]         _pickle_support = True
[translation]         _random = True
[translation]         _rawffi = True
[translation]         _sha = True
[translation]         _socket = True
[translation]         _sre = True
[translation]         _testing = True
[translation]         _warnings = True
[translation]         _weakref = True
[translation]         array = True
[translation]         binascii = True
[translation]         bz2 = True
[translation]         cStringIO = True
[translation]         cmath = True
[translation]         cpyext = True
[translation]         crypt = True
[translation]         errno = True
[translation]         gc = True
[translation]         imp = True
[translation]         itertools = True
[translation]         marshal = True
[translation]         math = True
[translation]         micronumpy = True
[translation]         operator = True
[translation]         parser = True
[translation]         posix = True
[translation]         pwd = True
[translation]         pyexpat = True
[translation]         pypyjit = True
[translation]         rctime = False
[translation]         select = True
[translation]         struct = True
[translation]         symbol = True
[translation]         thread = True
[translation]         time = True
[translation]         token = True
[translation]         unicodedata = True
[translation]         zipimport = True
[translation]         zlib = True
[translation:WARNING] The module '_hashlib' is disabled
[translation:WARNING] because importing pypy.module._ssl.interp_ssl raised 
CompilationError
[translation:WARNING] CompilationError(err="""
[translation:WARNING]       /tmp/usession-default-21/platcheck_4.c: In function 
‘dump_section_ifreq’:
[translation:WARNING]       /tmp/usession-default-21/platcheck_4.c:4327:29: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       /tmp/usession-default-21/platcheck_4.c:4328:40: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       /tmp/usession-default-21/platcheck_4.c:4329:3: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       /tmp/usession-default-21/platcheck_4.c:4329:22: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       /tmp/usession-default-21/platcheck_4.c:4329:39: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       /tmp/usession-default-21/platcheck_4.c:4330:35: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       """)
[translation:WARNING] The module '_ssl' is disabled
[translation:WARNING] because importing pypy.module._ssl.interp_ssl raised 
CompilationError
[translation:WARNING] CompilationError(err="""
[translation:WARNING]       /tmp/usession-default-21/platcheck_27.c: In function 
‘dump_section_ifreq’:
[translation:WARNING]       /tmp/usession-default-21/platcheck_27.c:4327:29: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       /tmp/usession-default-21/platcheck_27.c:4328:40: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       /tmp/usession-default-21/platcheck_27.c:4329:3: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       /tmp/usession-default-21/platcheck_27.c:4329:22: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       /tmp/usession-default-21/platcheck_27.c:4329:39: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       /tmp/usession-default-21/platcheck_27.c:4330:35: 
error: ‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:WARNING]       """)
...

[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-21/platcheck_31.c -o /tmp/usession-default-
21/platcheck_31.o
[platform:Error] /tmp/usession-default-21/platcheck_31.c: In function 
‘dump_section_ifreq’:
[platform:Error] /tmp/usession-default-21/platcheck_31.c:4327:29: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_31.c:4328:40: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_31.c:4329:3: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_31.c:4329:22: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_31.c:4329:39: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[platform:Error] /tmp/usession-default-21/platcheck_31.c:4330:35: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:ERROR] Error:
[translation:ERROR]  Traceback (most recent call last):
[translation:ERROR]    File "translate.py", line 275, in main
[translation:ERROR]     default_goal='compile')
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/translator/driver.py", line 828, in 
from_targetspec
[translation:ERROR]     spec = target(driver, args)
[translation:ERROR]    File "targetpypystandalone.py", line 226, in target
[translation:ERROR]     return self.get_entry_point(config)
[translation:ERROR]    File "targetpypystandalone.py", line 237, in 
get_entry_point
[translation:ERROR]     space = make_objspace(config)
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/tool/option.py", line 48, in make_objspace
[translation:ERROR]     space = Space(config)
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/interpreter/baseobjspace.py", line 308, in 
__init__
[translation:ERROR]     self.initialize()
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/objspace/std/objspace.py", line 75, in 
initialize
[translation:ERROR]     self.make_builtins()
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/interpreter/baseobjspace.py", line 525, in 
make_builtins
[translation:ERROR]     self.install_mixedmodule(mixedname, 
installed_builtin_modules)
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/interpreter/baseobjspace.py", line 564, in 
install_mixedmodule
[translation:ERROR]     modname = self.setbuiltinmodule(mixedname)
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/interpreter/baseobjspace.py", line 405, in 
setbuiltinmodule
[translation:ERROR]     mod = Module(self, self.wrap(name))
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/interpreter/mixedmodule.py", line 26, in 
__init__
[translation:ERROR]     self.__class__.buildloaders()
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/module/_socket/__init__.py", line 24, in 
buildloaders
[translation:ERROR]     from pypy.rlib import rsocket
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/rlib/rsocket.py", line 18, in <module>
[translation:ERROR]     from pypy.rlib import _rsocket_rffi as _c
[translation:ERROR]    File 
"/export/home/swalker/devel/pypy/pypy/rlib/_rsocket_rffi.py", line 369, in 
<module>
[translation:ERROR]     cConfig.__dict__.update(platform.configure(CConfig))
[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-21/platcheck_31.c: In function 
‘dump_section_ifreq’:
[translation:ERROR]      /tmp/usession-default-21/platcheck_31.c:4327:29: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:ERROR]      /tmp/usession-default-21/platcheck_31.c:4328:40: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:ERROR]      /tmp/usession-default-21/platcheck_31.c:4329:3: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:ERROR]      /tmp/usession-default-21/platcheck_31.c:4329:22: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:ERROR]      /tmp/usession-default-21/platcheck_31.c:4329:39: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:ERROR]      /tmp/usession-default-21/platcheck_31.c:4330:35: error: 
‘platcheck_t’ has no member named ‘ifr_ifindex’
[translation:ERROR]      """)
...

A possibly related Python bug where this was worked around for CPython:
http://bugs.python.org/issue8852

----------
messages: 3294
nosy: pypy-issue
priority: bug
release: 1.6
status: unread
title: pypy build translation fails due to use of non-standard ifr_ifindex

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue904>
________________________________________


More information about the pypy-issue mailing list