title: chroot or virtual jail enviroment -- for cross-compiling?
body: <p>I am lloking forward to compile for my ARM target on my host Ubuntu.<br>
  <a href="http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&amp;t=8478" rel="nofollow noreferrer">http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&amp;t=8478</a></p>
  
  <p>Above links states to use chroot &amp; directly compile your program into the rootfile system of your target on your host.</p>
  
  <p>Some suggest to use jail virtual enviroment like scratchbox.<br>
  <a href="https://stackoverflow.com/questions/2336750/setting-up-a-cross-compilation-environment-for-a-specific-target-platform">Setting up a cross-compilation environment for a specific target platform</a></p>
  
  <p><a href="https://en.wikipedia.org/wiki/Chroot" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Chroot</a>  </p>
  
  <pre><code>The chroot mechanism is not intended to defend against intentional tampering by privileged (root) users. On most systems, chroot contexts do not stack properly and chrooted programs with sufficient privileges may perform a second chroot to break out. To mitigate the risk of this security weakness, chrooted programs should relinquish root privileges as soon as practical after chrooting, or other mechanisms – such as FreeBSD Jails - should be used instead. Note that some systems, such as FreeBSD, take precautions to prevent the second chroot attack.[1]
  So i am investigating on it for few days here i am not able to understand what above statement means. 
  </code></pre>
  
  <p>1> What exact advantage is virtual jail enviroment over chroot ?</p>
  
  <p>2> Does chroot affect all the terminals opened or .. a particular terminal on which command is run ?</p>
  
  <p>3> What exactly should we use for cross-compiling Jail like scratch-box or chroot.</p>