Skip to content
Snippets Groups Projects
Commit 1165836a authored by Armin Rigo's avatar Armin Rigo
Browse files

Re-run yatiblog.

parent 12227c7c
No related branches found
No related tags found
No related merge requests found
......@@ -187,7 +187,8 @@
<div class="section" id="note-on-building-a-32-bit-version-on-64-bit-systems">
<span id="here-are-hints"></span><h2>Note on building a 32-bit version on 64-bit systems</h2>
<p>To build 32-bit versions of <tt class="docutils literal"><span class="pre">pypy-c</span></tt> you need to run <tt class="docutils literal">translate.py</tt>
in a 32-bit version of Python. You can check with:</p>
in a 32-bit version of Python, and to make sure that the C compiler it
uses is also 32-bit. You can check the first condition with:</p>
<pre class="literal-block">
$ python
Python 2.6.2 (...)
......@@ -195,6 +196,11 @@
&gt;&gt;&gt; sys.maxint
</pre>
<p>This prints 9223372036854775807 in 64-bit versions and 2147483647 in
32-bit versions.</p>
<p>On Linux, you may have to compile yourself a 32-bit Python, e.g.:</p>
32-bit versions. Moreover, if your Python is 32-bit but your C compiler
is 64-bit, you will get <tt class="docutils literal">AssertionError: Mixed configuration of the
word size of the machine</tt> when running <tt class="docutils literal">translate.py.</tt></p>
<p><strong>On Linux,</strong> the recommended way is to install and run in a fully
32-bit chroot (e.g. with the <tt class="docutils literal">schroot</tt> Ubuntu package). The
alternative has issues about building some extension modules, but if you
want to try it, first compile yourself a 32-bit Python, e.g.:</p>
<pre class="literal-block">
......@@ -200,3 +206,5 @@
<pre class="literal-block">
# on Ubuntu Linux, you need at least:
apt-get install libc6-dev-i386 ia32-libs lib32z1-dev lib32ncurses5-dev
cd Python-2.6.4
CC=&quot;gcc -m32&quot; LDFLAGS=&quot;-L/lib32 -L/usr/lib32 \
......@@ -201,5 +209,5 @@
cd Python-2.6.4
CC=&quot;gcc -m32&quot; LDFLAGS=&quot;-L/lib32 -L/usr/lib32 \
-L`pwd`/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32&quot; \
-Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32&quot; \
./configure
make
......@@ -204,4 +212,8 @@
./configure
make
# and then use this ./python to run translate.py
</pre>
<p>And then run <tt class="docutils literal">translate.py</tt> as follows:</p>
<pre class="literal-block">
cd pypy/translator/goal
CC=&quot;gcc -m32&quot; /path/to/32bit/python translate.py ...
</pre>
......@@ -207,8 +219,9 @@
</pre>
<p>On Mac OS/X: the easiest is to systematically use Python 2.5 when
working with PyPy. Indeed, the standard Python 2.5 runs in 32-bit mode.</p>
<p>On Windows, the only known way is to install a 32-bit Python
manually.</p>
<p><strong>On Mac OS/X,</strong> the easiest is to systematically use Python 2.5 when
working with PyPy. Indeed, the standard Python 2.5 runs in 32-bit mode.
(XXX how to run the compiler in 32-bit mode??)</p>
<p><strong>On Windows,</strong> the only known way is to install a 32-bit Python
manually. (XXX how to run the compiler in 32-bit mode??)</p>
</div>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment