Skip to content

buildcache: relocation of binaries is broken when $padding is used in the install_tree config variable. #17041

@eugeneswalker

Description

@eugeneswalker

I think there is a problem with the relocation logic used when installing a package from build cache. Specifically, I am seeing the following problem installing Perl from build cache using recent release of Spack.

Using spack@develop (commit id 478a8aff0):

Building and caching Perl as following, with install_tree: $spack/$padding:640

$> spack install --no-cache perl
$> spack buildcache create -afr --key <key_id> -d / perl

This completes just fine.

$> spack buildcache list
==> Finding buildcaches in /build_cache
-- linux-ubuntu18.04-x86_64 / [email protected] -------------------------
[email protected]  [email protected]  [email protected]  [email protected]

I can now install this cached perl into another instance of Spack, with a different, shorter install_tree:

$> spack install perl
... no problems

But if I go to build a package such as autoconf, which depends on perl:

$> spack install autoconf
...
==> Error: Failed to install autoconf due to ChildError: ProcessError: Command exited with status 2:
    'make' '-j16'
3 errors found in build log:
     124    autom4te_perllibdir='/tmp/root/spack-stage/spack-stage-autoconf-2.69-2tb5phkcuq4v7b5ejtqkc62aevbyta2w/spack-src'
            /lib AUTOM4TE_CFG='../lib/autom4te.cfg'         ../bin/autom4te -B '..'/lib -B '/tmp/root/spack-stage/spack-stag
            e-autoconf-2.69-2tb5phkcuq4v7b5ejtqkc62aevbyta2w/spack-src'/lib         --language M4sh --cache '' --melt /tmp/r
            oot/spack-stage/spack-stage-autoconf-2.69-2tb5phkcuq4v7b5ejtqkc62aevbyta2w/spack-src/bin/autoconf.as -o autoconf
            .in
     125    Can't locate Data/Dumper.pm in @INC (you may need to install the Data::Dumper module) (@INC contains: /tmp/root/
            spack-stage/spack-stage-autoconf-2.69-2tb5phkcuq4v7b5ejtqkc62aevbyta2w/spack-src/lib ///////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            /////////////////////////////////////////////////spack/////spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/perl-5.30.2-
            hywprwp45fr4koqfwyqus56cnqjyq2h3/lib/perl5 /////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ///////spack/////spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/perl-5.30.2-hywprwp45fr4koqfwyqus56cnqjyq2h3/lib/site_
            perl/5.30.2/x86_64-linux-thread-multi //////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            //spack/////spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/perl-5.30.2-hywprwp45fr4koqfwyqus56cnqjyq2h3/lib/site_perl/
            5.30.2 /////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ///////////////////////////////////////////////////////////////////////////////////spack/////spack/linux-ubuntu1
            8.04-x86_64/gcc-7.3.0/perl-5.30.2-hywprwp45fr4koqfwyqus56cnqjyq2h3/lib/5.30.2/x86_64-linux-thread-multi ////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////spack/////spack/linux-ubuntu18.04-x86_64/gcc
            -7.3.0/perl-5.30.2-hywprwp45fr4koqfwyqus56cnqjyq2h3/lib/5.30.2) at /tmp/root/spack-stage/spack-stage-autoconf-2.
            69-2tb5phkcuq4v7b5ejtqkc62aevbyta2w/spack-src/lib/Autom4te/C4che.pm line 33.
     126    BEGIN failed--compilation aborted at /tmp/root/spack-stage/spack-stage-autoconf-2.69-2tb5phkcuq4v7b5ejtqkc62aevb
            yta2w/spack-src/lib/Autom4te/C4che.pm line 33.
     127    Compilation failed in require at ../bin/autom4te line 37.
     128    BEGIN failed--compilation aborted at ../bin/autom4te line 37.
     129    Makefile:641: recipe for target 'autoconf.in' failed
  >> 130    make[2]: *** [autoconf.in] Error 2
     131    make[2]: Leaving directory '/tmp/root/spack-stage/spack-stage-autoconf-2.69-2tb5phkcuq4v7b5ejtqkc62aevbyta2w/spa
            ck-src/spack-build/bin'
     132    Makefile:357: recipe for target 'all-recursive' failed
  >> 133    make[1]: *** [all-recursive] Error 1
     134    make[1]: Leaving directory '/tmp/root/spack-stage/spack-stage-autoconf-2.69-2tb5phkcuq4v7b5ejtqkc62aevbyta2w/spa
            ck-src/spack-build'
     135    Makefile:292: recipe for target 'all' failed
  >> 136    make: *** [all] Error 2

See build log for details:
  /tmp/root/spack-stage/spack-stage-autoconf-2.69-2tb5phkcuq4v7b5ejtqkc62aevbyta2w/spack-build-out.txt

Full build log for autoconf: autoconf.txt

@alalazo @becker33 @scottwittenburg

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions