title: Error during make gcc: "cp: Permission denied"
body: <h1>What I did</h1>
  
  <p>In my initially empty build directory, I configure gcc with</p>
  
  <p><code>/home/anthony/Documents/gcc-pi/gcc/configure --prefix=/opt/gcc --enable-multilib --disable-shared --enable-static --disable-bootstrap --disable-libstdcxx-pch --enable-languages=all --enable-libgomp --enable-threads=posix --enable-tls --with-system-zlib --with-isl --enable-__cxa_atexit --enable-host-shared CFLAGS='-lpthread -fPIC' CXXFLAGS='-lpthread -fPIC' CPPFLAGS='-fPIC'</code></p>
  
  <p>I then issue <code>make</code> and after some successful building, the build ultimately fails with the following</p>
  
  <pre><code>make[2]: Entering directory '/home/anthony/Documents/gcc/gcc'
  mkdir -p ada/bldtools/sinfo
  rm -f ada/bldtools/sinfo/sinfo.ads ada/bldtools/sinfo/sinfo.adb ada/bldtools/sinfo/xsinfo.adb ada/bldtools/sinfo/csinfo.adb
  cp -p /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.ads /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/xsinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/csinfo.adb ada/bldtools/sinfo
  make[2]: cp: Permission denied
  make[2]: *** [/home/anthony/Documents/gcc-pi/gcc/gcc/ada/Make-generated.in:44: ada/sinfo.h] Error 127
  make[2]: Leaving directory '/home/anthony/Documents/gcc/gcc'
  make[1]: *** [Makefile:4411: all-gcc] Error 2
  make[1]: Leaving directory '/home/anthony/Documents/gcc'
  make: *** [Makefile:970: all] Error 2
  </code></pre>
  
  <h1>What I tried</h1>
  
  <p>I've tried</p>
  
  <ol>
  <li><code>sudo make</code></li>
  <li><code>sudo chmod 777 -R</code> the gcc source and build directories</li>
  <li><pre><code>sudo cp -p /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.ads /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/xsinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/csinfo.adb ada/bldtools/sinfod ```
  </code></pre></li>
  </ol>
  
  <p>all of which failed at advancing the build. Note that the last command succeeds, but when I try to continue the build after that, it yields the same error. </p>
  
  <p>Any ideas? Thanks in advance.</p>