After lot of googling and posting and crying over obscure GCC linker error messages I concluded that the only way to reliably build something in foreign CPU architecture is to set up a chroot environment. That is kind of funny, because I'm already running Debian in VirtualBox, so now it will be virtual system in virtual system.
As I read through various tutorials on chroot I noticed two things that I don't like about them:
They always include a command that downloads system from some URL they have chosen, like below. I want to use similar system I already have, and as minified as possible.
sudo debootstrap --variant=buildd --arch i386 lucid /var/chroot/ http://mirror.url.com/ubuntu/
- There's never actual mention about compiling a project that is located on host system. Like I don't really want to copy my project somewhere - if that was the case, I can just setup another virtual box system.
So I wanted to ask if someone actually did manage to create chroot system and used it to build a project. Of course it would be ideal if that system was as minimal as possible since I'm just installing it for libraries. And it would be really nice if it just downloaded 32bit version of 64bit system it's running from.
Linux programmers keep saying how programming on Linux is much easier than windows. I'd love to finally experience some of that.