Can’t copy to ‘build-aux/config.guess’ in autoconf.sh: Permission denied #27873

issue 0xB10C openend this issue on June 13, 2023
  1. 0xB10C commented at 11:50 am on June 13, 2023: contributor

    #26422 broke the autogen.sh part of my development builds on NixOS - found #26422 by bisecting. The error is:

     0$ ./autogen.sh
     1libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
     2libtoolize: copying file 'build-aux/ltmain.sh'
     3libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'.
     4libtoolize: copying file 'build-aux/m4/libtool.m4'
     5libtoolize: copying file 'build-aux/m4/ltoptions.m4'
     6libtoolize: copying file 'build-aux/m4/ltsugar.m4'
     7libtoolize: copying file 'build-aux/m4/ltversion.m4'
     8libtoolize: copying file 'build-aux/m4/lt~obsolete.m4'
     9configure.ac:37: installing 'build-aux/compile'
    10configure.ac:27: installing 'build-aux/missing'
    11Makefile.am: installing 'build-aux/depcomp'
    12libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
    13libtoolize: copying file 'build-aux/ltmain.sh'
    14libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'.
    15libtoolize: copying file 'build-aux/m4/libtool.m4'
    16libtoolize: copying file 'build-aux/m4/ltoptions.m4'
    17libtoolize: copying file 'build-aux/m4/ltsugar.m4'
    18libtoolize: copying file 'build-aux/m4/ltversion.m4'
    19libtoolize: copying file 'build-aux/m4/lt~obsolete.m4'
    20configure.ac:122: installing 'build-aux/compile'
    21configure.ac:58: installing 'build-aux/missing'
    22src/Makefile.am: installing 'build-aux/depcomp'
    23cp: cannot create regular file 'build-aux/config.guess': Permission denied
    

    Originally posted by @0xB10C in #26422 (comment)

  2. 0xB10C commented at 11:57 am on June 13, 2023: contributor

    https://github.com/bitcoin/bitcoin/blob/8de9bb7a5ab04669369e2bb59ea92a5c1a91a8d2/autogen.sh#L18 evaluates to true for me. The depends/config.guess file has a timestamp of 2023-01-01 while the generated build-aux/config.guess file has a timestamp of 2021-06-03.

    The generated build-aux/config.guess file has the file permissions -r-xr-xr-x so overwriting it fails.

    0$ autoreconf --version
    1autoreconf (GNU Autoconf) 2.71
    2
    3$ libtool --version
    4libtool (GNU libtool) 2.4.7
    5
    6$ libtoolize --version
    7libtoolize (GNU libtool) 2.4.7
    
  3. maflcko added this to the milestone 26.0 on Jun 13, 2023
  4. maflcko added the label Build system on Jun 13, 2023
  5. 0xB10C commented at 12:22 pm on June 13, 2023: contributor

    The generated build-aux/config.guess file has the file permissions -r-xr-xr-x so overwriting it fails.

    autoreconf --install --force --warnings=all copies from the nix-store (in this case /nix/store/3bvdlza5sxy6kjs9y7v0kbx4gxgp0wg8-autoconf-2.71/share/autoconf/build-aux/config.guess) to build-aux/config.guess. The file has -r-xr-xr-x permissions in the nix-store. These permissions are preserved when copying. So the problem is a combination of how the nix-store works, how autoreconf copies the files and us trying to overwrite them.

  6. 0xB10C commented at 12:35 pm on June 13, 2023: contributor
    Changing the permissions for build-aux/config.{guess, sub} with chmod ug+w allows us to overwrite the files. Will PR this.
  7. 0xB10C referenced this in commit ffe8066e9a on Jun 13, 2023
  8. 0xB10C referenced this in commit d2c0cce2dd on Jun 13, 2023
  9. 0xB10C referenced this in commit fc6c17b838 on Jun 13, 2023
  10. fanquake closed this on Jun 16, 2023

  11. fanquake referenced this in commit 1ecdf6ea8f on Jun 16, 2023
  12. ismaelsadeeq referenced this in commit e1bb864564 on Jun 16, 2023
  13. sidhujag referenced this in commit f11de516d9 on Jun 19, 2023
  14. bitcoin locked this on Jun 15, 2024


0xB10C

Labels
Build system

Milestone
26.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me