-
Notifications
You must be signed in to change notification settings - Fork 2.4k
sbang relocation broken (again) #20766
Copy link
Copy link
Closed
Labels
binary-packagesbugSomething isn't workingSomething isn't workinge4secppipelinesIssues related to spack's pipeline featuresIssues related to spack's pipeline featuressbangtriageThe issue needs to be prioritizedThe issue needs to be prioritized
Description
sbang relocation is broken under some conditions using spack@develop (1e3f648, Fri Jan 8 15:48:23 2021 -0500)
The conditions under which the problem manifests are described below.
- Build binaries from source, into a long install_tree using both
config: install_tree: root: <root>config: install_tree: padded_length: <N>- For instance, here is
config.yamlfor the build-from-source-environment:
config:
install_tree:
root: /spack-software
padded_length: 64
- Cache those binaries
- Install the binaries into a different
install_tree: root
- For instance, here is
config.yamlfor the subsequent install-from-cache-environment:
config:
install_tree:
root: /spack
- If you then inspect the sbang lines in the installed files, they will still point to the original, unrelocated sbang location. For the example config.yamls above, that would be
/spack-software/bin/sbang
Here is a concrete reproducer that illustrates the problem with sbang relocation in autoconf.
$> git clone https://github.com/spack/spack /opt/spack
$> (cd /opt/spack && git checkout 1e3f6489c)
$> . /opt/spack/share/spack/setup-env.sh
$> spack config edit config <--- use the config.yaml from #1 above (build-from-source-environment)
$> spack install --no-cache autoconf
... OK
$> spack mirror add local /
$> spack gpg create test test
$> spack buildcache create -af --key test -m local autoconf
OK
$> spack uninstall --all
$> spack clean -a
$> rm -rf /spack-software
$> spack config edit config <-- use the config.yaml from #3 above (install-from-cache-environment)
$> spack install --cache-only autoconf
OK
$> head -1 `spack location -i autoconf`/bin/autoreconf
#!/bin/sh /spack-software/bin/sbang
$> spack install --no-cache automake
...
==> Installing automake-1.16.3-yfcevnm4jeomgs3k3hatiuqvqxilcfo4
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/ce/ce010788b51f64511a1e9bb2a1ec626037c6d0e7ede32c1c103611b9d3cba65f.tar.gz
############################################################################################################################################################################# 100.0%
==> automake: Executing phase: 'autoreconf'
==> automake: Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
'/tmp/root/spack-stage/spack-stage-automake-1.16.3-yfcevnm4jeomgs3k3hatiuqvqxilcfo4/spack-src/configure' '--prefix=/spack/linux-ubuntu18.04-skylake_avx512/gcc-7.5.0/automake-1.16.3-yfcevnm4jeomgs3k3hatiuqvqxilcfo4'
1 error found in build log:
17 checking for byacc... no
18 checking for bison... no
19 checking for lex... no
20 checking for flex... no
21 checking whether autoconf is installed... yes
22 checking whether autoconf works... no
>> 23 configure: error: The installed version of autoconf does not work.
24 Please check config.log for error messages before this one.
I am going to try and fix this. I just wanted to put this issue up to track it, and to alert others who might be at risk of encountering this in the interim period.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
binary-packagesbugSomething isn't workingSomething isn't workinge4secppipelinesIssues related to spack's pipeline featuresIssues related to spack's pipeline featuressbangtriageThe issue needs to be prioritizedThe issue needs to be prioritized