New issue 2265: Unable to translate PyPy 5.0.x on CentOS 6.7
https://bitbucket.org/pypy/pypy/issues/2265/unable-to-translate-pypy-50x-on-centos-67

Rodrigo Dias Cruz:

# Description #

* I am unable to translate both PyPy 5.0.0 and 5.0.1 on a CentOS 6.7 system 
(details below).
* I suspect it might have something to do with **cpyext** and the fact that 
CentOS 6.x is a Python **2.6** environment, although I'm not sure.
* Could you please provide me with some guidance? Any help is appreciated. 
Thank you.

# Notes #

* PyPy 4.0.1 and earlier versions can be translated on the same system.
* The option ``--withoutmod-cpyext`` avoids the problem (but it breaks later 
when running ``package.py --archive-name pypy-my-own-package-name``).
* I am able to translate PyPy 5.0.x on a CentOS 7 system (Python **2.7** 
environment).

# Details #

* **System:** CentOS 6.7 x86_64 with 8GB of RAM
* **Installed dependencies:** bzip2-devel, expat-devel, gdbm-devel, 
ncurses-devel, libffi-devel, openssl-devel, sqlite-devel, tcl-devel, tk-devel, 
zlib-devel
* **Source:** https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-src.tar.bz2
* **Translation environment:** PyPy 4.0.1
* **Translation command:** pypy ../../rpython/bin/rpython -Ojit 
targetpypystandalone

# Result #

