Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issue: fpm #30134

Closed
4 tasks done
wyphan opened this issue Apr 18, 2022 · 16 comments · Fixed by #30158 or #30342
Closed
4 tasks done

Installation issue: fpm #30134

wyphan opened this issue Apr 18, 2022 · 16 comments · Fixed by #30158 or #30342

Comments

@wyphan
Copy link
Contributor

wyphan commented Apr 18, 2022

Steps to reproduce the issue

$ spack spec -I fpm
Input spec
--------------------------------
 -   fpm

Concretized
--------------------------------
 -   fpm@0.4.0%gcc@10.2.0+openmp arch=linux-centos7-broadwell
[+]      ^curl@7.79.0%gcc@10.2.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2~nghttp2 tls=openssl arch=linux-centos7-broadwell
[+]          ^openssl@1.1.1l%gcc@10.2.0~docs certs=system arch=linux-centos7-broadwell
[+]              ^perl@5.34.0%gcc@10.2.0+cpanm+shared+threads arch=linux-centos7-broadwell
[+]                  ^berkeley-db@18.1.40%gcc@10.2.0+cxx~docs+stl patches=b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff4
1de522 arch=linux-centos7-broadwell
[+]                  ^bzip2@1.0.8%gcc@10.2.0~debug~pic+shared arch=linux-centos7-broadwell
[+]                      ^diffutils@3.8%gcc@10.2.0 arch=linux-centos7-broadwell
[+]                          ^libiconv@1.16%gcc@10.2.0 libs=shared,static arch=linux-centos7-broadwell
[+]                  ^gdbm@1.19%gcc@10.2.0 arch=linux-centos7-broadwell
[+]                      ^readline@8.1%gcc@10.2.0 arch=linux-centos7-broadwell
[+]                          ^ncurses@6.2%gcc@10.2.0~symlinks+termlib abi=none arch=linux-centos7-broadwell
[+]                              ^pkgconf@1.8.0%gcc@10.2.0 arch=linux-centos7-broadwell
[+]                  ^zlib@1.2.11%gcc@10.2.0+optimize+pic+shared arch=linux-centos7-broadwell

$ spack install fpm

Error message

Error message
Initialized empty Git repository in /tmp/wyphan/spack-stage/spack-stage-fpm-0.4.0-6b7dpcrdo55u42qb4bqgsv5n3yp2w3lv/spack-src/build/d
ependencies/toml-f/.git/
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
           [--exec-path[=]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=] [--work-tree=] [--namespace=]
            []
[Error] Error while fetching git repository for remote dependency
ERROR STOP 1

Error termination. Backtrace:
#0 0x41dde3 in ???
#1 0x4925ba in ???
#2 0x494c7f in ???
#3 0x401c2c in ???
#4 0x7f72e2135554 in __libc_start_main
at ../csu/libc-start.c:266
#5 0x401c5c in ???
#6 0xffffffffffffffff in ???

Information on your system

  • Spack: 0.17.1
  • Python: 3.7.3
  • Platform: linux-centos7-broadwell
  • Concretizer: clingo

My wild guess is git on this system is too old not to have the -C flag. It's running CentOS 7, after all...

$ cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
$ git --version
git version 1.8.3.1

System specs

Additional information

Summoning @awvwgk as the fpm maintainer.

spack-build-env.txt
spack-build-out.txt

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • I have uploaded the build log and environment files
  • I have searched the issues of this repo and believe this is not a duplicate
@awvwgk
Copy link
Member

awvwgk commented Apr 18, 2022

Looks like git is too old, can you share the git version used here? I don't know the exact lower bound for git to support changing directories with -C.

@wyphan
Copy link
Contributor Author

wyphan commented Apr 18, 2022

1.8.3.1, yep definitely too old. I can either email the admin or take things into my own hands with spack install git, which route should I take?

@awvwgk
Copy link
Member

awvwgk commented Apr 18, 2022

Checking my notes... fortran-lang/fpm#163, it is git 1.8.5 which implements -C, so a close miss.

@awvwgk
Copy link
Member

awvwgk commented Apr 18, 2022

Maybe we can require a git version in the fpm package file?

