gcc 6.3.0 compiling as user gives permission denied
Jonathan Wakely
jwakely.gcc@gmail.com
Fri Jun 30 07:51:00 GMT 2017
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.
More information about the Gcc
mailing list