From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A7F4B3858028; Tue, 15 Aug 2023 10:51:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7F4B3858028 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692096707; bh=BlTJFR1XgypURgIOLkSF/u179vLHYjBE+U05OQErIzY=; h=From:To:Subject:Date:From; b=sJbZxli7fEldmlnKU2/esy4bLx/7TRTwCzusj+kK+jwe2mT0Jp3+3MeCFAiBQ4mAt DRGsyndyWO6o4SVkCjabpDR5Uq7MddlA8NETRgs+000zuF/lvgTzmTJxwztxaYIxw+ wWGyijz6smMAdm294Lsy/LZZqEAmRTAmr+Ls7HAg= From: "etienne_lorrain at yahoo dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/111027] New: Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible Date: Tue, 15 Aug 2023 10:51:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: etienne_lorrain at yahoo dot fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111027 Bug ID: 111027 Summary: Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: etienne_lorrain at yahoo dot fr Target Milestone: --- On an ARM32 Linux system just installed, i.e. parallellla board just flashed with an SDCard image at https://github.com/parallella/parabuntu/releases/download/parabuntu-2019.1-= beta1/parabuntu-2019.1-beta1-headless-z7010.img.gz , full compilation works fine with: mkdir vega # limited SDCard storage so: sudo mount 192.168.1.84:/home/etienne/parallella /home/parallella/vega cd vega wget https://ftp.gnu.org/gnu/gcc/gcc-13.2.0/gcc-13.2.0.tar.xz tar xf gcc-13.2.0.tar.xz=20 cd gcc-13.2.0/ ./contrib/download_prerequisites cd .. mkdir gcc_build cd gcc_build ../gcc-13.2.0/configure --enable-languages=3Dc,c++,fortran time make -j 3 # SDCard real 2033m27.533s / NFS real: 2065m36.178s But install fails with: $ echo parallella | sudo -S make install ... /usr/bin/install -c -m 644 ../../gcc-13.2.0/gcc/cp/operators.def /usr/local/lib/gcc/armv7l-unknown-linux-gnueabihf/13.2.0/plugin/include/cp/= operators.def /usr/bin/install -c -m 644 ../../gcc-13.2.0/gcc/cp/cp-trait.def /usr/local/lib/gcc/armv7l-unknown-linux-gnueabihf/13.2.0/plugin/include/cp/= cp-trait.def /usr/bin/install -c -m 644 ../../gcc-13.2.0/gcc/cp/contracts.h /usr/local/lib/gcc/armv7l-unknown-linux-gnueabihf/13.2.0/plugin/include/cp/= contracts.h rm -f tmp-header-vars echo USER_H=3D ... some filenames ... >> tmp-header-vars; echo HASHTAB_H=3Dhashtab.h >> tmp-header-vars; echo OBSTACK_H=3Dobstack.h >> tmp-header-vars; echo SPLAY_TREE_H=3Dsplay-tree.h >> tmp-header-vars; ...pl= enty more .. ; echo GTFILES_LANG_H=3Dgtype-ada.h gtype-c.h gtype-cp.h gtype-d.h gtype-fortran.h gtype-go.h gtype-jit.h gtype-lto.h gtype-m2.h gtype-objc.h gtype-objcp.h gtype-rust.h >> tmp-header-vars; /bin/sh: tmp-header-vars: Permission denied /bin/sh: tmp-header-vars: Permission denied /bin/sh: tmp-header-vars: Permission denied ... lots of identical messages ... Makefile:3736: recipe for target 's-header-vars' failed make[2]: *** [s-header-vars] Error 1 make[2]: Leaving directory '/home/parallella/vega/gcc_build/gcc' Makefile:5361: recipe for target 'install-gcc' failed make[1]: *** [install-gcc] Error 2 make[1]: Leaving directory '/home/parallella/vega/gcc_build' Makefile:2632: recipe for target 'install' failed make: *** [install] Error 2 The problem is simple, I am just creating this bug report so that people can google it. That is the first time "root" (due to sudo) tries to create a simple file in the build directory, and such build directory is mounted on a NFS filesyste= m. The NFS server may not configure the export with "no_root_squash", so that a standard user can create such a file "tmp-header-vars", but root cannot! Maybe a simple test (and a better error message) could be created when root cannot create a file in the build directory? Obviously root will create fil= es without problems on /usr/local/{bin,lib,....}. Feel free to classify as "NOTABUG", just keep it accessible in search engin= es! Best Regards, Etienne.=