public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/111027] New: Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible
@ 2023-08-15 10:51 etienne_lorrain at yahoo dot fr
  2023-08-15 13:43 ` [Bug other/111027] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: etienne_lorrain at yahoo dot fr @ 2023-08-15 10:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111027

            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 
cd gcc-13.2.0/
./contrib/download_prerequisites
cd ..
mkdir gcc_build
cd gcc_build
../gcc-13.2.0/configure --enable-languages=c,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= ... some filenames ... >> tmp-header-vars; echo
HASHTAB_H=hashtab.h >> tmp-header-vars; echo OBSTACK_H=obstack.h >>
tmp-header-vars; echo SPLAY_TREE_H=splay-tree.h >> tmp-header-vars; ...plenty
more .. ; echo GTFILES_LANG_H=gtype-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 filesystem.
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 files
without problems on /usr/local/{bin,lib,....}.

Feel free to classify as "NOTABUG", just keep it accessible in search engines!

Best Regards, Etienne.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug other/111027] Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible
  2023-08-15 10:51 [Bug other/111027] New: Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible etienne_lorrain at yahoo dot fr
@ 2023-08-15 13:43 ` rguenth at gcc dot gnu.org
  2023-08-16 23:58 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-15 13:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111027

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think the bug is that make install writes to the build directory at all (OTOH
libtool tends to re-link, but this instance seems to be different).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug other/111027] Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible
  2023-08-15 10:51 [Bug other/111027] New: Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible etienne_lorrain at yahoo dot fr
  2023-08-15 13:43 ` [Bug other/111027] " rguenth at gcc dot gnu.org
@ 2023-08-16 23:58 ` pinskia at gcc dot gnu.org
  2023-08-20  8:16 ` [Bug bootstrap/111027] [11/12/13/14 Regression] `make install` touches the build directory; " pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-16 23:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111027

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This might fix the issue:
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index a00dad965c5..267f6258ee3 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3686,6 +3686,7 @@ install: install-common $(INSTALL_HEADERS) \

 ifeq ($(enable_plugin),yes)
 install: install-plugin
+all: s-header-vars
 endif

 install-strip: override INSTALL_PROGRAM = $(INSTALL_STRIP_PROGRAM)


By creating `s-header-vars` while building instead of just while doing the
installing ...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/111027] [11/12/13/14 Regression] `make install` touches the build directory; Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible
  2023-08-15 10:51 [Bug other/111027] New: Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible etienne_lorrain at yahoo dot fr
  2023-08-15 13:43 ` [Bug other/111027] " rguenth at gcc dot gnu.org
  2023-08-16 23:58 ` pinskia at gcc dot gnu.org
@ 2023-08-20  8:16 ` pinskia at gcc dot gnu.org
  2023-08-21 12:12 ` etienne_lorrain at yahoo dot fr
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-20  8:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111027

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.5.0
      Known to work|                            |4.4.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
            Summary|Install error               |[11/12/13/14 Regression]
                   |"tmp-header-vars:           |`make install` touches the
                   |Permission denied", build   |build directory; Install
                   |on NFS, improvement         |error "tmp-header-vars:
                   |possible                    |Permission denied", build
                   |                            |on NFS, improvement
                   |                            |possible
   Target Milestone|---                         |11.5
   Last reconfirmed|                            |2023-08-20

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

Introduced in r0-97381-g090fa0ab610a for GCC 4.5.0 so it is techincally a
regression.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/111027] [11/12/13/14 Regression] `make install` touches the build directory; Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible
  2023-08-15 10:51 [Bug other/111027] New: Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible etienne_lorrain at yahoo dot fr
                   ` (2 preceding siblings ...)
  2023-08-20  8:16 ` [Bug bootstrap/111027] [11/12/13/14 Regression] `make install` touches the build directory; " pinskia at gcc dot gnu.org
@ 2023-08-21 12:12 ` etienne_lorrain at yahoo dot fr
  2023-08-23  8:06 ` etienne_lorrain at yahoo dot fr
  2024-03-07 23:24 ` law at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: etienne_lorrain at yahoo dot fr @ 2023-08-21 12:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111027

--- Comment #4 from etienne_lorrain at yahoo dot fr ---
Parallella box is free again.
Proposed patch (with a slight offset) is recompiling, result in 2065m36.178s...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/111027] [11/12/13/14 Regression] `make install` touches the build directory; Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible
  2023-08-15 10:51 [Bug other/111027] New: Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible etienne_lorrain at yahoo dot fr
                   ` (3 preceding siblings ...)
  2023-08-21 12:12 ` etienne_lorrain at yahoo dot fr
@ 2023-08-23  8:06 ` etienne_lorrain at yahoo dot fr
  2024-03-07 23:24 ` law at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: etienne_lorrain at yahoo dot fr @ 2023-08-23  8:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111027

