title: Compiling for amd64 under i386 Debian
body: <p>Cheers,</p>
  
  <p>I want to avoid problems with compiling my code on <code>amd64</code>, yet <strong>I don't have a 64-bit CPU</strong> available and have no hopes of getting upgrade to my machine any time soon. I have no dreams of testing the code (although that should theoretically be possible using <code>qemu-system</code>) but I'd like to at least compile the code using <code>gcc -m64</code>.</p>
  
  <p>Basic idea works:</p>
  
  <pre><code>CFLAGS=-m64 CXXFLAGS=-m64 ./configure --host x86_64-debian-linux
  </code></pre>
  
  <p>However, the code depends on some libraries which I typically install from Debian packages, such as <code>libsdl1.2-dev</code>, <code>libgmp3-dev</code> and such. Obviously, getting 64-bit versions of packages installed alongside of 32-bit versions is not a one-liner.</p>
  
  <p>What would be your practices for installing the 64-bit packages? Where would you put them, how would you get them there and how would you use them?</p>
  
  <p>To repeat, I <strong>don't have</strong> 64-bit CPU and cannot afford getting a new machine.</p>
  
  <p>I have already set up <code>amd64-libs-dev</code> to give some basic push to gcc's <code>-m64</code>.</p>
  
  <p>Attempted so far:</p>
  
  <ul>
  <li>Setting up a 64-bit chroot jail with <code>debootstrap</code> in order to simplify installation of 64-bit development packages for libraries. Failed since finishing the setup (and installing anything afterwards!) requires 64-bit CPU.</li>
  <li>Installing <code>gcc-multilib</code> and <code>g++-multilib</code>. This appears to do nothing beside depending on <code>libc6-dev-amd64</code> which I already installed through <code>amd64-libs-dev</code>.</li>
  </ul>