gcc in chroot

Jeremy C. Reed reed at reedmedia.net
Thu Jun 15 15:04:52 MST 2006


On Thu, 15 Jun 2006, Darrin Chandler wrote:

> One thing to keep in mind is that every utility and library you need
> must exist inside the chroot. Unless Jeremy knows of an easy way to set
> this up, it's going to involve some effort for what you want. It's
> fairly easy to chroot mysql or apache. Less so when you need major parts
> of your tools chain. Often you'll need to use ldd to find what you need
> to move into the chroot (or hardlink as you've done). Then ldd on
> *those* results. Repeat until done.
> 
> Jeremy, is there an easier way?!

Install your package management tools into your chroot (and make them work 
using your ldd advice above). And then use pkg_add, rpm, dpkg, whatever, 
to install your needed tools and dependencies, etc.

Your chroot will need access to the pre-built packages.

I use a chroot environment to build Linux packages for my custom distro. 
Sometimes, I also use chroot environments for doing package builds for 
DragonFly.

With the BSDs it is very easy: build your base system and then for the 
install just define your destination, for example on FreeBSD: "make 
installworld DESTDIR=/my/new/location" but that is another story :)


 Jeremy C. Reed

echo '9,J8HD,fDGG8B@?:536FC5=8 at I;C5?@H5B0D at 5GBIELD54DL>@8L?:5GDEJ8LDG1' |\
sed ss,s50EBsg | tr 0-M 'p.wBt SgiIlxmLhan:o,erDsduv/cyP'


More information about the PLUG-discuss mailing list