In a previous question I asked about creating a chroot that simulates my embedded device environment. It was suggested that I build from source GCC and binutils first inside my chroot. To attempt this I copied the version of libc and gcc binary on my host machine to the chroot. I then wrote a simple hello world program to a file test.c and tried to build in my chroot as follows
phil@phil-desktop:/usr$ sudo chroot /usr/embedded_chroot1/ bash-4.2# gcc test.c gcc: error trying to exec 'cc1': execvp: No such file or directory
I am not too sure what is going on here with this error. I have copied the gcc binary and libc to my chroot so why am I unable to compile? Must I copy all system source and header files into my chroot also?? I think I have a conceptual misunderstanding with the whole process of using a chroot.