@wyphan
Copy link
Contributor Author

wyphan commented Apr 18, 2022

@awvwgk That sounds straightforward, do you wanna create the PR or should I do it?

@awvwgk
Copy link
Member

awvwgk commented Apr 18, 2022

Feel free to submit a patch for this.

@wyphan
Copy link
Contributor Author

wyphan commented Apr 19, 2022

Hmm. Looks like "upgrading" git is not enough to build fpm on this system... Here's the new stdout log:

wyphan@delphi:~$ spack install fpm
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/berkeley-db-18.1.40-hswjnjwwwunnwvzgqyikspnefaqxg47w
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/libiconv-1.16-r6daiabrvwuntzdnmnw2ah5jvwk6qkl5
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/pkgconf-1.8.0-bca7yg54sdt6atfgmyn5geh7x7ff43rj
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/zlib-1.2.12-mov7pdk4gpgobyhudnkcf65eq7lmubqx
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/libsigsegv-2.13-icyih5jycnvn4ggqtukrlqxawryxcyhw
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/libmd-1.0.4-nen3kxugpgzoroaprswcfjbxr5ckkth7
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/xz-5.2.5-zdk3s4dwt3ka2ktkkgcnaqxcyuhiqowq
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/pcre2-10.39-uvvbkkgfbi2lqansoxyijfqv73cleowo
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/tar-1.34-r536onzhlu6mp2o33ldoozf5uklr6v6v
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/diffutils-3.8-zkssnr2mvef3djsavlv4hdudb2qi7jsf
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/libunistring-0.9.10-dlbt7fzv3wpwqthw4qaorkikii566hy2
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/ncurses-6.2-ytenty4jsjxjiceqovigubalb5yvzdlc
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/m4-1.4.19-jmeadgepohuewdv2ccyf4nrqvlvipum2
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/libbsd-0.11.5-snkxiejw2vsi6dv5usoz4twa2xeq4qar
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/libxml2-2.9.12-t5cqvetrrhcaxrc5z4svuoohtk7qcnwz
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/bzip2-1.0.8-ivqelsdsklixapgh7kmvqxe6ahk47wkz
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/libidn2-2.3.0-23ctojn4vz4ernvgwhthhclvecbqnbxg
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/libedit-3.1-20210216-svpaujzsbxdsuhwsomih3ptrexdyefzn
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/readline-8.1-uhypwcr7c4ud7mbs2j4phn6a3uwdwv5j
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/libtool-2.4.7-ri66d3uphmlrk2ww3im4tkj762ywbel7
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/expat-2.4.8-4lklqnkmiw2laonwczhth2adjfbgal3l
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/gettext-0.21-flyzzi54jhkt2f7rgb5k2vd7d7jdukwz
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/gdbm-1.19-hux5ze5etcpfq4zg5cgour3d7nlp4hdx
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/perl-5.34.1-h7mvghav4bsz3qlq7bzijl77yo2sy5kf
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/openssl-1.1.1n-zrdfnvapfp3uthqz7vasvs7jhptcorme
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/autoconf-2.69-5fpank5wlkgjwllxq7tqxgpt2nk7kgas
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/curl-7.82.0-h4rugonkcghilnurnxoe5yopw7bnzkxw
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/openssh-8.9p1-tm4uf77rzchb6xk5b62glwhdlx32p7xy
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/automake-1.16.5-lpjlttlprrh4fniva4yvk544yrsadyix
[+] /storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/git-2.35.1-qm4aee4ten6mftqxm35km4oeg6nci6nt
==> Installing fpm-0.5.0-gjykcxj5pz5vki5jz3pyrqk563d22zl3
==> No binary for fpm-0.5.0-gjykcxj5pz5vki5jz3pyrqk563d22zl3 found: installing from source
==> Using cached archive: /storage/users/wyphan/spack/var/spack/cache/_source-cache/archive/e4/e4a06956d2300f9aa1d06bd3323670480e94
6549617582e32684ded6921a921e.zip
==> No patches needed for fpm
==> fpm: Executing phase: 'install'
==> Error: ProcessError: ./install.sh: Permission denied
    Command: './install.sh' '--prefix=/storage/users/wyphan/spack/opt/spack/linux-centos7-broadwell/gcc-10.2.0/fpm-0.5.0-gjykcxj5pz
5vki5jz3pyrqk563d22zl3'
See build log for details:
  /tmp/wyphan/spack-stage/spack-stage-fpm-0.5.0-gjykcxj5pz5vki5jz3pyrqk563d22zl3/spack-build-out.txt

What now, a forgotten chmod +x? 😂

@awvwgk
Copy link
Member

awvwgk commented Apr 19, 2022

The install script is for sure marked as executable in the fpm repository, not sure where it could loose this property again.

@wyphan
Copy link
Contributor Author

wyphan commented Apr 20, 2022

@alalazo Can you reopen this issue, since it's not fully resolved yet?

@alalazo alalazo reopened this Apr 21, 2022
@tldahlgren
Copy link
Contributor

From posts I've perused it seems like retaining permissions can be an issue with different fetchers. As I mentioned in the user meeting, the safest thing to do would be to use os.chmod to ensure the script is executable before you try to run it.

@wyphan
Copy link
Contributor Author

wyphan commented Apr 27, 2022

PR incoming with os.chmod.

@wyphan
Copy link
Contributor Author

wyphan commented Apr 27, 2022

Hmm, now sh exits with error 127...

==> fpm: Executing phase: 'install'
==> [2022-04-27-14:34:01.843950] './install.sh' '--prefix=/opt/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.3.0/fpm-0.5.0-4tlk376emmzewdfpu7wys33ytolpijv5'
/bin/sh: 0: Can't open ./install.sh

I guess this means a cd is also needed.

@wyphan
Copy link
Contributor Author

wyphan commented Apr 27, 2022

Confirmed a cd is needed:

wyp@basecamp:/opt/spack/var/spack/repos/builtin/packages/fpm$ spack style fpm
==> Running style checks on spack
  selected: isort, mypy, flake8
==> Modified files
  fpm
==> Running isort checks
  Broken 1 paths
  isort found errors
==> Running mypy checks
  Success: no issues found in 554 source files
  mypy checks were clean
==> Running flake8 checks
  fpm:0: [E902] FileNotFoundError: [Errno 2] No such file or directory: 'var/spack/repos/builtin/packages/fpm/fpm'
  flake8 found errors
==> Error: spack style found errors

@tldahlgren
Copy link
Contributor

Confirmed a cd is needed:

wyp@basecamp:/opt/spack/var/spack/repos/builtin/packages/fpm$ spack style fpm
==> Running style checks on spack
  selected: isort, mypy, flake8
==> Modified files
  fpm
==> Running isort checks
  Broken 1 paths
  isort found errors
==> Running mypy checks
  Success: no issues found in 554 source files
  mypy checks were clean
==> Running flake8 checks
  fpm:0: [E902] FileNotFoundError: [Errno 2] No such file or directory: 'var/spack/repos/builtin/packages/fpm/fpm'
  flake8 found errors
==> Error: spack style found errors

I haven't used spack style. It looks like it doesn't like the import order (sort checks) BUT the path error it is giving is valid in that it doesn't look like providing fpm is sufficient. Perhaps use the fully qualified path to fpm/package.py

@tldahlgren
Copy link
Contributor

tldahlgren commented Apr 27, 2022

Hmm, now sh exits with error 127...

==> fpm: Executing phase: 'install'
==> [2022-04-27-14:34:01.843950] './install.sh' '--prefix=/opt/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.3.0/fpm-0.5.0-4tlk376emmzewdfpu7wys33ytolpijv5'
/bin/sh: 0: Can't open ./install.sh

I guess this means a cd is also needed.

Or you need read permissions to open the file.

@wyphan
Copy link
Contributor Author

wyphan commented Apr 27, 2022

The cd is required to move to the newly cloned git repo.
The install.sh script resides on the root of the repo directory structure on GitHub.
https://github.com/fortran-lang/fpm

Maybe Spack haven't cloned the repo yet since the explicit git clone or curl command is nowhere to be found in the package.py file?

Confirmed working on a Docker container running Ubuntu 20,04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants