<div class="gmail_quote">Hi, thanks for replying. I tried the targetgcbench program but still failed. Here&#39;s the error message:<div><br></div><div><div>[translation:info] written: /var/folders/m9/m9iGqKJ2EACAKiV+yD8Lb++++TI/-Tmp-/usession-trunk-1/testing_1/testing_1.c</div>

<div class="im">
<div>[translation:info] Compiling c source...</div></div><div>[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</div>

<div class="im">
<div>[platform:ERROR] In file included from /Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/src/g_include.h:54,</div></div><div>[platform:ERROR]                  from /var/folders/m9/m9iGqKJ2EACAKiV+yD8Lb++++TI/-Tmp-/usession-trunk-1/testing_1/testing_1.c:42:</div>

<div class="im">
<div>[platform:ERROR] /Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/src/debug.h: In function &#39;pypy_read_timestamp&#39;:</div></div><div>[platform:ERROR] /Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/src/debug.h:134: error: incompatible type for argument 1 of &#39;gettimeofday&#39;</div>


<div>[Timer] Timings:</div><div>[Timer] annotate                       ---  0.7 s</div><div>[Timer] rtype_lltype                   ---  2.3 s</div><div>[Timer] backendopt_lltype              ---  0.5 s</div><div>[Timer] stackcheckinsertion_lltype     ---  0.0 s</div>


<div>[Timer] database_c                     ---  9.2 s</div><div>[Timer] source_c                       ---  2.0 s</div><div>[Timer] compile_c                      ---  0.5 s</div><div>[Timer] =========================================</div>


<div>[Timer] Total:                         --- 15.3 s</div><div class="im"><div>[translation:ERROR] Error:</div><div>[translation:ERROR]  Traceback (most recent call last):</div><div>[translation:ERROR]    File &quot;translate.py&quot;, line 277, in main</div>


<div>[translation:ERROR]     drv.proceed(goals)</div><div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/driver.py&quot;, line 741, in proceed</div><div>[translation:ERROR]     return self._execute(goals, task_skip = self._maybe_skip())</div>


<div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/tool/taskengine.py&quot;, line 116, in _execute</div><div>[translation:ERROR]     res = self._do(goal, taskcallable, *args, **kwds)</div>


<div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/driver.py&quot;, line 279, in _do</div><div>[translation:ERROR]     res = func()</div><div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/driver.py&quot;, line 504, in task_compile_c</div>


<div>[translation:ERROR]     cbuilder.compile()</div><div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/genc.py&quot;, line 452, in compile</div><div>[translation:ERROR]     self.executable_name = compiler.build()</div>


</div><div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/genc.py&quot;, line 87, in build</div><div>[translation:ERROR]     return self._build()</div><div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/c/genc.py&quot;, line 82, in _build</div>


<div>[translation:ERROR]     outputfilename=self.outputfilename)</div><div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/platform/__init__.py&quot;, line 63, in compile</div>

<div>
[translation:ERROR]     ofiles = self._compile_o_files(cfiles, eci, standalone)</div><div class="im"><div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/platform/__init__.py&quot;, line 72, in _compile_o_files</div>


<div>[translation:ERROR]     ofiles.append(self._compile_c_file(self.cc, cfile, compile_args))</div><div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/platform/posix.py&quot;, line 33, in _compile_c_file</div>


<div>[translation:ERROR]     self._execute_c_compiler(cc, args, oname)</div><div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/platform/__init__.py&quot;, line 106, in _execute_c_compiler</div>


<div>[translation:ERROR]     self._handle_error(returncode, stderr, stdout, outname)</div><div>[translation:ERROR]    File &quot;/Users/olliwang/workspace/repo/pypy-trunk/pypy/translator/platform/__init__.py&quot;, line 117, in _handle_error</div>


<div>[translation:ERROR]     raise CompilationError(stdout, stderr)</div></div><div>[translation:ERROR]  CompilationError: &lt;CompilationError err=&quot;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 &#39;gettimeofday&#39;\n&quot;&gt;</div>

<div><div></div><div class="h5">
<div><br></div><br><div class="gmail_quote">On Sun, Dec 13, 2009 at 8:08 PM, Armin Rigo <span dir="ltr">&lt;<a href="mailto:arigo@tunes.org" target="_blank">arigo@tunes.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi Olli,<br>
<div><br>
On Sun, Dec 13, 2009 at 02:22:54AM +0800, Olli Wang wrote:<br>
&gt; and tried to translate the PyPy Python interpreter on Snow Leopard. But<br>
&gt; unfortunately it always failed unexpectedly after a long time translating.<br>
&gt; Here&#39;s the error messages, any idea? Thanks.<br>
<br>
</div>Ah, it&#39;s about clock_gettime(), which is a standard POSIX function that<br>
does not exist on Mac OS/X.  Should be fixed now; can you try again?<br>
<br>
You can try by compiling a much smaller program than the whole PyPy<br>
interpreter first.  For example:   ./translate.py targetgcbench<br>
<br>
<br>
A bientot,<br>
<font color="#888888"><br>
Armin.<br>
</font></blockquote></div><br><br clear="all"><br></div></div><div class="im">-- <br>Olli Wang<br><br>OLLI WANG PRODUCTIONS - <a href="http://olliwang.com" target="_blank">http://olliwang.com</a><br>A BLOG ABOUT MY LIFE AND MY WORK<br>


</div></div>
</div><br><br clear="all"><br>-- <br>Olli Wang<br><br>OLLI WANG PRODUCTIONS - <a href="http://olliwang.com">http://olliwang.com</a><br>A BLOG ABOUT MY LIFE AND MY WORK<br>