--- Comment #5 from etienne_lorrain at yahoo dot fr ---
Hello, full recompilation from source finished (your patch included), same
setup with NFS without "no_root_squash" on /home/parallella/veg, installation
goes further but stop at:

$ echo parallella | sudo -S make install
....
 /bin/mkdir -p '/usr/local/lib/.'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libcc1.la
'/usr/local/lib/.'
libtool: install: warning: relinking `libcc1.la'
libtool: install: (cd /home/parallella/vega/gcc_build1/libcc1; /bin/sh
/home/parallella/vega/gcc_build1/libcc1/libtool  --tag CXX --mode=relink
/home/parallella/vega/gcc_build1/./gcc/xg++
-B/home/parallella/vega/gcc_build1/./gcc/ -nostdinc++ -nostdinc++
-I/home/parallella/vega/gcc_build1/armv7l-unknown-linux-gnueabihf/libstdc++-v3/include/armv7l-unknown-linux-gnueabihf
-I/home/parallella/vega/gcc_build1/armv7l-unknown-linux-gnueabihf/libstdc++-v3/include
-I/home/parallella/vega/gcc-13.2.0/libstdc++-v3/libsupc++
-I/home/parallella/vega/gcc-13.2.0/libstdc++-v3/include/backward
-I/home/parallella/vega/gcc-13.2.0/libstdc++-v3/testsuite/util
-L/home/parallella/vega/gcc_build1/armv7l-unknown-linux-gnueabihf/libstdc++-v3/src
-L/home/parallella/vega/gcc_build1/armv7l-unknown-linux-gnueabihf/libstdc++-v3/src/.libs
-L/home/parallella/vega/gcc_build1/armv7l-unknown-linux-gnueabihf/libstdc++-v3/libsupc++/.libs
-B/home/parallella/vega/gcc_build1/armv7l-unknown-linux-gnueabihf/libstdc++-v3/src/.libs
-B/home/parallella/vega/gcc_build1/armv7l-unknown-linux-gnueabihf/libstdc++-v3/libsupc++/.libs
-B/usr/local/armv7l-unknown-linux-gnueabihf/bin/
-B/usr/local/armv7l-unknown-linux-gnueabihf/lib/ -isystem
/usr/local/armv7l-unknown-linux-gnueabihf/include -isystem
/usr/local/armv7l-unknown-linux-gnueabihf/sys-include -W -Wall
-fvisibility=hidden -g -O2 -D_GNU_SOURCE -module -export-symbols
../../gcc-13.2.0/libcc1/libcc1.sym -Xcompiler -static-libstdc++ -Xcompiler
-static-libgcc -o libcc1.la -rpath /usr/local/lib/. findcomp.lo libcc1.lo
libcp1.lo compiler.lo names.lo callbacks.lo connection.lo marshall.lo
-Wc,../libiberty/pic/libiberty.a )
mv: cannot move 'libcc1.so.0.0.0' to 'libcc1.so.0.0.0U': Permission denied
libtool: install: error: relink `libcc1.la' with the above command before
installing it
Makefile:497: recipe for target 'install-cc1libLTLIBRARIES' failed
make[3]: *** [install-cc1libLTLIBRARIES] Error 1
make[3]: Leaving directory '/home/parallella/vega/gcc_build1/libcc1'
Makefile:694: recipe for target 'install-am' failed
make[2]: *** [install-am] Error 2
make[2]: Leaving directory '/home/parallella/vega/gcc_build1/libcc1'
Makefile:20708: recipe for target 'install-libcc1' failed
make[1]: *** [install-libcc1] Error 2
make[1]: Leaving directory '/home/parallella/vega/gcc_build1'
Makefile:2632: recipe for target 'install' failed
make: *** [install] Error 2

I am keeping the setup ready for more patch in case it is needed, if your have
another change to try...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/111027] [11/12/13/14 Regression] `make install` touches the build directory; Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible
  2023-08-15 10:51 [Bug other/111027] New: Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible etienne_lorrain at yahoo dot fr
                   ` (4 preceding siblings ...)
  2023-08-23  8:06 ` etienne_lorrain at yahoo dot fr
@ 2024-03-07 23:24 ` law at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-07 23:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111027

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
                 CC|                            |law at gcc dot gnu.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-07 23:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15 10:51 [Bug other/111027] New: Install error "tmp-header-vars: Permission denied", build on NFS, improvement possible etienne_lorrain at yahoo dot fr
2023-08-15 13:43 ` [Bug other/111027] " rguenth at gcc dot gnu.org
2023-08-16 23:58 ` pinskia at gcc dot gnu.org
2023-08-20  8:16 ` [Bug bootstrap/111027] [11/12/13/14 Regression] `make install` touches the build directory; " pinskia at gcc dot gnu.org
2023-08-21 12:12 ` etienne_lorrain at yahoo dot fr
2023-08-23  8:06 ` etienne_lorrain at yahoo dot fr
2024-03-07 23:24 ` law at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).