[pypy-dev] Failed to translate PyPy Python interpreter on Snow Leopard

Olli Wang olliwang at ollix.com
Sun Dec 13 17:03:51 CET 2009


Hi, thanks for replying. I tried the targetgcbench program but still failed.
Here's the error message:

[translation:info] written:
/var/folders/m9/m9iGqKJ2EACAKiV+yD8Lb++++TI/-Tmp-/usession-trunk-1/testing_1/testing_1.c
 [translation:info] Compiling c source...
[platform:execute] gcc -c -O3 -fomit-frame-pointer -mmacosx-version-min=10.4
-mdynamic-no-pic
-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-I/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c
/var/folders/m9/m9iGqKJ2EACAKiV+yD8Lb++++TI/-Tmp-/usession-trunk-1/testing_1/testing_1.c
-o
/var/folders/m9/m9iGqKJ2EACAKiV+yD8Lb++++TI/-Tmp-/usession-trunk-1/testing_1/testing_1.o
 [platform:ERROR] In file included from
/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/src/g_include.h:54,
[platform:ERROR]                  from
/var/folders/m9/m9iGqKJ2EACAKiV+yD8Lb++++TI/-Tmp-/usession-trunk-1/testing_1/testing_1.c:42:
 [platform:ERROR]
/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/src/debug.h: In
function 'pypy_read_timestamp':
[platform:ERROR]
/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/src/debug.h:134:
error: incompatible type for argument 1 of 'gettimeofday'
[Timer] Timings:
[Timer] annotate                       ---  0.7 s
[Timer] rtype_lltype                   ---  2.3 s
[Timer] backendopt_lltype              ---  0.5 s
[Timer] stackcheckinsertion_lltype     ---  0.0 s
[Timer] database_c                     ---  9.2 s
[Timer] source_c                       ---  2.0 s
[Timer] compile_c                      ---  0.5 s
[Timer] =========================================
[Timer] Total:                         --- 15.3 s
[translation:ERROR] Error:
[translation:ERROR]  Traceback (most recent call last):
[translation:ERROR]    File "translate.py", line 277, in main
[translation:ERROR]     drv.proceed(goals)
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/driver.py", line
741, in proceed
[translation:ERROR]     return self._execute(goals, task_skip =
self._maybe_skip())
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/tool/taskengine.py",
line 116, in _execute
[translation:ERROR]     res = self._do(goal, taskcallable, *args, **kwds)
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/driver.py", line
279, in _do
[translation:ERROR]     res = func()
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/driver.py", line
504, in task_compile_c
[translation:ERROR]     cbuilder.compile()
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/genc.py", line
452, in compile
[translation:ERROR]     self.executable_name = compiler.build()
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/genc.py", line
87, in build
[translation:ERROR]     return self._build()
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/genc.py", line
82, in _build
[translation:ERROR]     outputfilename=self.outputfilename)
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/platform/__init__.py",
line 63, in compile
 [translation:ERROR]     ofiles = self._compile_o_files(cfiles, eci,
standalone)
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/platform/__init__.py",
line 72, in _compile_o_files
[translation:ERROR]     ofiles.append(self._compile_c_file(self.cc, cfile,
compile_args))
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/platform/posix.py",
line 33, in _compile_c_file
[translation:ERROR]     self._execute_c_compiler(cc, args, oname)
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/platform/__init__.py",
line 106, in _execute_c_compiler
[translation:ERROR]     self._handle_error(returncode, stderr, stdout,
outname)
[translation:ERROR]    File
"/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/platform/__init__.py",
line 117, in _handle_error
[translation:ERROR]     raise CompilationError(stdout, stderr)
[translation:ERROR]  CompilationError: <CompilationError err="In file
included from
/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/src/g_include.h:54,\n
             ...rkspace/repo/pypy-trunk/pypy/translator/c/src/debug.h:134:
error: incompatible type for argument 1 of 'gettimeofday'\n">


On Sun, Dec 13, 2009 at 8:08 PM, Armin Rigo <arigo at tunes.org> wrote:

> Hi Olli,
>
> On Sun, Dec 13, 2009 at 02:22:54AM +0800, Olli Wang wrote:
> > and tried to translate the PyPy Python interpreter on Snow Leopard. But
> > unfortunately it always failed unexpectedly after a long time
> translating.
> > Here's the error messages, any idea? Thanks.
>
> Ah, it's about clock_gettime(), which is a standard POSIX function that
> does not exist on Mac OS/X.  Should be fixed now; can you try again?
>
> You can try by compiling a much smaller program than the whole PyPy
> interpreter first.  For example:   ./translate.py targetgcbench
>
>
> A bientot,
>
> Armin.
>



-- 
Olli Wang

OLLI WANG PRODUCTIONS - http://olliwang.com
A BLOG ABOUT MY LIFE AND MY WORK



-- 
Olli Wang

OLLI WANG PRODUCTIONS - http://olliwang.com
A BLOG ABOUT MY LIFE AND MY WORK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20091214/54f4df8f/attachment.html>


More information about the Pypy-dev mailing list