This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 6.3.0 compiling as user gives permission denied
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Marek <mlf dot conv at gmail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 30 Jun 2017 08:50:54 +0100
- Subject: Re: gcc 6.3.0 compiling as user gives permission denied
- Authentication-results: sourceware.org; auth=none
- References: <CA+sqOsaMhniPt0_gkPtwRryMKa6J6dQFmxj-6cPMDWR0p8AXDQ@mail.gmail.com>
On 30 June 2017 at 00:18, Marek wrote:
> compiling gcc as a part of toolchain (linux from scratch) gives me the
> following error when compiling as user
> but compiles fine when compiling as root:
>
> --prefix=/tools \
> --target=x86_64-lfs-linux-gnu \
> --with-sysroot=/media/usbdisk \
> --with-glib-version=2.25 \
> --with-newlib \
> --without-headers \
> --with-local-prefix=/tools\
> --with-native-system-header-dir=/tools/include \
> --disable-nls \
> --disable-shared \
> --disable-multilib \
> --disable-decimal-float \
> --disable-threads \
> --disable-libatomic \
> --disable-libgomp \
> --disable-libitm \
> --disable-libquadmath \
> --disable-libssp \
> --disable-libvtv \
> --disable-nls \
> --with-system-zlib \
> --with-gxx-include-dir=/tools/x86_64-lfs-linux-gnu/include/c++/6.3.0 \
> --disable-libmpx \
> --enable-languages=c,c++ \
> --disable-libstdcxx"
>
> configure: error: in
> `/run/media/void/minnow/build/gcc-6.3.0/x86_64-lfs-linux-gnu/libgcc':
> configure: error: cannot compute suffix of object files: cannot compile
> See `config.log' for more details.
> make[1]: *** [Makefile:11601: configure-target-libgcc] Error 1
>
> configure:3462: /run/media/void/minnow/build/gcc-6.3.0/./gcc/xgcc
> -B/run/media/void/minnow/build/gcc-6.3.0/./gcc/
> -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/
> -isystem /tools/x86_64-lfs-linux-gnu/include -isystem
> /tools/x86_64-lfs-linux-gnu/sys-include -o conftest -g -O2
> conftest.c >&5
> cc1: error: /tools/x86_64-lfs-linux-gnu/include: Permission denied
> cc1: error: /tools/x86_64-lfs-linux-gnu/sys-include: Permission denied
> configure:3465: $? = 1
> configure:3653: checking for suffix of object files
> configure:3675: /run/media/void/minnow/build/gcc-6.3.0/./gcc/xgcc
> -B/run/media/void/minnow/build/gcc-6.3.0/./gcc/
> -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/
> -isystem /tools/x86_64-lfs-linux-gnu/include -isystem
> /tools/x86_64-lfs-linux-gnu/sys-include -c -g -O2 conftest.c >&5
> cc1: error: /tools/x86_64-lfs-linux-gnu/include: Permission denied
> cc1: error: /tools/x86_64-lfs-linux-gnu/sys-include: Permission denied
Your user doesn't have permission to read these directories.
You configured GCC to look in there, so it needs to be able to look in there.