First steps with spack
Please note this all this was tested on a extremely minimally installed server. I.e. just installing something like doxygen can take a very long time as a lot of dependencies will be compiled.
Also important - anything available on the build machine from the OS itself
MUST be present on any machine where binaries via spack should be used.
Base setup
- go to freshly installed repo server and add dedicated user
- install missing packages:
apt install git build-essential environment-modules curl tcl gfortran
- log into system as dedicated user
-
git clone https://github.com/spack/spack.git
-
export SPACK_ROOT=~/spack; . $SPACK_ROOT/share/spack/setup-env.sh
Creating/installing a couple of packages
-
spack create http://lappweb.in2p3.fr/virgo/FrameL/libframe-8.33.tar.gz
- select default
1
- edit presented Python package, i.e. put a good description there, homepage and remove unnecessary clutter, e.g.
from spack import *
class Libframe(AutotoolsPackage):
"""The Frame Library"""
homepage = "http://lappweb.in2p3.fr/virgo/FrameL/"
url = "http://lappweb.in2p3.fr/virgo/FrameL/libframe-8.33.tar.gz"
version('8.33', sha256='e06bff19c3b5ad797bceede2389bd0d11e66e44d84115637fb9e71cae404e7f3')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('m4', type='build')
- then try to install it:
spacke install libframe
(this may take longer the first time around as spack may need to install a couple of dependencies first), if it succeeds, it may look like
==> Installing libframe
==> Searching for binary cache of libframe
==> Warning: No Spack mirrors are currently configured
==> No binary for libframe found: installing from source
==> Fetching http://lappweb.in2p3.fr/virgo/FrameL/libframe-8.33.tar.gz
###################################################################################################################################################################################### 100.0%
==> Staging archive: /home/spack/spack/var/spack/stage/libframe-8.33-ervdgnkouxkopzdoqlrjz66iem6pg6pj/libframe-8.33.tar.gz
==> Created stage in /home/spack/spack/var/spack/stage/libframe-8.33-ervdgnkouxkopzdoqlrjz66iem6pg6pj
==> No patches needed for libframe
==> Building libframe [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed libframe
Fetch: 0.57s. Build: 40.49s. Total: 41.06s.
--
CarstenAulbert - 28 Jun 2019