gcc in chroot

Eric "Shubes" plug at shubes.net
Thu Jun 15 14:13:48 MST 2006


I'm trying to build a chroot environment that allows me to build binary 
rpms and install them without affecting the 'real' (live) installed 
package. This is on CentOS 4.3, but I'm hoping that maybe a gentoo guru 
might have an idea or two.

I've written a script that builds the chroot tree under /mnt, and takes 
into account named pipes and special device files. So far so good.

When I try to build a source package in the chroot jail, I get the 
following message:

gcc: installation problem, cannot exec `cc1': No such file or directory

I can't figure out why gcc can't find cc1. It's in the same place in 
both environments:
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/cc1
/usr/libexec/gcc/i386-redhat-linux/3.4.3/cc1
and permissions/owners are the same (I'm running as root anywise).

In fact, they're the same exact file. I used hard links instead of 
copies in the chroot tree.

My eyes have become googly. I found references to this error, but the 
solutions were either to re-install or get out of jail (no chroot).

Does anyone know how I can track this down to get compiles to run in a 
chroot jail?

I'll keep looking...

TIA
-- 
-Eric 'shubes'


More information about the PLUG-discuss mailing list