# Cross-compile some ports on amd64 for i386



## YuryG (Jun 19, 2016)

I have two FreeBSD-stable installations, on a newer AMD FX-8300 processor, amd64 and on an old one Intel Pentium-4, i386. Mostly I build ports from sources (with a support of `portupgrade`). I use these computers as desktops with MATE and some web and office applications among others. Mostly I build all ports from sources, all for AMD FX, but when it comes to an old computer, I have not several days to recompile some huge ports like www/chromium, for example. So, the reasonable idea comes to cross-compile some ports on FX and then transfer to Pentium system.

Are there any suitable tools and how-to's? Or it has more draw-backs than advantages?


----------



## tobik@ (Jun 19, 2016)

amd64 hosts can run i386 jails. If you create a i386 jail on your AMD system you can compile ports in there.

Or use ports-mgmt/poudriere which can manage jail creation/package building for you.  I believe they do the same on the FreeBSD build cluster to build i386 packages.  See https://github.com/freebsd/poudriere/wiki/pkg_repos on how to do this.


----------



## kpa (Jun 19, 2016)

I haven't tried myself but ports-mgmt/synth is supposed to be able to do such cross-compilation as well. Poudriere handles the cross-compilation as expected and it's recommended to use it in case the target system is very old and slow machine and compiling ports on it is not feasible.


----------

