Skip to content

Spack trying to use a python that it was told to build but never actually built #13509

@bartlettroscoe

Description

@bartlettroscoe

CC: @fryeguy52

Tag: snl-atdm-issue

When I upgraded to Spack 0.13.0, if you tell spack to build python but it is not able to actually built it because another package build fails, then spack still tries to use that package (it would appear automatically).

For example, I ran spack install which tried to build:

==> Concretized snl-atdm-tools arch=linux-rhel6-x86_64
 -   7kjcq22  [email protected]%[email protected] arch=linux-rhel6-x86_64
 -   jolfhsi      ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   z4usolp          ^[email protected]%[email protected] patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00,fc9b61654a3ba1a8d6cd78ce087e7c96366c290bc8d2c299f09828d793b853c8 +sigsegv arch=linux-rhel6-x86_64
 -   ulj5yaz              ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   rvc7wh4          ^[email protected]%[email protected]+cpanm patches=0eac10ed90aeb0459ad8851f88081d439a4e41978e586ec743069e8b059370ac +shared+threads arch=linux-rhel6-x86_64
 -   7yddwkq              ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   kw32bm5                  ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   dqth77n                      ^[email protected]%[email protected]~symlinks~termlib arch=linux-rhel6-x86_64
 -   qmt4kcm                          ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   r3sudpm      ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   dmkkwab      ^[email protected]%[email protected]~doc+ncurses+openssl+ownlibs~qt arch=linux-rhel6-x86_64
 -   7e4sofy          ^[email protected]%[email protected]+systemcerts arch=linux-rhel6-x86_64
 -   aqhxxoj              ^[email protected]%[email protected]+optimize+pic+shared arch=linux-rhel6-x86_64
 -   izajihb      ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   yevortw          ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   ezbbcix      ^[email protected]%[email protected]~tcltk arch=linux-rhel6-x86_64
 -   sbhfryx          ^[email protected]%[email protected]~darwinssl~gssapi~libssh~libssh2~nghttp2 arch=linux-rhel6-x86_64
 -   z2qfmtc          ^[email protected]%[email protected]+libbsd arch=linux-rhel6-x86_64
 -   5ncvr6g              ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   zzbkzji          ^[email protected]%[email protected]+bzip2+curses+git~libunistring+libxml2+tar+xz arch=linux-rhel6-x86_64
 -   zlyhddn              ^[email protected]%[email protected]+shared arch=linux-rhel6-x86_64
 -   p5gcyal              ^[email protected]%[email protected]~python arch=linux-rhel6-x86_64
 -   4mfrw3e                  ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   ea6lvla              ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   njk2pzu          ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   aofumyv          ^[email protected]%[email protected]+jit+multibyte+utf arch=linux-rhel6-x86_64
 -   vx2iy34      ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   bfndwzi          ^[email protected]%[email protected]+bz2+ctypes+dbm+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4~uuid+zlib arch=linux-rhel6-x86_64
 -   3kyw4xp              ^[email protected]%[email protected] arch=linux-rhel6-x86_64
 -   6fozjh5              ^[email protected]%[email protected]~column_metadata+fts~functions~rtree arch=linux-rhel6-x86_64
 -   rjakshk      ^[email protected]%[email protected] arch=linux-rhel6-x86_64

but there was a build error in the package 'perl' reported in #13505 so it never got to actually build [email protected]. But when I go to run the spack command after this:

./atdm-spack/spack/bin/spack compiler find --scope site

it dies with:

Traceback (most recent call last):
  File "./atdm-spack/spack/bin/spack", line 64, in <module>
    sys.exit(spack.main.main())
  File "/home/rabartl/Spack.base4/atdm-spack/spack/lib/spack/spack/main.py", line 653, in main
    ev.activate(env, args.use_env_repo)
  File "/home/rabartl/Spack.base4/atdm-spack/spack/lib/spack/spack/environment.py", line 163, in activate
    cmds += env.add_default_view_to_shell(shell)
  File "/home/rabartl/Spack.base4/atdm-spack/spack/lib/spack/spack/environment.py", line 1074, in add_default_view_to_shell
    spec, self.default_view))
  File "/home/rabartl/Spack.base4/atdm-spack/spack/lib/spack/spack/environment.py", line 1055, in environment_modifications_for_spec
    spec, context='run'
  File "/home/rabartl/Spack.base4/atdm-spack/spack/lib/spack/spack/build_environment.py", line 759, in modifications_from_dependencies
    dpkg.setup_dependent_package(pkg.module, spec)
  File "/home/rabartl/Spack.base4/atdm-spack/spack/var/spack/repos/builtin/packages/python/package.py", line 729, in setup_dependent_package
    module.setup_py = Executable(
  File "/home/rabartl/Spack.base4/atdm-spack/spack/var/spack/repos/builtin/packages/python/package.py", line 526, in command
    
RuntimeError: Unable to locate python command in /home/rabartl/Spack.base4/atdm-spack/spack/opt/spack/linux-rhel6-x86_64/gcc-7.2.0/python-2.7.15-bfndwzimloeo5odtb656tkcsid4jzg42/bin

What is spack doing that it things that this python actually got installed? This is new behavior for spack.

How can I work around this for now? This is a major impediment to upgrading spack to version 0.13.0.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions