spack: Binary relocation doesn't relocate paths needed for Spack smoke tests

Steps to reproduce

Binary relocation of some packages with spack smoke tests does not relocate strings needed for the tests.

For example, superlu-dist built in a long path, cached, and then installed to a short path:

$> grep -Inr placeholder $(spack location -i superlu-dist)/.spack/test
...
/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-9.3.0/superlu-dist-7.2.0-mml2dkzs2j4wmfjw3hgqwxtgsg7pcooc/.spack/test/make.inc:63:CXX          = /spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholde/linux-ubuntu20.04-x86_64/gcc-9.3.0/mpich-3.4.2-b2hsqqqnsiodzp3kw63u425osorilfty/bin/mpic++
/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-9.3.0/superlu-dist-7.2.0-mml2dkzs2j4wmfjw3hgqwxtgsg7pcooc/.spack/test/make.inc:72:LOADER       = /spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholde/linux-ubuntu20.04-x86_64/gcc-9.3.0/mpich-3.4.2-b2hsqqqnsiodzp3kw63u425osorilfty/bin/mpic++

As a result:

$> spack test run superlu-dist
...
==> Spack test vsvxgi2wnywtn4zo2n7dlufn7motg6l7
==> Testing package superlu-dist-7.2.0-mml2dkz
==> Error: ProcessError: Command exited with status 2:
    'make' '-j16' 'pddrive'

1 error found in test log:
     4     ==> [2022-02-24-07:47:58.575778] FILTER FILE: /spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-9.3.0/superlu-dist-7.2.0-mml2dkzs2j4wmfjw3hgqwxtg
           sg7pcooc/.spack/test/make.inc [replacing "^LIBS.+\+=.+"]
     5     ==> [2022-02-24-07:47:58.719216] FILTER FILE: /spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-9.3.0/superlu-dist-7.2.0-mml2dkzs2j4wmfjw3hgqwxtg
           sg7pcooc/.spack/test/make.inc [replacing "^LIBS[^\+]+=.+"]
     6     ==> [2022-02-24-07:47:58.722301] FILTER FILE: /spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-9.3.0/superlu-dist-7.2.0-mml2dkzs2j4wmfjw3hgqwxtg
           sg7pcooc/.spack/test/make.inc [replacing "^LOADOPTS.+"]
     7     ==> [2022-02-24-07:47:58.723600] 'make' '-j16' 'pddrive'
     8     /spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_pla
           ceholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholde/linux-ubuntu20.04-x86_64/
           gcc-9.3.0/mpich-3.4.2-b2hsqqqnsiodzp3kw63u425osorilfty/bin/mpicc -O3 -DNDEBUG -I/spack/opt/spack/__spack_path_placeholder__/__spack_path_plac
           eholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholde
           r__/__spack_path_placeholder__/__spack_path_placeholde/linux-ubuntu20.04-x86_64/gcc-9.3.0/metis-5.1.0-vds2a7ehbmqig5t4e5albl6ivgtl4mvm/includ
           e -I/spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path
           _placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholde/linux-ubuntu20.04-x86
           _64/gcc-9.3.0/parmetis-4.0.3-545mtgbbbzffl3mdpx67jubb5r7cgzjg/include -DUSE_VENDOR_BLAS  -std=c99 -fPIC   -I/spack/opt/spack/__spack_path_pla
           ceholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placehold
           er__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholde/linux-ubuntu20.04-x86_64/gcc-9.3.0/superlu-dist-7.2.0-mml2
           dkzs2j4wmfjw3hgqwxtgsg7pcooc/include -c pddrive.c
     9     make: /spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_pa
           th_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholde/linux-ubuntu20.04-x
           86_64/gcc-9.3.0/mpich-3.4.2-b2hsqqqnsiodzp3kw63u425osorilfty/bin/mpicc: Command not found
  >> 10    make: *** [Makefile:170: pddrive.o] Error 127

See test log for details:
  /root/.spack/test/vsvxgi2wnywtn4zo2n7dlufn7motg6l7/superlu-dist-7.2.0-mml2dkz-test-out.txt

@wspear @tldahlgren @balay @pghysels @liuyangzhua

Error message

No response

Information on your system

  • Spack: 0.17.1
  • Python: 3.9.5
  • Platform: linux-ubuntu20.04-zen2
  • Concretizer: clingo

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

Closing this for now, as @tldahlgren could not reproduce it. If you see this again please reopen.