spack: Can't install r-devtools, someone needs python but doesn't depends_on() it.

I’m seeing a failure when I try to install r-devtools. I can paper over it by adding a depends_on('python') to r-withr, but I think I’m just hiding the actual problem.

Here’s the error I see.

[hartzelg@rpbuchop001 spack-20170131]$ spack install r-devtools@1.11.1^r+X ^pango+X ^zlib@1.2.8
==> Installing r-devtools
==> Installing r-withr
==> r is already installed in /isilon/Analysis/scratch/hartzelg/spack/spack-20170131/opt/spack/linux-centos7-x86_64/gcc-5.4.0/r-3.3.2-3torgnnwmt4cgvudum7a5voqfahrrfx5
==> Error: RuntimeError: Cannot locate python executable
/isilon/Analysis/scratch/hartzelg/spack/spack-20170131/var/spack/repos/builtin/packages/python/package.py:358, in setup_dependent_environment:
     338      def setup_dependent_environment(self, spack_env, run_env, extension_spec):
     339          """Set PYTHONPATH to include site-packages dir for the
     340          extension and any other python extensions it depends on."""
     341          # The python executable for version 3 may be python3 or python
     342          # See https://github.com/LLNL/spack/pull/2173#issuecomment-257170199
     343          pythonex = 'python{0}'.format('3' if self.spec.satisfies('@3') else '')
     344          if os.path.isdir(self.prefix.bin):
     345              base = self.prefix.bin
     346          else:
     347              base = self.prefix
     348          if not os.path.isfile(os.path.join(base, pythonex)):
     349              if self.spec.satisfies('@3'):
     350                  python = Executable(os.path.join(base, 'python'))
     351                  version = python('-c', 'import sys; print(sys.version)',
     352                                   output=str)
     353                  if version.startswith('3'):
     354                      pythonex = 'python'
     355                  else:
     356                      raise RuntimeError('Cannot locate python executable')
     357              else:
  >> 358                  raise RuntimeError('Cannot locate python executable')
     359          python = Executable(os.path.join(base, pythonex))
     360          prefix = python('-c', 'import sys; print(sys.prefix)', output=str)
     361          spack_env.set('PYTHONHOME', prefix.strip('\n'))
     362
     363          python_paths = []
     364          for d in extension_spec.traverse(
     365                  deptype=('build', 'run'), deptype_query='run'):

When I run spack install -v r-devtools@1.11.1^r+X ^pango+X ^zlib@1.2.8 I get this concretized spec. The only reference I see to python comes from libxcb, for which python is a build dependency.

--------------------------------                                                                                                                                                 [4/1852]
r-devtools@1.11.1%gcc@5.4.0 arch=linux-centos7-x86_64
    ^r@3.3.2%gcc@5.4.0+X~external-lapack arch=linux-centos7-x86_64
        ^bzip2@1.0.6%gcc@5.4.0+shared arch=linux-centos7-x86_64
        ^cairo@1.14.8%gcc@5.4.0+X arch=linux-centos7-x86_64
            ^fontconfig@2.11.1%gcc@5.4.0 arch=linux-centos7-x86_64
                ^font-util@1.3.1%gcc@5.4.0 arch=linux-centos7-x86_64
                    ^pkg-config@0.29.1%gcc@5.4.0+internal_glib arch=linux-centos7-x86_64
                    ^util-macros@1.19.1%gcc@5.4.0 arch=linux-centos7-x86_64
                ^freetype@2.7%gcc@5.4.0 arch=linux-centos7-x86_64
                    ^libpng@1.6.27%gcc@5.4.0 arch=linux-centos7-x86_64
                        ^zlib@1.2.8%gcc@5.4.0+pic+shared arch=linux-centos7-x86_64
                ^libxml2@2.9.4%gcc@5.4.0~python arch=linux-centos7-x86_64
                    ^xz@5.2.3%gcc@5.4.0 arch=linux-centos7-x86_64
            ^glib@2.49.4%gcc@5.4.0 arch=linux-centos7-x86_64
                ^autoconf@2.69%gcc@5.4.0 arch=linux-centos7-x86_64
                    ^m4@1.4.18%gcc@5.4.0+sigsegv arch=linux-centos7-x86_64
                        ^libsigsegv@2.10%gcc@5.4.0 arch=linux-centos7-x86_64
                ^automake@1.15%gcc@5.4.0 arch=linux-centos7-x86_64
                ^gettext@0.19.8.1%gcc@5.4.0+bzip2+curses+git~libunistring+libxml2+tar+xz arch=linux-centos7-x86_64
                    ^ncurses@6.0%gcc@5.4.0 arch=linux-centos7-x86_64
                    ^tar@1.29%gcc@5.4.0 arch=linux-centos7-x86_64
                ^libffi@3.2.1%gcc@5.4.0 arch=linux-centos7-x86_64
                ^libtool@2.4.6%gcc@5.4.0 arch=linux-centos7-x86_64
                ^pcre@8.39%gcc@5.4.0+utf arch=linux-centos7-x86_64
            ^libx11@1.6.3%gcc@5.4.0 arch=linux-centos7-x86_64
                ^inputproto@2.3.2%gcc@5.4.0 arch=linux-centos7-x86_64
                ^kbproto@1.0.7%gcc@5.4.0 arch=linux-centos7-x86_64
                ^libxcb@1.12%gcc@5.4.0 arch=linux-centos7-x86_64
                    ^libpthread-stubs@0.3%gcc@5.4.0 arch=linux-centos7-x86_64
                    ^libxau@1.0.8%gcc@5.4.0 arch=linux-centos7-x86_64
                        ^xproto@7.0.29%gcc@5.4.0 arch=linux-centos7-x86_64
                    ^libxdmcp@1.1.2%gcc@5.4.0 arch=linux-centos7-x86_64
                    ^python@2.7.13%gcc@5.4.0~tk~ucs4 arch=linux-centos7-x86_64
                        ^openssl@1.1.0d%gcc@5.4.0 arch=linux-centos7-x86_64
                            ^perl@5.24.0%gcc@5.4.0+cpanm arch=linux-centos7-x86_64
                        ^readline@6.3%gcc@5.4.0 arch=linux-centos7-x86_64
                        ^sqlite@3.8.5%gcc@5.4.0 arch=linux-centos7-x86_64
                    ^xcb-proto@1.12%gcc@5.4.0 arch=linux-centos7-x86_64
                ^xextproto@7.3.0%gcc@5.4.0 arch=linux-centos7-x86_64
                ^xtrans@1.3.5%gcc@5.4.0 arch=linux-centos7-x86_64
            ^libxext@1.3.3%gcc@5.4.0 arch=linux-centos7-x86_64
            ^libxrender@0.9.9%gcc@5.4.0 arch=linux-centos7-x86_64
                ^renderproto@0.11.1%gcc@5.4.0 arch=linux-centos7-x86_64
            ^pixman@0.34.0%gcc@5.4.0 arch=linux-centos7-x86_64
        ^curl@7.52.1%gcc@5.4.0 arch=linux-centos7-x86_64
        ^icu4c@57.1%gcc@5.4.0 arch=linux-centos7-x86_64
        ^jdk@8u92-linux-x64%gcc@5.4.0 arch=linux-centos7-x86_64
        ^jpeg@9b%gcc@5.4.0 arch=linux-centos7-x86_64
        ^libtiff@4.0.6%gcc@5.4.0 arch=linux-centos7-x86_64
        ^libxt@1.1.5%gcc@5.4.0 arch=linux-centos7-x86_64
            ^libice@1.0.9%gcc@5.4.0 arch=linux-centos7-x86_64
            ^libsm@1.2.2%gcc@5.4.0 arch=linux-centos7-x86_64
        ^pango@1.40.3%gcc@5.4.0+X arch=linux-centos7-x86_64
            ^harfbuzz@0.9.37%gcc@5.4.0 arch=linux-centos7-x86_64
        ^tcl@8.6.5%gcc@5.4.0 arch=linux-centos7-x86_64
        ^tk@8.6.5%gcc@5.4.0+X arch=linux-centos7-x86_64
    ^r-digest@0.6.12%gcc@5.4.0 arch=linux-centos7-x86_64
    ^r-git2r@0.18.0%gcc@5.4.0 arch=linux-centos7-x86_64
    ^r-httr@1.2.1%gcc@5.4.0 arch=linux-centos7-x86_64
        ^r-curl@2.3%gcc@5.4.0 arch=linux-centos7-x86_64
        ^r-jsonlite@1.2%gcc@5.4.0 arch=linux-centos7-x86_64
        ^r-mime@0.5%gcc@5.4.0 arch=linux-centos7-x86_64
        ^r-openssl@0.9.6%gcc@5.4.0 arch=linux-centos7-x86_64
        ^r-r6@2.2.0%gcc@5.4.0 arch=linux-centos7-x86_64
    ^r-memoise@1.0.0%gcc@5.4.0 arch=linux-centos7-x86_64
    ^r-rstudioapi@0.6%gcc@5.4.0 arch=linux-centos7-x86_64
    ^r-whisker@0.3-2%gcc@5.4.0 arch=linux-centos7-x86_64
    ^r-withr@1.0.2%gcc@5.4.0 arch=linux-centos7-x86_64

I’d appreciate any hints about how to run this down a bit further.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

Phah!. It worked (up until it hit the first of the things I have PR’s queued up for: ant).

I wonder if I control-C’ed it at a bad time or if I just had a karmic debt to pay down…

Thank you for your help and sorry for wasting your time.

Argh… In a fresh clone, using the CentOS 7 compiler (which should not matter), this just succeeded…

spack install r-devtools@1.11.1^r+X ^pango+X

(this is what was dragging r-withr in…).

I’ll try it from scratch.