spack: rpath error on Catalina, symptom: bzip2 doesn't work

When rebuilding my software stack on Catalina I encountered the following build error on Catalina

==> Installing openmpi
==> Searching for binary cache of openmpi
==> No binary for openmpi found: installing from source
==> Fetching http://www.open-mpi.org/software/ompi/v3.1/downloads/openmpi-3.1.4.tar.bz2
##################################################################################################################################################################################################### 100.0%##################################################################################################################################################################################################### 100.0%##################################################################################################################################################################################################### 100.0%
==> Staging archive: /var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/openmpi-3.1.4-qecenftbojb2tzv6zrtsz64nzenb4h2x/openmpi-3.1.4.tar.bz2
dyld: Library not loaded: @rpath/libbz2.1.dylib
  Referenced from: /Users/healther/Documents/git.nosync/spack/var/spack/environments/mypython/.spack-env/view/bin/bzip2
  Reason: image not found
/Users/healther/Documents/git.nosync/spack/var/spack/environments/mypython/.spack-env/view/bin/tar: Child died with signal 6
/Users/healther/Documents/git.nosync/spack/var/spack/environments/mypython/.spack-env/view/bin/tar: Error is not recoverable: exiting now
==> Error: ProcessError: Command exited with status 2:
    '/Users/healther/Documents/git.nosync/spack/var/spack/environments/mypython/.spack-env/view/bin/tar' '-xf' '/var/folders/1q/jxx1cgcx3l13d153s6_c1zc00000gn/T/healther/spack-stage/openmpi-3.1.4-qecenftbojb2tzv6zrtsz64nzenb4h2x/openmpi-3.1.4.tar.bz2'

The problem originates in the bzip2 binary installed by spack. Calling it even without arguments leads to

% /Users/healther/Documents/git.nosync/spack/opt/spack/darwin-catalina-broadwell/clang-11.0.0-apple/bzip2-1.0.8-fodftvdvnzr3fcj3cuwqhidrq3dnggb6/bin/bzip2

dyld: Library not loaded: @rpath/libbz2.1.dylib
  Referenced from: /Users/healther/Documents/git.nosync/spack/opt/spack/darwin-catalina-broadwell/clang-11.0.0-apple/bzip2-1.0.8-fodftvdvnzr3fcj3cuwqhidrq3dnggb6/bin/bzip2
  Reason: image not found
zsh: abort

Reproduction should be possible by doing spack install bzip2 and calling the installed binary on any OSX Catalina system.

@adamjstewart I assume you also rebuild your software stack but somehow avoided that error (or did I miss an issue?)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 26 (26 by maintainers)

Most upvoted comments

If no one is able to reproduce the problem, let’s close it for now. Feel free to reopen if it reappears.