```
[Timer] Timings:
[Timer] annotate                       ---  442.2 s
[Timer] rtype_lltype                   ---  469.5 s
[Timer] pyjitpl_lltype                 ---  847.0 s
[Timer] backendopt_lltype              ---  124.6 s
[Timer] stackcheckinsertion_lltype     ---   99.7 s
[Timer] database_c                     ---  244.1 s
[Timer] source_c                       ---  120.8 s
[Timer] compile_c                      ---    4.4 s
[Timer] ===========================================
[Timer] Total:                         --- 2352.3 s
[translation:info] Error:
[translation:info]    File 
"/root/pypy-5.0.0-src/rpython/translator/goal/translate.py", line 318, in main
[translation:info]     drv.proceed(goals)
[translation:info]    File "/root/pypy-5.0.0-src/rpython/translator/driver.py", 
line 550, in proceed
[translation:info]     result = self._execute(goals, task_skip = 
self._maybe_skip())
[translation:info]    File 
"/root/pypy-5.0.0-src/rpython/translator/tool/taskengine.py", line 114, in 
_execute
[translation:info]     res = self._do(goal, taskcallable, *args, **kwds)
[translation:info]    File "/root/pypy-5.0.0-src/rpython/translator/driver.py", 
line 278, in _do
[translation:info]     res = func()
[translation:info]    File "/root/pypy-5.0.0-src/rpython/translator/driver.py", 
line 516, in task_compile_c
[translation:info]     cbuilder.compile(**kwds)
[translation:info]    File "/root/pypy-5.0.0-src/rpython/translator/c/genc.py", 
line 363, in compile
[translation:info]     extra_opts)
[translation:info]    File 
"/root/pypy-5.0.0-src/rpython/translator/platform/posix.py", line 219, in 
execute_makefile
[translation:info]     self._handle_error(returncode, stdout, stderr, 
path.join('make'))
[translation:info]    File 
"/root/pypy-5.0.0-src/rpython/translator/platform/__init__.py", line 151, in 
_handle_error
[translation:info]     raise CompilationError(stdout, stderr)
[translation:ERROR] CompilationError: CompilationError(err="""
[translation:ERROR]     In file included from common_header.h:145,
[translation:ERROR]                      from data_pypy_goal_1.c:4:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:59: error: 
redefinition of typedef ‘Py_ssize_t’In file included from common_header.h:145,
[translation:ERROR]                      from data_pypy_interpreter.c:4:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:59: error: 
redefinition of typedef ‘Py_ssize_t’
[translation:ERROR]
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:26:
 note: previous declaration of ‘Py_ssize_t’ was 
here/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:26:
 note: previous declaration of ‘Py_ssize_t’ was here
[translation:ERROR]
[translation:ERROR]     In file included from common_header.h:145,
[translation:ERROR]                      from data_pypy_goal_1.c:4In file 
included from common_header.h:145,
[translation:ERROR]                      from data_pypy_interpreter.c:4:
[translation:ERROR]     :
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:63:1: 
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:63:1: 
warning: warning: "PY_SSIZE_T_MAX" redefined"PY_SSIZE_T_MAX" redefined
[translation:ERROR]
[translation:ERROR]     In file included from common_header.h:126In file 
included from common_header.h:126,
[translation:ERROR]                      from data_pypy_interpreter.c:4,
[translation:ERROR]                      from data_pypy_goal_1.c:4:
[translation:ERROR]     :
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:27:1:/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:27:1:
  warning: warning: this is the location of the previous definitionthis is the 
location of the previous definition
[translation:ERROR]
[translation:ERROR]     In file included from 
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:115,
[translation:ERROR]                      from common_header.h:145,
[translation:ERROR]                      from data_pypy_goal_1.c:4:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/unicodeobject.h:17: 
error: redefinition of typedef ‘Py_UNICODE’In file included from 
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:115,
[translation:ERROR]                      from common_header.h:145,
[translation:ERROR]                      from data_pypy_interpreter.c:4:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/unicodeobject.h:17: 
error: redefinition of typedef ‘Py_UNICODE’
[translation:ERROR]
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:25:
 note: previous declaration of ‘Py_UNICODE’ was 
here/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:25:
 note: previous declaration of ‘Py_UNICODE’ was here
[translation:ERROR]
[translation:ERROR]     In file included from common_header.h:145,
[translation:ERROR]                      from testing_1.c:1:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:59: error: 
redefinition of typedef ‘Py_ssize_t’
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:26:
 note: previous declaration of ‘Py_ssize_t’ was here
[translation:ERROR]     In file included from common_header.h:145,
[translation:ERROR]                      from testing_1.c:1:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:63:1: 
warning: "PY_SSIZE_T_MAX" redefined
[translation:ERROR]     In file included from common_header.h:126,
[translation:ERROR]                      from testing_1.c:1:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:27:1:
 warning: this is the location of the previous definition
[translation:ERROR]     In file included from 
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:115,
[translation:ERROR]                      from common_header.h:145,
[translation:ERROR]                      from testing_1.c:1:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/unicodeobject.h:17: 
error: redefinition of typedef ‘Py_UNICODE’
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:25:
 note: previous declaration of ‘Py_UNICODE’ was here
[translation:ERROR]     In file included from common_header.h:145,
[translation:ERROR]                      from data_pypy_goal.c:4:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:59: error: 
redefinition of typedef ‘Py_ssize_t’
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:26:
 note: previous declaration of ‘Py_ssize_t’ was here
[translation:ERROR]     In file included from common_header.h:145,
[translation:ERROR]                      from data_pypy_goal.c:4:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:63:1: 
warning: "PY_SSIZE_T_MAX" redefined
[translation:ERROR]     In file included from common_header.h:126,
[translation:ERROR]                      from data_pypy_goal.c:4:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:27:1:
 warning: this is the location of the previous definition
[translation:ERROR]     In file included from 
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/Python.h:115,
[translation:ERROR]                      from common_header.h:145,
[translation:ERROR]                      from data_pypy_goal.c:4:
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/cpyext/include/unicodeobject.h:17: 
error: redefinition of typedef ‘Py_UNICODE’
[translation:ERROR]     
/root/pypy-5.0.0-src/rpython/../pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.h:25:
 note: previous declaration of ‘Py_UNICODE’ was here
[translation:ERROR]     make: ** [data_pypy_goal_1.gcmap] Erro 1
[translation:ERROR]     make: ** Esperando que outros processos terminem.
[translation:ERROR]     make: ** [data_pypy_interpreter.gcmap] Erro 1
[translation:ERROR]     make: ** [data_pypy_goal.gcmap] Erro 1
[translation:ERROR]     make: ** [testing_1.gcmap] Erro 1
[translation:ERROR]     """)
[translation] start debugger...
> /root/pypy-5.0.0-src/rpython/translator/platform/__init__.py(151)_handle_error()
-> raise CompilationError(stdout, stderr)
(Pdb+) 
```


_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to