Tutorial setup
If you have not done the prior sections, you’ll need to start the docker image:
docker run -it ghcr.io/spack/tutorial:sc24
and then set Spack up like this:
git clone --depth=100 --branch=releases/v0.23 https://github.com/spack/spack
. spack/share/spack/setup-env.sh
spack tutorial -y
spack bootstrap now
spack compiler find
See the Basic Installation Tutorial for full details on setup. For more
help, join us in the #tutorial channel on Slack – get an
invitation at slack.spack.io
Package Creation Tutorial
This tutorial walks you through the steps for creating and
debugging a simple Spack package. We will develop and debug
a package using an iterative approach in order to gain more
experience with additional Spack commands. For consistency,
we will create the package for mpileaks (https://github.com/LLNL/mpileaks),
which is an MPI debugging tool.
What is a Spack Package?
Spack packages are installation scripts, which are essentially recipes for building (and testing) software.
They define properties and behavior of the build, such as:
where to find and how to retrieve the software;
its dependencies;
options for building from source; and
build commands.
They can also define checks of the installed software that can be performed after the installation.
Once we’ve specified a package’s recipe, users can ask Spack to build the software with different features on any of the supported systems.
Getting Started
In order to avoid modifying your Spack installation with the package we are creating, add a package repository just for this tutorial by entering the following command:
$ spack repo add $SPACK_ROOT/var/spack/repos/tutorial/
==> Added repo with namespace 'tutorial'.
Doing this ensures changes we make here do not adversely affect other parts of the tutorial. You can find out more about repositories at Package Repositories.
Creating the Package File
Note
Before proceeding, make sure your EDITOR environment variable
is set to the name or path of your preferred text editor.
Suppose you want to install software that depends on mpileaks but found Spack did not already have a built-in package for it. This means you are going to have to create one.
Spack’s create command builds a new package from a template by taking the location of the package’s source code and using it to:
fetch the code;
create a package skeleton; and
open the file up in your editor of choice.
Note
An example of creating a package from software with more available versions can be found at Creating and Editing Packages.
The mpileaks source code is available in a tarball in the
software’s repository (https://github.com/LLNL/mpileaks). Spack
will look at the contents of the tarball and generate a package when we
run spack create with the URL:
$ spack create --name tutorial-mpileaks https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz
==> Using specified package name: 'tutorial-mpileaks'
==> Fetching https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz
==> This package looks like it uses the autoreconf build system
==> Created template for tutorial-mpileaks package
==> Created package file: /home/spack5/spack/var/spack/repos/tutorial/packages/tutorial-mpileaks/package.py
You should now be in your text editor of choice, with the package.py
file open for editing.
Your package.py file should reside in the tutorial-mpileaks
subdirectory of your tutorial repository’s packages directory, i.e.,
$SPACK_ROOT/var/spack/repos/tutorial/packages/tutorial-mpileaks/package.py
Take a moment to look over the file.
As we can see from the skeleton contents, shown below, the Spack template:
provides instructions for how to contribute your package to the Spack repository;
indicates that the software is built with Autotools;
provides a docstring template;
provides an example homepage URL;
shows how to specify a list of package maintainers;
specifies the version directive, with checksum, for the software;
shows a dependency directive example; and
provides a skeleton
configure_argsmethod.
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack. We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
# them, you can save this file and test your package like this:
#
# spack install tutorial-mpileaks
#
# You can edit this file again by typing:
#
# spack edit tutorial-mpileaks
#
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------
from spack.package import *
class TutorialMpileaks(AutotoolsPackage):
"""FIXME: Put a proper description of your package here."""
# FIXME: Add a proper url for your package's homepage here.
homepage = "https://www.example.com"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"
# FIXME: Add a list of GitHub accounts to
# notify when the package is updated.
# maintainers("github_user1", "github_user2")
# FIXME: Add the SPDX identifier of the project's license below.
# See https://spdx.org/licenses/ for a list. Upon manually verifying
# the license, set checked_by to your Github username.
license("UNKNOWN", checked_by="github_user1")
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
# FIXME: Add additional dependencies if required.
# depends_on("foo")
def autoreconf(self, spec, prefix):
# FIXME: Modify the autoreconf method as necessary
autoreconf("--install", "--verbose", "--force")
def configure_args(self):
# FIXME: Add arguments other than --prefix
# FIXME: If not needed delete this function
args = []
return args
Note
The maintainers field is a comma-separated list of GitHub user
names for those people who are willing to be notified when a change
is made to the package. This information is useful for developers who
maintain a Spack package for their own software and/or rely on software
maintained by other people.
Since we are providing a url, we can confirm the checksum, or sha256
calculation. Exit your editor to return to the command line and use the
spack checksum command:
$ spack checksum tutorial-mpileaks 1.0
==> Found 1 version of tutorial-mpileaks
==> Fetching https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
Note the entire version directive is provided for your convenience.
We will now fill in the provided placeholders as we:
document some information about this package;
add dependencies; and
add the configuration arguments needed to build the package.
For the moment, though, let’s see what Spack does with the skeleton
by trying to install the package using the spack install command:
$ spack install tutorial-mpileaks
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/findutils-4.9.0-2sbkhchnzzj4a43ykj5jkwctwjc6b7lm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ncurses-6.5-rvg7j6bmergf3is4yoacm5sgsi7l4tvm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libsigsegv-2.14-ea6qziv7obmf5fq3mxy42rhxptoiwfb6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/berkeley-db-18.1.40-cexliohp6aqckxeq4bqy5wrmxzyrfzqc
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.2.1-fhud6vqkh7jaesckalgqg5xxml72in6i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/m4-1.4.19-qaspjyq5yqcso6yatgyhvm7j632ez7md
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/readline-8.2-aylebxvheua4djgtfzzqi2ialcjt5mw7
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libtool-2.4.7-tt3byemiknxgeuaadpxrltepvic7xsms
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gdbm-1.23-jj2atvsdprz6qvh2n43326zfxv42iw7n
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/perl-5.40.0-cwpt5ec6gcal6ftcrrxcecnt74fdjfhi
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/automake-1.16.5-awgfaon3dsdj54pighglmrv7gnex7jko
==> Installing tutorial-mpileaks-1.0-bszhijneomzrlxbof4ba5yyfx44pvgrn [17/17]
==> No binary for tutorial-mpileaks-1.0-bszhijneomzrlxbof4ba5yyfx44pvgrn found: installing from source
==> Fetching https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz
==> No patches needed for tutorial-mpileaks
==> tutorial-mpileaks: Executing phase: 'autoreconf'
==> tutorial-mpileaks: Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
'/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-bszhijneomzrlxbof4ba5yyfx44pvgrn/spack-src/configure' '--prefix=/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-bszhijneomzrlxbof4ba5yyfx44pvgrn'
13 errors found in build log:
16 libtoolize: copying file 'm4/lt~obsolete.m4'
17 autoreconf: configure.ac: not using Intltool
18 autoreconf: configure.ac: not using Gtkdoc
19 autoreconf: running: aclocal --force -I m4
20 autoreconf: running: /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin/autoconf --force
21 configure.ac:9: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
>> 22 configure.ac:9: You should use the 'AC_CONFIG_HEADERS' macro instead.
>> 23 /tmp/root/spack-stage/spack-stage-autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/spack-src/lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
>> 24 aclocal.m4:745: AM_CONFIG_HEADER is expanded from...
>> 25 configure.ac:9: the top level
26 configure.ac:38: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
>> 27 configure.ac:38: You should run autoupdate.
>> 28 m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from...
>> 29 configure.ac:38: the top level
30 configure.ac:47: warning: The macro 'AC_HEADER_STDC' is obsolete.
>> 31 configure.ac:47: You should run autoupdate.
>> 32 /tmp/root/spack-stage/spack-stage-autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/spack-src/lib/autoconf/headers.m4:663: AC_HEADER_STDC is expanded from...
>> 33 configure.ac:47: the top level
34 autoreconf: running: /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin/autoheader --force
35 autoreconf: running: automake --add-missing --copy --force-missing
>> 36 configure.ac:26: installing 'config/compile'
>> 37 configure.ac:19: installing 'config/missing'
38 src/Makefile.am:14: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
39 src/Makefile.am: installing 'config/depcomp'
40 autoreconf: 'config/install-sh' is updated
41 autoreconf: 'config/config.sub' is updated
42 autoreconf: 'config/config.guess' is updated
43 autoreconf: Leaving directory '.'
...
73 checking for /home/spack5/spack/lib/spack/env/gcc/g++ option to enable C++11 features... none needed
74 checking dependency style of /home/spack5/spack/lib/spack/env/gcc/g++... gcc3
75 checking for mpicc... /usr/bin/mpicc
76 Checking whether /usr/bin/mpicc responds to '-showme:compile'... no
77 Checking whether /usr/bin/mpicc responds to '-showme'... no
78 Checking whether /usr/bin/mpicc responds to '-compile-info'... yes
>> 79 configure: error: unable to locate adept-utils installation
See build log for details:
/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-bszhijneomzrlxbof4ba5yyfx44pvgrn/spack-build-out.txt
It clearly did not build. The error indicates configure is unable
to find the installation location of a dependency.
So let’s start to customize the package for our software.
Adding Package Documentation
First, let’s fill in the documentation.
Bring mpileaks’ package.py file back into your $EDITOR with the
spack edit command:
$ spack edit tutorial-mpileaks
Let’s make the following changes:
remove the instructions between dashed lines at the top;
replace the first
FIXMEcomment with a description ofmpileaksin the docstring;replace the homepage property with the correct link; and
uncomment the
maintainersdirective and add your GitHub user name.add the license of the project and your GitHub user name.
Note
We will exclude the Copyright clause and license identifier in the
remainder of the package snippets here to reduce the length of the tutorial
documentation; however, the copyright is required for published packages.
Now make the changes and additions to your package.py file.
The resulting package should contain the following information:
from spack.package import *
class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"
maintainers("alecbcs")
license("BSD", checked_by="alecbcs")
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
# FIXME: Add additional dependencies if required.
# depends_on("foo")
def autoreconf(self, spec, prefix):
# FIXME: Modify the autoreconf method as necessary
autoreconf("--install", "--verbose", "--force")
def configure_args(self):
# FIXME: Add arguments other than --prefix
# FIXME: If not needed delete this function
args = []
return args
At this point we’ve only updated key documentation within the package. It won’t help us build the software but the information is now available for review.
Let’s enter the spack info command for the package:
$ spack info tutorial-mpileaks
AutotoolsPackage: tutorial-mpileaks
Description:
Tool to detect and report MPI objects like MPI_Requests and
MPI_Datatypes.
Homepage: https://github.com/LLNL/mpileaks
Preferred version:
1.0 https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz
Safe versions:
1.0 https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz
Deprecated versions:
None
Variants:
build_system [autotools] autotools
Build systems supported by the package
Build Dependencies:
autoconf automake gmake gnuconfig libtool m4
Link Dependencies:
None
Run Dependencies:
None
Licenses:
BSD
Take a moment to look over the output. You should see the following information derived from the package:
it is an Autotools package;
it has the description, homepage, and maintainer(s) we provided;
it has the URL we gave the
spack createcommand;the preferred version was derived from the code;
the default Autotools package installation phases are listed;
the
gnuconfigbuild dependency is inherited fromAutotoolsPackage;both the link and run dependencies are
Noneat this point; andit uses the 3-clause BSD license.
As we fill in more information about the package, the spack info
command will become more informative.
Note
More information on using Autotools packages is provided in AutotoolsPackage.
The full list of build systems known to Spack can be found at Build Systems.
More information on the build-time tests can be found at https://spack.readthedocs.io/en/latest/packaging_guide.html#build-time-tests.
Refer to the links at the end of this section for more information.
Now we’re ready to start filling in the build recipe.
Adding Dependencies
First we’ll add the dependencies determined by reviewing documentation
in the software’s repository (https://github.com/LLNL/mpileaks). The
mpileaks software relies on three third-party libraries:
mpi,adept-utils, andcallpath.
Note
Luckily, all of these dependencies are built-in packages in Spack; otherwise, we would have to create packages for them as well.
Bring mpileaks’ package.py file back up in your $EDITOR with
the spack edit command:
$ spack edit tutorial-mpileaks
and add the dependencies by specifying them using the depends_on
directive as shown below:
from spack.package import *
class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"
maintainers("alecbcs")
license("BSD", checked_by="alecbcs")
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("mpi")
depends_on("adept-utils")
depends_on("callpath")
def autoreconf(self, spec, prefix):
# FIXME: Modify the autoreconf method as necessary
autoreconf("--install", "--verbose", "--force")
def configure_args(self):
# FIXME: Add arguments other than --prefix
# FIXME: If not needed delete this function
args = []
return args
Adding dependencies tells Spack that it must ensure these packages are installed before it can build our package.
Note
The mpi dependency is different from the other two in that it is
a virtual dependency. That means Spack must satisfy the dependency
with a package that provides the mpi interface, such as openmpi
or mvapich2.
We call such packages providers. More information on virtual dependencies can be found in the Packaging Guide linked at the bottom of this tutorial.
Let’s check that dependencies are effectively built when we try to install tutorial-mpileaks:
$ spack install tutorial-mpileaks
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
==> Installing boost-1.72.0-bzwzix4qauzxltjlvug3vkpzt6kfyase [3/47]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-boost-1.72.0-bzwzix4qauzxltjlvug3vkpzt6kfyase.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/boost-1.72.0/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-boost-1.72.0-bzwzix4qauzxltjlvug3vkpzt6kfyase.spack
==> Extracting boost-1.72.0-bzwzix4qauzxltjlvug3vkpzt6kfyase from binary cache
==> boost: Successfully installed boost-1.72.0-bzwzix4qauzxltjlvug3vkpzt6kfyase
Search: 0.00s. Fetch: 0.16s. Install: 2.71s. Extract: 2.65s. Relocate: 0.02s. Total: 2.87s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/boost-1.72.0-bzwzix4qauzxltjlvug3vkpzt6kfyase
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/findutils-4.9.0-2sbkhchnzzj4a43ykj5jkwctwjc6b7lm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxcrypt-4.4.35-v64tnmrjg7o5beyhae6x42vqlcxzdon6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libsigsegv-2.14-ea6qziv7obmf5fq3mxy42rhxptoiwfb6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiconv-1.17-bsga3novxptycgb4bpv4mldtq3f5m7mj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pkgconf-2.2.0-oplsmxryrcg6ackisqtpszdarzch6a6t
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zstd-1.5.6-t7h6imj35ruac562vr7snzvli2h2tzup
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/xz-5.4.6-2fvrfr67ahyx5vqg6hyd3dachcl3nl2k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/numactl-2.0.18-euqyy3hu6d7yiuf67q6xgmiwtlgfkanp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libtool-2.4.7-tt3byemiknxgeuaadpxrltepvic7xsms
==> Installing libiberty-2.41-ojjef3cyseiyid7u6jf7dk4mzyxsm5ta [15/47]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-libiberty-2.41-ojjef3cyseiyid7u6jf7dk4mzyxsm5ta.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiberty-2.41/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-libiberty-2.41-ojjef3cyseiyid7u6jf7dk4mzyxsm5ta.spack
==> Extracting libiberty-2.41-ojjef3cyseiyid7u6jf7dk4mzyxsm5ta from binary cache
==> libiberty: Successfully installed libiberty-2.41-ojjef3cyseiyid7u6jf7dk4mzyxsm5ta
Search: 0.00s. Fetch: 0.01s. Install: 0.08s. Extract: 0.03s. Relocate: 0.01s. Total: 0.09s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiberty-2.41-ojjef3cyseiyid7u6jf7dk4mzyxsm5ta
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libpciaccess-0.17-omw5cc44g5qrphf7aqyjpdpmw2b3tr4i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/m4-1.4.19-qaspjyq5yqcso6yatgyhvm7j632ez7md
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ncurses-6.5-rvg7j6bmergf3is4yoacm5sgsi7l4tvm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/berkeley-db-18.1.40-cexliohp6aqckxeq4bqy5wrmxzyrfzqc
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.2.1-fhud6vqkh7jaesckalgqg5xxml72in6i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/nghttp2-1.63.0-t2qkug7u7irxunnirgisvdu4mdoerrxt
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libedit-3.1-20240808-nhrbcomj5lgnql2itckj7py3hi6wuz5d
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/readline-8.2-aylebxvheua4djgtfzzqi2ialcjt5mw7
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssl-3.4.0-5gigqgwld4jgaxb46pzeavxuicamdgvw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pigz-2.8-pcwnu2wfae7nfv5isb3kcl7otav2m5zy
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxml2-2.13.4-wozcmyn2bivorr7geiwavaqeosmwmaow
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gdbm-1.23-jj2atvsdprz6qvh2n43326zfxv42iw7n
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libevent-2.1.12-xbwxobi4cjizcuch7ukmi4igoosktbma
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/curl-8.10.1-fpywomo74ruadasuelzpvql7zj6rufeo
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tar-1.34-mmv6i4naeg746pk2xpypdpejwvypmegb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hwloc-2.11.1-fwtuzgpmp2dy3udiekh6nwnbcld22kmk
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/perl-5.40.0-cwpt5ec6gcal6ftcrrxcecnt74fdjfhi
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/cmake-3.30.5-d2nwbxlz2qe2hqu7yy4v6vlgiz6qihwj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gettext-0.22.5-bexdfw2vfc64r6u72mqestm6olahfr6e
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pmix-5.0.3-5wqqmswtibbhuilr356mzviq4flzdc3z
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw
==> Installing libdwarf-0.11.0-hz7ptvgac3xb3gczyob462mpmtq7ki7k [37/47]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-libdwarf-0.11.0-hz7ptvgac3xb3gczyob462mpmtq7ki7k.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libdwarf-0.11.0/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-libdwarf-0.11.0-hz7ptvgac3xb3gczyob462mpmtq7ki7k.spack
==> Extracting libdwarf-0.11.0-hz7ptvgac3xb3gczyob462mpmtq7ki7k from binary cache
==> libdwarf: Successfully installed libdwarf-0.11.0-hz7ptvgac3xb3gczyob462mpmtq7ki7k
Search: 0.00s. Fetch: 0.01s. Install: 0.09s. Extract: 0.03s. Relocate: 0.02s. Total: 0.09s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libdwarf-0.11.0-hz7ptvgac3xb3gczyob462mpmtq7ki7k
==> Installing intel-tbb-2021.12.0-u5vh5hcz3rg7kg4qmgozni66up7bke5y [38/47]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-intel-tbb-2021.12.0-u5vh5hcz3rg7kg4qmgozni66up7bke5y.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/intel-tbb-2021.12.0/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-intel-tbb-2021.12.0-u5vh5hcz3rg7kg4qmgozni66up7bke5y.spack
==> Extracting intel-tbb-2021.12.0-u5vh5hcz3rg7kg4qmgozni66up7bke5y from binary cache
==> intel-tbb: Successfully installed intel-tbb-2021.12.0-u5vh5hcz3rg7kg4qmgozni66up7bke5y
Search: 0.00s. Fetch: 0.01s. Install: 0.12s. Extract: 0.05s. Relocate: 0.03s. Total: 0.13s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/intel-tbb-2021.12.0-u5vh5hcz3rg7kg4qmgozni66up7bke5y
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/krb5-1.21.3-pq3as37xnogsfkivav3r6phgtsuwhjlb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/automake-1.16.5-awgfaon3dsdj54pighglmrv7gnex7jko
==> Installing dyninst-13.0.0-idhmtve2yuxvjsnv3e4kytfiggmifdkq [42/47]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-dyninst-13.0.0-idhmtve2yuxvjsnv3e4kytfiggmifdkq.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/dyninst-13.0.0/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-dyninst-13.0.0-idhmtve2yuxvjsnv3e4kytfiggmifdkq.spack
==> Extracting dyninst-13.0.0-idhmtve2yuxvjsnv3e4kytfiggmifdkq from binary cache
==> dyninst: Successfully installed dyninst-13.0.0-idhmtve2yuxvjsnv3e4kytfiggmifdkq
Search: 0.00s. Fetch: 0.01s. Install: 0.42s. Extract: 0.32s. Relocate: 0.06s. Total: 0.43s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/dyninst-13.0.0-idhmtve2yuxvjsnv3e4kytfiggmifdkq
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssh-9.9p1-wz7w27t54u5lcphpvtwvv43vmhwmqwkn
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea
==> Installing adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55 [45/47]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55.spack
==> Extracting adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55 from binary cache
==> adept-utils: Successfully installed adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55
Search: 0.00s. Fetch: 0.01s. Install: 0.27s. Extract: 0.03s. Relocate: 0.20s. Total: 0.28s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55
==> Installing callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j [46/47]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j.spack
==> Extracting callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j from binary cache
==> callpath: Successfully installed callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j
Search: 0.00s. Fetch: 0.01s. Install: 0.15s. Extract: 0.04s. Relocate: 0.06s. Total: 0.16s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j
==> Installing tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b [47/47]
==> No binary for tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b found: installing from source
==> Using cached archive: /home/spack5/spack/var/spack/cache/_source-cache/archive/24/24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9.tar.gz
==> No patches needed for tutorial-mpileaks
==> tutorial-mpileaks: Executing phase: 'autoreconf'
==> tutorial-mpileaks: Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
'/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b/spack-src/configure' '--prefix=/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b'
13 errors found in build log:
16 libtoolize: copying file 'm4/lt~obsolete.m4'
17 autoreconf: configure.ac: not using Intltool
18 autoreconf: configure.ac: not using Gtkdoc
19 autoreconf: running: aclocal --force -I m4
20 autoreconf: running: /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin/autoconf --force
21 configure.ac:9: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
>> 22 configure.ac:9: You should use the 'AC_CONFIG_HEADERS' macro instead.
>> 23 /tmp/root/spack-stage/spack-stage-autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/spack-src/lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
>> 24 aclocal.m4:745: AM_CONFIG_HEADER is expanded from...
>> 25 configure.ac:9: the top level
26 configure.ac:38: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
>> 27 configure.ac:38: You should run autoupdate.
>> 28 m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from...
>> 29 configure.ac:38: the top level
30 configure.ac:47: warning: The macro 'AC_HEADER_STDC' is obsolete.
>> 31 configure.ac:47: You should run autoupdate.
>> 32 /tmp/root/spack-stage/spack-stage-autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/spack-src/lib/autoconf/headers.m4:663: AC_HEADER_STDC is expanded from...
>> 33 configure.ac:47: the top level
34 autoreconf: running: /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin/autoheader --force
35 autoreconf: running: automake --add-missing --copy --force-missing
>> 36 configure.ac:26: installing 'config/compile'
>> 37 configure.ac:19: installing 'config/missing'
38 src/Makefile.am:14: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
39 src/Makefile.am: installing 'config/depcomp'
40 autoreconf: 'config/install-sh' is updated
41 autoreconf: 'config/config.sub' is updated
42 autoreconf: 'config/config.guess' is updated
43 autoreconf: Leaving directory '.'
...
71 checking whether the compiler supports GNU C++... yes
72 checking whether /home/spack5/spack/lib/spack/env/gcc/g++ accepts -g... yes
73 checking for /home/spack5/spack/lib/spack/env/gcc/g++ option to enable C++11 features... none needed
74 checking dependency style of /home/spack5/spack/lib/spack/env/gcc/g++... gcc3
75 checking for /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/bin/mpicc... /home/spack5/spack/opt/spack/linux
-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/bin/mpicc
76 Checking whether /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/bin/mpicc responds to '-showme:compile'...
yes
>> 77 configure: error: unable to locate adept-utils installation
See build log for details:
/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b/spack-build-out.txt
Note
This command may take a while to run and may produce more output if you don’t already have an MPI installed or configured in Spack.
We see that Spack has now identified and built all of our dependencies. It found that:
the
openmpipackage will satisfy ourmpidependency;adept-utilsis a concrete dependency; andcallpathis a concrete dependency.
But we are still not able to build the package.
Debugging Package Builds
Our tutorial-mpileaks package is still not building due to the
adept-utils package’s configure error. Experienced
Autotools developers will likely already see the problem and
its solution.
But let’s take this opportunity to use Spack features to investigate the problem. Our options for proceeding are:
review the build log; and
build the package manually.
Reviewing the Build Log
The build log might yield some clues so let’s look at the contents of
the spack-build-out.txt file at the path recommended above by our
failed installation:
$ cat /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b/spack-build-out.txt
==> tutorial-mpileaks: Executing phase: 'autoreconf'
==> [2024-11-18-13:21:50.837843] '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin/autoreconf' '--install' '--verbose' '--force'
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4
autoreconf: running: /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin/autoconf --force
configure.ac:9: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:9: You should use the 'AC_CONFIG_HEADERS' macro instead.
/tmp/root/spack-stage/spack-stage-autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/spack-src/lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:745: AM_CONFIG_HEADER is expanded from...
configure.ac:9: the top level
configure.ac:38: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
configure.ac:38: You should run autoupdate.
m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from...
configure.ac:38: the top level
configure.ac:47: warning: The macro 'AC_HEADER_STDC' is obsolete.
configure.ac:47: You should run autoupdate.
/tmp/root/spack-stage/spack-stage-autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/spack-src/lib/autoconf/headers.m4:663: AC_HEADER_STDC is expanded from...
configure.ac:47: the top level
autoreconf: running: /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:26: installing 'config/compile'
configure.ac:19: installing 'config/missing'
src/Makefile.am:14: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/Makefile.am: installing 'config/depcomp'
autoreconf: 'config/install-sh' is updated
autoreconf: 'config/config.sub' is updated
autoreconf: 'config/config.guess' is updated
autoreconf: Leaving directory '.'
==> tutorial-mpileaks: Executing phase: 'configure'
==> [2024-11-18-13:21:54.922531] Find (max depth = None): ['/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b/spack-src'] ['configure']
==> [2024-11-18-13:21:54.923514] Find complete: ['/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b/spack-src'] ['configure']
==> [2024-11-18-13:21:54.923798] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b/spack-src/configure [replacing "^(\s*if test x-L = )("\$p" \|\|\s*)$"]
==> [2024-11-18-13:21:54.945259] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b/spack-src/configure [replacing "^(\s*test x-R = )("\$p")(; then\s*)$"]
==> [2024-11-18-13:21:54.967899] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b/spack-src/configure [replacing "^(\s*test \$p = "-R")(; then\s*)$"]
==> [2024-11-18-13:21:54.991332] '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b/spack-src/configure' '--prefix=/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-yycbswnziaqf7y2aprkhwxl4n6il6s3b'
checking metadata... no
checking installation directory variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... /home/spack5/spack/lib/spack/env/gcc/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /home/spack5/spack/lib/spack/env/gcc/gcc accepts -g... yes
checking for /home/spack5/spack/lib/spack/env/gcc/gcc option to enable C11 features... none needed
checking whether /home/spack5/spack/lib/spack/env/gcc/gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of /home/spack5/spack/lib/spack/env/gcc/gcc... gcc3
checking whether the compiler supports GNU C++... yes
checking whether /home/spack5/spack/lib/spack/env/gcc/g++ accepts -g... yes
checking for /home/spack5/spack/lib/spack/env/gcc/g++ option to enable C++11 features... none needed
checking dependency style of /home/spack5/spack/lib/spack/env/gcc/g++... gcc3
checking for /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/bin/mpicc... /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/bin/mpicc
Checking whether /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/bin/mpicc responds to '-showme:compile'... yes
configure: error: unable to locate adept-utils installation
In this case the error conveniently appears on the last line of the log and the output from spack install.
Here we also see a number of checks performed by the configure command.
Most importantly, the last line is very clear: the installation path of the
adept-utils dependency cannot be found.
Note
Spack automatically adds standard include and library directories
to the compiler’s search path but it is not uncommon for this
information to not get picked up. Some software, like mpileaks,
requires the paths to be explicitly provided on the command line.
So let’s investigate further from the staged build directory.
Building Manually
First let’s try to build the package manually to see if we can figure out how to solve the problem.
Let’s move to the build directory using the spack cd command:
$ spack cd tutorial-mpileaks
You should now be in the appropriate stage directory since this
command moves us into the working directory of the last attempted
build. If not, you can cd into the directory above that contained
the spack-build-out.txt file then into it’s spack-src
subdirectory.
Now let’s ensure the environment is properly set up using the
spack build-env command:
$ spack build-env tutorial-mpileaks bash
This command spawned a new shell containing the same environment
that Spack used to build the tutorial-mpileaks package. (Feel
free to substitute your favorite shell for bash.)
Note
If you are running using an AWS instance, you’ll want to
substitute your home directory for /home/spack below.
From here we can manually re-run the build using the configure
command:
$ ./configure --prefix=/home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/mpileaks-1.0-wl3kx4o4bgegghl4u7hb3jk4toina3fx
checking metadata... no
checking installation directory variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... /home/spack/spack/lib/spack/env/gcc/gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/spack/spack/lib/spack/env/gcc/gcc accepts -g... yes
checking for /home/spack/spack/lib/spack/env/gcc/gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /home/spack/spack/lib/spack/env/gcc/gcc... gcc3
checking whether /home/spack/spack/lib/spack/env/gcc/gcc and cc understand -c and -o together... yes
checking whether we are using the GNU C++ compiler... yes
checking whether /home/spack/spack/lib/spack/env/gcc/g++ accepts -g... yes
checking dependency style of /home/spack/spack/lib/spack/env/gcc/g++... gcc3
checking for /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openmpi-4.1.3-jfxctqwar7wb65rn7wf5mot7m4jxmsey/bin/mpicc... /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openmpi-4.1.3-jfxctqwar7wb65rn7wf5mot7m4jxmsey/bin/mpicc
Checking whether /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openmpi-4.1.3-jfxctqwar7wb65rn7wf5mot7m4jxmsey/bin/mpicc responds to '-showme:compile'... yes
configure: error: unable to locate adept-utils installation
checking metadata... no
checking installation directory variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... /home/spack/spack/lib/spack/env/gcc/gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/spack/spack/lib/spack/env/gcc/gcc accepts -g... yes
checking for /home/spack/spack/lib/spack/env/gcc/gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /home/spack/spack/lib/spack/env/gcc/gcc... gcc3
checking whether /home/spack/spack/lib/spack/env/gcc/gcc and cc understand -c and -o together... yes
checking whether we are using the GNU C++ compiler... yes
checking whether /home/spack/spack/lib/spack/env/gcc/g++ accepts -g... yes
checking dependency style of /home/spack/spack/lib/spack/env/gcc/g++... gcc3
checking for /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openmpi-4.1.1-p5qicacmcy72pjljd4lfdy66kavxp3tv/bin/mpicc... /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openmpi-4.1.1-p5qicacmcy72pjljd4lfdy66kavxp3tv/bin/mpicc
Checking whether /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openmpi-4.1.1-p5qicacmcy72pjljd4lfdy66kavxp3tv/bin/mpicc responds to '-showme:compile'... yes
configure: error: unable to locate adept-utils installation
And we get the same results as before. Unfortunately, the output does not provide any additional information that can help us with the build.
Given that this is a simple package built with configure and we know
that installation directories need to be specified, we can use its
help to see what command line options are available for the software.
$ ./configure --help
`configure' configures mpileaks 1.0 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/mpileaks]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-adept-utils=PATH Specify adept-utils path
--with-callpath=PATH Specify libcallpath path
--with-stack-start-c=value
Specify integer number for MPILEAKS_STACK_START for
C code
--with-stack-start-fortran=value
Specify integer number for MPILEAKS_STACK_START for
FORTRAN code
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
CXXCPP C++ preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <moody20@llnl.gov>.
Note that you can specify the paths for the two concrete dependencies with the following options:
--with-adept-utils=PATH--with-callpath=PATH
So let’s leave the spawned shell and return to the Spack repository directory:
$ exit
$ cd $SPACK_ROOT
Now that we know what arguments to provide, we can update the recipe.
Specifying Configure Arguments
We now know which options we need to pass to configure, but how do we
know where to find the installation paths for the package’s dependencies
from within the package.py file?
Fortunately, we can query the package’s concrete Spec instance.
The self.spec property holds the package’s directed acyclic graph
(DAG) of its dependencies. Each dependency’s Spec, accessed by name,
has a prefix property containing its installation path.
So let’s add the configuration arguments for specifying the paths to
the two concrete dependencies in the configure_args method of our
package.
Bring mpileaks’ package.py file back up in your $EDITOR with
the spack edit command:
$ spack edit tutorial-mpileaks
and add the --with-adept-utils and --with-callpath arguments
in the configure_args method as follows:
from spack.package import *
class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"
maintainers("alecbcs")
license("BSD", checked_by="alecbcs")
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("mpi")
depends_on("adept-utils")
depends_on("callpath")
def autoreconf(self, spec, prefix):
autoreconf("--install", "--verbose", "--force")
def configure_args(self):
args = [
f"--with-adept-utils={self.spec['adept-utils'].prefix}",
f"--with-callpath={self.spec['callpath'].prefix}",
]
return args
Since this is an AutotoolsPackage, the arguments returned from the
method will automatically get passed to configure during the build.
Now let’s try the build again:
$ spack install tutorial-mpileaks
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/boost-1.72.0-bzwzix4qauzxltjlvug3vkpzt6kfyase
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/numactl-2.0.18-euqyy3hu6d7yiuf67q6xgmiwtlgfkanp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ncurses-6.5-rvg7j6bmergf3is4yoacm5sgsi7l4tvm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiberty-2.41-ojjef3cyseiyid7u6jf7dk4mzyxsm5ta
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/xz-5.4.6-2fvrfr67ahyx5vqg6hyd3dachcl3nl2k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxcrypt-4.4.35-v64tnmrjg7o5beyhae6x42vqlcxzdon6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiconv-1.17-bsga3novxptycgb4bpv4mldtq3f5m7mj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pkgconf-2.2.0-oplsmxryrcg6ackisqtpszdarzch6a6t
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libsigsegv-2.14-ea6qziv7obmf5fq3mxy42rhxptoiwfb6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.2.1-fhud6vqkh7jaesckalgqg5xxml72in6i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zstd-1.5.6-t7h6imj35ruac562vr7snzvli2h2tzup
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/findutils-4.9.0-2sbkhchnzzj4a43ykj5jkwctwjc6b7lm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/readline-8.2-aylebxvheua4djgtfzzqi2ialcjt5mw7
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/berkeley-db-18.1.40-cexliohp6aqckxeq4bqy5wrmxzyrfzqc
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libedit-3.1-20240808-nhrbcomj5lgnql2itckj7py3hi6wuz5d
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libpciaccess-0.17-omw5cc44g5qrphf7aqyjpdpmw2b3tr4i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/m4-1.4.19-qaspjyq5yqcso6yatgyhvm7j632ez7md
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pigz-2.8-pcwnu2wfae7nfv5isb3kcl7otav2m5zy
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssl-3.4.0-5gigqgwld4jgaxb46pzeavxuicamdgvw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxml2-2.13.4-wozcmyn2bivorr7geiwavaqeosmwmaow
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libdwarf-0.11.0-hz7ptvgac3xb3gczyob462mpmtq7ki7k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gdbm-1.23-jj2atvsdprz6qvh2n43326zfxv42iw7n
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libtool-2.4.7-tt3byemiknxgeuaadpxrltepvic7xsms
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tar-1.34-mmv6i4naeg746pk2xpypdpejwvypmegb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libevent-2.1.12-xbwxobi4cjizcuch7ukmi4igoosktbma
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hwloc-2.11.1-fwtuzgpmp2dy3udiekh6nwnbcld22kmk
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/perl-5.40.0-cwpt5ec6gcal6ftcrrxcecnt74fdjfhi
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gettext-0.22.5-bexdfw2vfc64r6u72mqestm6olahfr6e
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pmix-5.0.3-5wqqmswtibbhuilr356mzviq4flzdc3z
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/intel-tbb-2021.12.0-u5vh5hcz3rg7kg4qmgozni66up7bke5y
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/automake-1.16.5-awgfaon3dsdj54pighglmrv7gnex7jko
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/krb5-1.21.3-pq3as37xnogsfkivav3r6phgtsuwhjlb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssh-9.9p1-wz7w27t54u5lcphpvtwvv43vmhwmqwkn
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/dyninst-13.0.0-idhmtve2yuxvjsnv3e4kytfiggmifdkq
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j
==> Installing tutorial-mpileaks-1.0-aioesrlziebnohzdoa6lofftxzr2todv [44/44]
==> No binary for tutorial-mpileaks-1.0-aioesrlziebnohzdoa6lofftxzr2todv found: installing from source
==> Using cached archive: /home/spack5/spack/var/spack/cache/_source-cache/archive/24/24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9.tar.gz
==> No patches needed for tutorial-mpileaks
==> tutorial-mpileaks: Executing phase: 'autoreconf'
==> tutorial-mpileaks: Executing phase: 'configure'
==> tutorial-mpileaks: Executing phase: 'build'
==> tutorial-mpileaks: Executing phase: 'install'
==> tutorial-mpileaks: Successfully installed tutorial-mpileaks-1.0-aioesrlziebnohzdoa6lofftxzr2todv
Stage: 0.01s. Autoreconf: 4.06s. Configure: 3.24s. Build: 3.63s. Install: 0.21s. Post-install: 0.08s. Total: 11.45s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-aioesrlziebnohzdoa6lofftxzr2todv
Success!
All we needed to do was add the path arguments for the two concrete packages for configure to perform a simple, no frills build.
But is that all we can do to help other users build our software?
Adding Variants
What if we want to expose the software’s optional features in the package? We can do this by adding build-time options using package variants.
Recall from configure’s help output for tutorial-mpileaks that the
software has several optional features and packages that we could support
in Spack. Two stand out for tutorial purposes because they both take integers,
as opposed to simply allowing them to be enabled or disabled.
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-adept-utils=PATH Specify adept-utils path
--with-callpath=PATH Specify libcallpath path
--with-stack-start-c=value
Specify integer number for MPILEAKS_STACK_START for
C code
--with-stack-start-fortran=value
Specify integer number for MPILEAKS_STACK_START for
FORTRAN code
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
According to the software’s documentation (https://github.com/LLNL/mpileaks),
the integer values for the --with-stack-start-* options represent the
numbers of calls to shave off of the top of the stack traces for each
language, effectively reducing the noise of internal mpileaks library function
calls in generated traces.
For simplicity, we’ll use one variant to supply the value for both arguments.
Supporting this optional feature will require two changes to the package:
add a
variantdirective; andchange the configure options to use the value.
Let’s add the variant to expect an int value with a default of
0. Defaulting to 0 effectively disables the option. Also change
configure_args to retrieve the value and add the corresponding
configure arguments when a non-zero value is provided by the user.
Bring mpileaks’ package.py file back up in your $EDITOR with
the spack edit command:
$ spack edit tutorial-mpileaks
and add the variant directive and associated arguments as follows:
from spack.package import *
class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"
maintainers("alecbcs")
license("BSD", checked_by="alecbcs")
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
variant(
"stackstart",
values=int,
default=0,
description="Specify the number of stack frames to truncate",
)
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("mpi")
depends_on("adept-utils")
depends_on("callpath")
def autoreconf(self, spec, prefix):
autoreconf("--install", "--verbose", "--force")
def configure_args(self):
args = [
f"--with-adept-utils={self.spec['adept-utils'].prefix}",
f"--with-callpath={self.spec['callpath'].prefix}",
]
stackstart = int(self.spec.variants["stackstart"].value)
if stackstart:
args.extend(
[
f"--with-stack-start-c={stackstart}",
f"--with-stack-start-fortran={stackstart}",
]
)
return args
Notice that the variant directive is translated into a variants dictionary
in self.spec. Also note that the value provided by the user is accessed
by the entry’s value property.
Now run the installation again with the --verbose install option – to
get more output during the build – and the new stackstart package option:
$ spack install --verbose tutorial-mpileaks stackstart=4
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pkgconf-2.2.0-oplsmxryrcg6ackisqtpszdarzch6a6t
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/berkeley-db-18.1.40-cexliohp6aqckxeq4bqy5wrmxzyrfzqc
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/numactl-2.0.18-euqyy3hu6d7yiuf67q6xgmiwtlgfkanp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiberty-2.41-ojjef3cyseiyid7u6jf7dk4mzyxsm5ta
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libsigsegv-2.14-ea6qziv7obmf5fq3mxy42rhxptoiwfb6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/boost-1.72.0-bzwzix4qauzxltjlvug3vkpzt6kfyase
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiconv-1.17-bsga3novxptycgb4bpv4mldtq3f5m7mj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxcrypt-4.4.35-v64tnmrjg7o5beyhae6x42vqlcxzdon6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/findutils-4.9.0-2sbkhchnzzj4a43ykj5jkwctwjc6b7lm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zstd-1.5.6-t7h6imj35ruac562vr7snzvli2h2tzup
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libpciaccess-0.17-omw5cc44g5qrphf7aqyjpdpmw2b3tr4i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/m4-1.4.19-qaspjyq5yqcso6yatgyhvm7j632ez7md
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/xz-5.4.6-2fvrfr67ahyx5vqg6hyd3dachcl3nl2k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ncurses-6.5-rvg7j6bmergf3is4yoacm5sgsi7l4tvm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.2.1-fhud6vqkh7jaesckalgqg5xxml72in6i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libtool-2.4.7-tt3byemiknxgeuaadpxrltepvic7xsms
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libedit-3.1-20240808-nhrbcomj5lgnql2itckj7py3hi6wuz5d
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/readline-8.2-aylebxvheua4djgtfzzqi2ialcjt5mw7
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxml2-2.13.4-wozcmyn2bivorr7geiwavaqeosmwmaow
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pigz-2.8-pcwnu2wfae7nfv5isb3kcl7otav2m5zy
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssl-3.4.0-5gigqgwld4jgaxb46pzeavxuicamdgvw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libdwarf-0.11.0-hz7ptvgac3xb3gczyob462mpmtq7ki7k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gdbm-1.23-jj2atvsdprz6qvh2n43326zfxv42iw7n
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hwloc-2.11.1-fwtuzgpmp2dy3udiekh6nwnbcld22kmk
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tar-1.34-mmv6i4naeg746pk2xpypdpejwvypmegb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libevent-2.1.12-xbwxobi4cjizcuch7ukmi4igoosktbma
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/perl-5.40.0-cwpt5ec6gcal6ftcrrxcecnt74fdjfhi
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/intel-tbb-2021.12.0-u5vh5hcz3rg7kg4qmgozni66up7bke5y
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gettext-0.22.5-bexdfw2vfc64r6u72mqestm6olahfr6e
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pmix-5.0.3-5wqqmswtibbhuilr356mzviq4flzdc3z
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/automake-1.16.5-awgfaon3dsdj54pighglmrv7gnex7jko
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/krb5-1.21.3-pq3as37xnogsfkivav3r6phgtsuwhjlb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/dyninst-13.0.0-idhmtve2yuxvjsnv3e4kytfiggmifdkq
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssh-9.9p1-wz7w27t54u5lcphpvtwvv43vmhwmqwkn
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j
==> Installing tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet [44/44]
==> No binary for tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet found: installing from source
==> Using cached archive: /home/spack5/spack/var/spack/cache/_source-cache/archive/24/24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9.tar.gz
==> No patches needed for tutorial-mpileaks
==> tutorial-mpileaks: Executing phase: 'autoreconf'
==> [2024-11-18-13:23:39.303737] '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin/autoreconf' '--install' '--verbose' '--force'
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4
autoreconf: running: /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin/autoconf --force
configure.ac:9: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:9: You should use the 'AC_CONFIG_HEADERS' macro instead.
/tmp/root/spack-stage/spack-stage-autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/spack-src/lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:745: AM_CONFIG_HEADER is expanded from...
configure.ac:9: the top level
configure.ac:38: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
configure.ac:38: You should run autoupdate.
m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from...
configure.ac:38: the top level
configure.ac:47: warning: The macro 'AC_HEADER_STDC' is obsolete.
configure.ac:47: You should run autoupdate.
/tmp/root/spack-stage/spack-stage-autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/spack-src/lib/autoconf/headers.m4:663: AC_HEADER_STDC is expanded from...
configure.ac:47: the top level
autoreconf: running: /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:26: installing 'config/compile'
configure.ac:19: installing 'config/missing'
src/Makefile.am:14: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/Makefile.am: installing 'config/depcomp'
autoreconf: 'config/install-sh' is updated
autoreconf: 'config/config.sub' is updated
autoreconf: 'config/config.guess' is updated
autoreconf: Leaving directory '.'
==> tutorial-mpileaks: Executing phase: 'configure'
==> [2024-11-18-13:23:43.367057] Find (max depth = None): ['/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'] ['configure']
==> [2024-11-18-13:23:43.368017] Find complete: ['/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'] ['configure']
==> [2024-11-18-13:23:43.368324] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/configure [replacing "^(\s*if test x-L = )("\$p" \|\|\s*)$"]
==> [2024-11-18-13:23:43.389912] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/configure [replacing "^(\s*test x-R = )("\$p")(; then\s*)$"]
==> [2024-11-18-13:23:43.412999] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/configure [replacing "^(\s*test \$p = "-R")(; then\s*)$"]
==> [2024-11-18-13:23:43.438625] '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/configure' '--prefix=/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet' '--with-adept-utils=/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55' '--with-callpath=/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j' '--with-stack-start-c=4' '--with-stack-start-fortran=4'
checking metadata... no
checking installation directory variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... /home/spack5/spack/lib/spack/env/gcc/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /home/spack5/spack/lib/spack/env/gcc/gcc accepts -g... yes
checking for /home/spack5/spack/lib/spack/env/gcc/gcc option to enable C11 features... none needed
checking whether /home/spack5/spack/lib/spack/env/gcc/gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of /home/spack5/spack/lib/spack/env/gcc/gcc... gcc3
checking whether the compiler supports GNU C++... yes
checking whether /home/spack5/spack/lib/spack/env/gcc/g++ accepts -g... yes
checking for /home/spack5/spack/lib/spack/env/gcc/g++ option to enable C++11 features... none needed
checking dependency style of /home/spack5/spack/lib/spack/env/gcc/g++... gcc3
checking for /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/bin/mpicc... /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/bin/mpicc
Checking whether /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/bin/mpicc responds to '-showme:compile'... yes
checking for adept-utils installation... /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55
checking for libcallpath installation... /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by /home/spack5/spack/lib/spack/env/gcc/gcc... /home/spack5/spack/lib/spack/env/ld
checking if the linker (/home/spack5/spack/lib/spack/env/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/spack5/spack/lib/spack/env/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from /home/spack5/spack/lib/spack/env/gcc/gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /home/spack5/spack/lib/spack/env/gcc/gcc supports -fno-rtti -fno-exceptions... no
checking for /home/spack5/spack/lib/spack/env/gcc/gcc option to produce PIC... -fPIC -DPIC
checking if /home/spack5/spack/lib/spack/env/gcc/gcc PIC flag -fPIC -DPIC works... yes
checking if /home/spack5/spack/lib/spack/env/gcc/gcc static flag -static works... yes
checking if /home/spack5/spack/lib/spack/env/gcc/gcc supports -c -o file.o... yes
checking if /home/spack5/spack/lib/spack/env/gcc/gcc supports -c -o file.o... (cached) yes
checking whether the /home/spack5/spack/lib/spack/env/gcc/gcc linker (/home/spack5/spack/lib/spack/env/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... /home/spack5/spack/lib/spack/env/gcc/g++ -E
checking for ld used by /home/spack5/spack/lib/spack/env/gcc/g++... /home/spack5/spack/lib/spack/env/ld -m elf_x86_64
checking if the linker (/home/spack5/spack/lib/spack/env/ld -m elf_x86_64) is GNU ld... yes
checking whether the /home/spack5/spack/lib/spack/env/gcc/g++ linker (/home/spack5/spack/lib/spack/env/ld -m elf_x86_64) supports shared libraries... yes
checking for /home/spack5/spack/lib/spack/env/gcc/g++ option to produce PIC... -fPIC -DPIC
checking if /home/spack5/spack/lib/spack/env/gcc/g++ PIC flag -fPIC -DPIC works... yes
checking if /home/spack5/spack/lib/spack/env/gcc/g++ static flag -static works... yes
checking if /home/spack5/spack/lib/spack/env/gcc/g++ supports -c -o file.o... yes
checking if /home/spack5/spack/lib/spack/env/gcc/g++ supports -c -o file.o... (cached) yes
checking whether the /home/spack5/spack/lib/spack/env/gcc/g++ linker (/home/spack5/spack/lib/spack/env/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for egrep... (cached) /usr/bin/grep -E
checking whether byte ordering is bigendian... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating examples/Makefile
config.status: creating scripts/Makefile
config.status: creating scripts/srun-mpileaks
config.status: creating scripts/srun-mpileaksf
config.status: creating config/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
==> [2024-11-18-13:23:46.417067] Find (max depth = None): ['/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'] ['libtool']
==> [2024-11-18-13:23:46.417605] Find complete: ['/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'] ['libtool']
==> [2024-11-18-13:23:46.417773] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/libtool [replacing "^wl=""$"]
==> [2024-11-18-13:23:46.431662] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/libtool [replacing "^pic_flag=""$"]
==> [2024-11-18-13:23:46.438227] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/libtool [replacing "^pic_flag=""$"]
==> [2024-11-18-13:23:46.482861] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/libtool [replacing "^pic_flag=""$"]
==> [2024-11-18-13:23:46.529063] FILTER FILE: /tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/libtool [replacing "^pic_flag=""$"]
==> tutorial-mpileaks: Executing phase: 'build'
==> [2024-11-18-13:23:46.600509] '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom/bin/make' '-j16' 'V=1'
make[1]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'
Making all in scripts
make[2]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/scripts'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/scripts'
Making all in src
make[2]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/src'
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT mpileaks.lo -MD -MP -MF .deps/mpileaks.Tpo -c -o mpileaks.lo mpileaks.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT comm.lo -MD -MP -MF .deps/comm.Tpo -c -o comm.lo comm.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT datatype.lo -MD -MP -MF .deps/datatype.Tpo -c -o datatype.lo datatype.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT errhandler.lo -MD -MP -MF .deps/errhandler.Tpo -c -o errhandler.lo errhandler.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT fileio.lo -MD -MP -MF .deps/fileio.Tpo -c -o fileio.lo fileio.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT group.lo -MD -MP -MF .deps/group.Tpo -c -o group.lo group.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT info.lo -MD -MP -MF .deps/info.Tpo -c -o info.lo info.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT keyval.lo -MD -MP -MF .deps/keyval.Tpo -c -o keyval.lo keyval.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT mem.lo -MD -MP -MF .deps/mem.Tpo -c -o mem.lo mem.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT op.lo -MD -MP -MF .deps/op.Tpo -c -o op.lo op.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT request.lo -MD -MP -MF .deps/request.Tpo -c -o request.lo request.cpp
/bin/bash ../libtool --tag=CXX --mode=compile /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT win.lo -MD -MP -MF .deps/win.Tpo -c -o win.lo win.cpp
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT mpileaks.lo -MD -MP -MF .deps/mpileaks.Tpo -c mpileaks.cpp -fPIC -DPIC -o .libs/mpileaks.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT comm.lo -MD -MP -MF .deps/comm.Tpo -c comm.cpp -fPIC -DPIC -o .libs/comm.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT op.lo -MD -MP -MF .deps/op.Tpo -c op.cpp -fPIC -DPIC -o .libs/op.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT group.lo -MD -MP -MF .deps/group.Tpo -c group.cpp -fPIC -DPIC -o .libs/group.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT win.lo -MD -MP -MF .deps/win.Tpo -c win.cpp -fPIC -DPIC -o .libs/win.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT errhandler.lo -MD -MP -MF .deps/errhandler.Tpo -c errhandler.cpp -fPIC -DPIC -o .libs/errhandler.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT mem.lo -MD -MP -MF .deps/mem.Tpo -c mem.cpp -fPIC -DPIC -o .libs/mem.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT request.lo -MD -MP -MF .deps/request.Tpo -c request.cpp -fPIC -DPIC -o .libs/request.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT datatype.lo -MD -MP -MF .deps/datatype.Tpo -c datatype.cpp -fPIC -DPIC -o .libs/datatype.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT keyval.lo -MD -MP -MF .deps/keyval.Tpo -c keyval.cpp -fPIC -DPIC -o .libs/keyval.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT info.lo -MD -MP -MF .deps/info.Tpo -c info.cpp -fPIC -DPIC -o .libs/info.o
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT fileio.lo -MD -MP -MF .deps/fileio.Tpo -c fileio.cpp -fPIC -DPIC -o .libs/fileio.o
keyval.cpp: In function 'int MPI_Keyval_create(int (*)(MPI_Comm, int, void*, void*, void*, int*), int (*)(MPI_Comm, int, void*, void*), int*, void*)':
keyval.cpp:38:30: warning: 'int PMPI_Keyval_create(int (*)(MPI_Comm, int, void*, void*, void*, int*), int (*)(MPI_Comm, int, void*, void*), int*, void*)' is deprecated: PMPI_Keyval_create was deprecated in MPI-2.0; use PMPI_Comm_create_keyval instead. [-Wdeprecated-declarations]
38 | int rc = PMPI_Keyval_create(copy_fn, delete_fn, keyval, extra_state);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from keyval.cpp:10:
/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include/mpi.h:3062:20: note: declared here
3062 | OMPI_DECLSPEC int PMPI_Keyval_create(MPI_Copy_function *copy_fn,
| ^~~~~~~~~~~~~~~~~~
errhandler.cpp: In function 'int MPI_Errhandler_create(void (*)(ompi_communicator_t**, int*, ...), ompi_errhandler_t**)':
errhandler.cpp:33:34: warning: 'int PMPI_Errhandler_create(void (*)(ompi_communicator_t**, int*, ...), ompi_errhandler_t**)' is deprecated: PMPI_Errhandler_create was removed in MPI-3.0. Use PMPI_Comm_create_errhandler instead. continuing... [-Wdeprecated-declarations]
33 | int rc = PMPI_Errhandler_create(function, eh);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
keyval.cpp: In function 'int MPI_Keyval_free(int*)':
keyval.cpp:93:28: warning: 'int PMPI_Keyval_free(int*)' is deprecated: PMPI_Keyval_free was deprecated in MPI-2.0; PMPI_Comm_free_keyval instead. [-Wdeprecated-declarations]
93 | int rc = PMPI_Keyval_free(keyval);
| ~~~~~~~~~~~~~~~~^~~~~~~~
In file included from keyval.cpp:10:
/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include/mpi.h:3068:20: note: declared here
3068 | OMPI_DECLSPEC int PMPI_Keyval_free(int *keyval)
| ^~~~~~~~~~~~~~~~
In file included from errhandler.cpp:10:
/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include/mpi.h:3129:20: note: declared here
3129 | OMPI_DECLSPEC int PMPI_Errhandler_create(MPI_Handler_function *function,
| ^~~~~~~~~~~~~~~~~~~~~~
errhandler.cpp: In function 'int MPI_Errhandler_get(MPI_Comm, ompi_errhandler_t**)':
errhandler.cpp:40:31: warning: 'int PMPI_Errhandler_get(MPI_Comm, ompi_errhandler_t**)' is deprecated: PMPI_Errhandler_get was removed in MPI-3.0. Use PMPI_Comm_get_errhandler instead. continuing... [-Wdeprecated-declarations]
40 | int rc = PMPI_Errhandler_get(comm, eh);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from errhandler.cpp:10:
/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include/mpi.h:3134:20: note: declared here
3134 | OMPI_DECLSPEC int PMPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler)
| ^~~~~~~~~~~~~~~~~~~
datatype.cpp: In function 'int MPI_Type_hvector(int, int, MPI_Aint, MPI_Datatype, ompi_datatype_t**)':
datatype.cpp:60:29: warning: 'int PMPI_Type_hvector(int, int, MPI_Aint, MPI_Datatype, ompi_datatype_t**)' is deprecated: PMPI_Type_hvector was removed in MPI-3.0. Use PMPI_Type_create_hvector instead. continuing... [-Wdeprecated-declarations]
60 | int rc = PMPI_Type_hvector(count, blocklength, stride, oldtype, newtype);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from datatype.cpp:10:
/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include/mpi.h:3155:20: note: declared here
3155 | OMPI_DECLSPEC int PMPI_Type_hvector(int count, int blocklength, MPI_Aint stride,
| ^~~~~~~~~~~~~~~~~
datatype.cpp: In function 'int MPI_Type_hindexed(int, int*, MPI_Aint*, MPI_Datatype, ompi_datatype_t**)':
datatype.cpp:78:30: warning: 'int PMPI_Type_hindexed(int, int*, MPI_Aint*, MPI_Datatype, ompi_datatype_t**)' is deprecated: PMPI_Type_hindexed was removed in MPI-3.0. Use PMPI_Type_create_hindexed instead. continuing... [-Wdeprecated-declarations]
78 | int rc = PMPI_Type_hindexed(count, array_of_blocklengths, array_of_displacements,
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79 | oldtype, newtype);
| ~~~~~~~~~~~~~~~~~
In file included from datatype.cpp:10:
/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include/mpi.h:3148:20: note: declared here
3148 | OMPI_DECLSPEC int PMPI_Type_hindexed(int count, int array_of_blocklengths[],
| ^~~~~~~~~~~~~~~~~~
datatype.cpp: In function 'int MPI_Type_struct(int, int*, MPI_Aint*, ompi_datatype_t**, ompi_datatype_t**)':
datatype.cpp:88:28: warning: 'int PMPI_Type_struct(int, int*, MPI_Aint*, ompi_datatype_t**, ompi_datatype_t**)' is deprecated: PMPI_Type_struct was removed in MPI-3.0. Use PMPI_Type_create_struct instead. continuing... [-Wdeprecated-declarations]
88 | int rc = PMPI_Type_struct(count, array_of_blocklengths, array_of_displacements,
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89 | array_of_types, newtype);
| ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from datatype.cpp:10:
/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include/mpi.h:3167:20: note: declared here
3167 | OMPI_DECLSPEC int PMPI_Type_struct(int count, int array_of_blocklengths[],
| ^~~~~~~~~~~~~~~~
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT fileio.lo -MD -MP -MF .deps/fileio.Tpo -c fileio.cpp -o fileio.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT info.lo -MD -MP -MF .deps/info.Tpo -c info.cpp -o info.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT group.lo -MD -MP -MF .deps/group.Tpo -c group.cpp -o group.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT mem.lo -MD -MP -MF .deps/mem.Tpo -c mem.cpp -o mem.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT request.lo -MD -MP -MF .deps/request.Tpo -c request.cpp -o request.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT op.lo -MD -MP -MF .deps/op.Tpo -c op.cpp -o op.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT win.lo -MD -MP -MF .deps/win.Tpo -c win.cpp -o win.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT errhandler.lo -MD -MP -MF .deps/errhandler.Tpo -c errhandler.cpp -o errhandler.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT mpileaks.lo -MD -MP -MF .deps/mpileaks.Tpo -c mpileaks.cpp -o mpileaks.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT keyval.lo -MD -MP -MF .deps/keyval.Tpo -c keyval.cpp -o keyval.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT comm.lo -MD -MP -MF .deps/comm.Tpo -c comm.cpp -o comm.o >/dev/null 2>&1
libtool: compile: /home/spack5/spack/lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I../config -DHAVE_CONFIG_H -I. -I../config -I../src -I../config -g -O2 -I/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/include -I/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/include -g -O2 -MT datatype.lo -MD -MP -MF .deps/datatype.Tpo -c datatype.cpp -o datatype.o >/dev/null 2>&1
mv -f .deps/info.Tpo .deps/info.Plo
mv -f .deps/fileio.Tpo .deps/fileio.Plo
mv -f .deps/mem.Tpo .deps/mem.Plo
mv -f .deps/group.Tpo .deps/group.Plo
mv -f .deps/win.Tpo .deps/win.Plo
mv -f .deps/request.Tpo .deps/request.Plo
mv -f .deps/comm.Tpo .deps/comm.Plo
mv -f .deps/op.Tpo .deps/op.Plo
mv -f .deps/errhandler.Tpo .deps/errhandler.Plo
mv -f .deps/datatype.Tpo .deps/datatype.Plo
mv -f .deps/mpileaks.Tpo .deps/mpileaks.Plo
mv -f .deps/keyval.Tpo .deps/keyval.Plo
/bin/bash ../libtool --tag=CXX --mode=link /home/spack5/spack/lib/spack/env/gcc/g++ -g -O2 -avoid-version -o libmpileaks.la -rpath /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/lib mpileaks.lo comm.lo datatype.lo errhandler.lo fileio.lo group.lo info.lo keyval.lo mem.lo op.lo request.lo win.lo -L/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/lib -ladept_cutils -ladept_timing -ladept_utils -L/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/lib -lcallpath
libtool: link: /home/spack5/spack/lib/spack/env/gcc/g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o .libs/mpileaks.o .libs/comm.o .libs/datatype.o .libs/errhandler.o .libs/fileio.o .libs/group.o .libs/info.o .libs/keyval.o .libs/mem.o .libs/op.o .libs/request.o .libs/win.o -L/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55/lib -ladept_cutils -ladept_timing -ladept_utils -L/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/lib -lcallpath -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o -g -O2 -Wl,-soname -Wl,libmpileaks.so -o .libs/libmpileaks.so
libtool: link: ar cr .libs/libmpileaks.a mpileaks.o comm.o datatype.o errhandler.o fileio.o group.o info.o keyval.o mem.o op.o request.o win.o
libtool: link: ranlib .libs/libmpileaks.a
libtool: link: ( cd ".libs" && rm -f "libmpileaks.la" && ln -s "../libmpileaks.la" "libmpileaks.la" )
make[2]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/src'
Making all in examples
make[2]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/examples'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/examples'
make[2]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'
make[1]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'
==> tutorial-mpileaks: Executing phase: 'install'
==> [2024-11-18-13:23:49.769254] '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom/bin/make' '-j16' 'install'
make[1]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'
Making install in scripts
make[2]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/scripts'
make[3]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/scripts'
make[3]: Nothing to be done for 'install-data-am'.
/usr/bin/mkdir -p '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/bin'
/usr/bin/install -c srun-mpileaks srun-mpileaksf '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/bin'
make[3]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/scripts'
make[2]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/scripts'
Making install in src
make[2]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/src'
make[3]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/src'
make[3]: Nothing to be done for 'install-data-am'.
/usr/bin/mkdir -p '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/lib'
/bin/bash ../libtool --mode=install /usr/bin/install -c libmpileaks.la '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/lib'
libtool: install: /usr/bin/install -c .libs/libmpileaks.so /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/lib/libmpileaks.so
libtool: install: /usr/bin/install -c .libs/libmpileaks.lai /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/lib/libmpileaks.la
libtool: install: /usr/bin/install -c .libs/libmpileaks.a /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/lib/libmpileaks.a
libtool: install: chmod 644 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/lib/libmpileaks.a
libtool: install: ranlib /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/lib/libmpileaks.a
libtool: finish: PATH="/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libtool-2.4.7-tt3byemiknxgeuaadpxrltepvic7xsms/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/findutils-4.9.0-2sbkhchnzzj4a43ykj5jkwctwjc6b7lm/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/automake-1.16.5-awgfaon3dsdj54pighglmrv7gnex7jko/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/perl-5.40.0-cwpt5ec6gcal6ftcrrxcecnt74fdjfhi/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/m4-1.4.19-qaspjyq5yqcso6yatgyhvm7j632ez7md/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssh-9.9p1-wz7w27t54u5lcphpvtwvv43vmhwmqwkn/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tar-1.34-mmv6i4naeg746pk2xpypdpejwvypmegb/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zstd-1.5.6-t7h6imj35ruac562vr7snzvli2h2tzup/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pigz-2.8-pcwnu2wfae7nfv5isb3kcl7otav2m5zy/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto/bin:/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/xz-5.4.6-2fvrfr67ahyx5vqg6hyd3dachcl3nl2k/bin:/home/spack5/spack/lib/spack/env/gcc:/home/spack5/spack/lib/spack/env/case-insensitive:/home/spack5/spack/lib/spack/env:/home/spack5/spack/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[3]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/src'
make[2]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/src'
Making install in examples
make[2]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/examples'
make[3]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/examples'
make[3]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/share/mpileaks/examples'
/usr/bin/install -c -m 644 tests.c mpiPing_leaky.f '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/share/mpileaks/examples'
make[3]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/examples'
make[2]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src/examples'
make[2]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'
make[3]: Entering directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'
make[3]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/share/mpileaks'
/usr/bin/install -c -m 644 README '/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/share/mpileaks'
make[3]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'
make[2]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'
make[1]: Leaving directory '/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet/spack-src'
==> [2024-11-18-13:23:49.975883] Find (max depth = None): ['/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet'] ['*.la']
==> [2024-11-18-13:23:49.976620] Find complete: ['/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet'] ['*.la']
==> tutorial-mpileaks: Successfully installed tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet
Stage: 0.01s. Autoreconf: 4.04s. Configure: 3.21s. Build: 3.15s. Install: 0.21s. Post-install: 0.08s. Total: 10.92s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-tqy66l7jhykqziuadgo6voikqcqgblet
Notice the addition of the two stack start arguments in the configure
command that appears at the end of the highlighted line after mpileaks’
Executing phase: 'configure'.
Adding Tests
The simplest tests we can add are sanity checks, which can be used to ensure the directories and files we expect to be installed for all versions of the package actually exist. If we look at a successful installation, we can see that the following directories will be installed:
bin
lib
share
So let’s add a simple sanity check to ensure they are present, BUT let’s enter a typo to see what happens:
from spack.package import *
class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"
maintainers("alecbcs")
license("BSD", checked_by="alecbcs")
sanity_check_is_dir = ["bin", "lib", "shar"]
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
variant(
"stackstart",
values=int,
default=0,
description="Specify the number of stack frames to truncate",
)
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("mpi")
depends_on("adept-utils")
depends_on("callpath")
def autoreconf(self, spec, prefix):
autoreconf("--install", "--verbose", "--force")
def configure_args(self):
args = [
f"--with-adept-utils={self.spec['adept-utils'].prefix}",
f"--with-callpath={self.spec['callpath'].prefix}",
]
stackstart = int(self.spec.variants["stackstart"].value)
if stackstart:
args.extend(
[
f"--with-stack-start-c={stackstart}",
f"--with-stack-start-fortran={stackstart}",
]
)
return args
We’ll need to uninstall the package so we can re-run it with tests enabled:
$ spack uninstall -ay tutorial-mpileaks
==> Successfully uninstalled tutorial-mpileaks@1.0%gcc@11.4.0 build_system=autotools stackstart=4 arch=linux-ubuntu22.04-x86_64_v3/tqy66l7
==> Successfully uninstalled tutorial-mpileaks@1.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3/aioesrl
$ spack install --test=root tutorial-mpileaks
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/berkeley-db-18.1.40-cexliohp6aqckxeq4bqy5wrmxzyrfzqc
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiberty-2.41-ojjef3cyseiyid7u6jf7dk4mzyxsm5ta
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.2.1-fhud6vqkh7jaesckalgqg5xxml72in6i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/findutils-4.9.0-2sbkhchnzzj4a43ykj5jkwctwjc6b7lm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/boost-1.72.0-bzwzix4qauzxltjlvug3vkpzt6kfyase
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/numactl-2.0.18-euqyy3hu6d7yiuf67q6xgmiwtlgfkanp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssl-3.4.0-5gigqgwld4jgaxb46pzeavxuicamdgvw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libtool-2.4.7-tt3byemiknxgeuaadpxrltepvic7xsms
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pigz-2.8-pcwnu2wfae7nfv5isb3kcl7otav2m5zy
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ncurses-6.5-rvg7j6bmergf3is4yoacm5sgsi7l4tvm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxcrypt-4.4.35-v64tnmrjg7o5beyhae6x42vqlcxzdon6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiconv-1.17-bsga3novxptycgb4bpv4mldtq3f5m7mj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/xz-5.4.6-2fvrfr67ahyx5vqg6hyd3dachcl3nl2k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zstd-1.5.6-t7h6imj35ruac562vr7snzvli2h2tzup
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libsigsegv-2.14-ea6qziv7obmf5fq3mxy42rhxptoiwfb6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pkgconf-2.2.0-oplsmxryrcg6ackisqtpszdarzch6a6t
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libevent-2.1.12-xbwxobi4cjizcuch7ukmi4igoosktbma
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/readline-8.2-aylebxvheua4djgtfzzqi2ialcjt5mw7
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tar-1.34-mmv6i4naeg746pk2xpypdpejwvypmegb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libdwarf-0.11.0-hz7ptvgac3xb3gczyob462mpmtq7ki7k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/m4-1.4.19-qaspjyq5yqcso6yatgyhvm7j632ez7md
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libpciaccess-0.17-omw5cc44g5qrphf7aqyjpdpmw2b3tr4i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxml2-2.13.4-wozcmyn2bivorr7geiwavaqeosmwmaow
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libedit-3.1-20240808-nhrbcomj5lgnql2itckj7py3hi6wuz5d
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gdbm-1.23-jj2atvsdprz6qvh2n43326zfxv42iw7n
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gettext-0.22.5-bexdfw2vfc64r6u72mqestm6olahfr6e
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hwloc-2.11.1-fwtuzgpmp2dy3udiekh6nwnbcld22kmk
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/perl-5.40.0-cwpt5ec6gcal6ftcrrxcecnt74fdjfhi
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pmix-5.0.3-5wqqmswtibbhuilr356mzviq4flzdc3z
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/intel-tbb-2021.12.0-u5vh5hcz3rg7kg4qmgozni66up7bke5y
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/krb5-1.21.3-pq3as37xnogsfkivav3r6phgtsuwhjlb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/dyninst-13.0.0-idhmtve2yuxvjsnv3e4kytfiggmifdkq
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/automake-1.16.5-awgfaon3dsdj54pighglmrv7gnex7jko
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssh-9.9p1-wz7w27t54u5lcphpvtwvv43vmhwmqwkn
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j
==> Installing tutorial-mpileaks-1.0-g2lov635dozxso3n72szos6a5txf6dkd [44/44]
==> No binary for tutorial-mpileaks-1.0-g2lov635dozxso3n72szos6a5txf6dkd found: installing from source
==> Using cached archive: /home/spack5/spack/var/spack/cache/_source-cache/archive/24/24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9.tar.gz
==> No patches needed for tutorial-mpileaks
==> tutorial-mpileaks: Executing phase: 'autoreconf'
==> tutorial-mpileaks: Executing phase: 'configure'
==> tutorial-mpileaks: Executing phase: 'build'
==> tutorial-mpileaks: Executing phase: 'install'
==> Error: InstallError: Install failed for tutorial-mpileaks. No such directory in prefix: shar
See build log for details:
/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-g2lov635dozxso3n72szos6a5txf6dkd/spack-build-out.txt
See test log for details:
/tmp/spack5/spack-stage/spack-stage-tutorial-mpileaks-1.0-g2lov635dozxso3n72szos6a5txf6dkd/install-time-test-log.txt
Notice the installation fails due to the missing directory.
Now let’s fix the error and try again:
from spack.package import *
class TutorialMpileaks(AutotoolsPackage):
"""Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes."""
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz"
maintainers("alecbcs")
license("BSD", checked_by="alecbcs")
sanity_check_is_dir = ["bin", "lib", "share"]
version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9")
variant(
"stackstart",
values=int,
default=0,
description="Specify the number of stack frames to truncate",
)
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("mpi")
depends_on("adept-utils")
depends_on("callpath")
def autoreconf(self, spec, prefix):
autoreconf("--install", "--verbose", "--force")
def configure_args(self):
args = [
f"--with-adept-utils={self.spec['adept-utils'].prefix}",
f"--with-callpath={self.spec['callpath'].prefix}",
]
stackstart = int(self.spec.variants["stackstart"].value)
if stackstart:
args.extend(
[
f"--with-stack-start-c={stackstart}",
f"--with-stack-start-fortran={stackstart}",
]
)
return args
Installing again we can see we’ve fixed the problem.
$ spack install --test=root tutorial-mpileaks
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ncurses-6.5-rvg7j6bmergf3is4yoacm5sgsi7l4tvm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pkgconf-2.2.0-oplsmxryrcg6ackisqtpszdarzch6a6t
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/findutils-4.9.0-2sbkhchnzzj4a43ykj5jkwctwjc6b7lm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/boost-1.72.0-bzwzix4qauzxltjlvug3vkpzt6kfyase
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxcrypt-4.4.35-v64tnmrjg7o5beyhae6x42vqlcxzdon6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zstd-1.5.6-t7h6imj35ruac562vr7snzvli2h2tzup
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libsigsegv-2.14-ea6qziv7obmf5fq3mxy42rhxptoiwfb6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiconv-1.17-bsga3novxptycgb4bpv4mldtq3f5m7mj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiberty-2.41-ojjef3cyseiyid7u6jf7dk4mzyxsm5ta
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/xz-5.4.6-2fvrfr67ahyx5vqg6hyd3dachcl3nl2k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libedit-3.1-20240808-nhrbcomj5lgnql2itckj7py3hi6wuz5d
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/numactl-2.0.18-euqyy3hu6d7yiuf67q6xgmiwtlgfkanp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libpciaccess-0.17-omw5cc44g5qrphf7aqyjpdpmw2b3tr4i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libtool-2.4.7-tt3byemiknxgeuaadpxrltepvic7xsms
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.2.1-fhud6vqkh7jaesckalgqg5xxml72in6i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/readline-8.2-aylebxvheua4djgtfzzqi2ialcjt5mw7
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/berkeley-db-18.1.40-cexliohp6aqckxeq4bqy5wrmxzyrfzqc
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/m4-1.4.19-qaspjyq5yqcso6yatgyhvm7j632ez7md
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxml2-2.13.4-wozcmyn2bivorr7geiwavaqeosmwmaow
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libdwarf-0.11.0-hz7ptvgac3xb3gczyob462mpmtq7ki7k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssl-3.4.0-5gigqgwld4jgaxb46pzeavxuicamdgvw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pigz-2.8-pcwnu2wfae7nfv5isb3kcl7otav2m5zy
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gdbm-1.23-jj2atvsdprz6qvh2n43326zfxv42iw7n
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hwloc-2.11.1-fwtuzgpmp2dy3udiekh6nwnbcld22kmk
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libevent-2.1.12-xbwxobi4cjizcuch7ukmi4igoosktbma
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tar-1.34-mmv6i4naeg746pk2xpypdpejwvypmegb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/perl-5.40.0-cwpt5ec6gcal6ftcrrxcecnt74fdjfhi
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/intel-tbb-2021.12.0-u5vh5hcz3rg7kg4qmgozni66up7bke5y
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pmix-5.0.3-5wqqmswtibbhuilr356mzviq4flzdc3z
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gettext-0.22.5-bexdfw2vfc64r6u72mqestm6olahfr6e
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/autoconf-2.72-vgucajy3lkmspohhktsvmzgzttgzwqnw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/krb5-1.21.3-pq3as37xnogsfkivav3r6phgtsuwhjlb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/automake-1.16.5-awgfaon3dsdj54pighglmrv7gnex7jko
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/dyninst-13.0.0-idhmtve2yuxvjsnv3e4kytfiggmifdkq
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssh-9.9p1-wz7w27t54u5lcphpvtwvv43vmhwmqwkn
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/adept-utils-1.0.1-q5xl3h77ochzhs4f5ebpjdsnetuvze55
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/callpath-1.0.4-7hjlu6ddwmsb3mrwzfibjpg3fg7tpu6j
==> Installing tutorial-mpileaks-1.0-vzdlgthikoszjm6f2bg7rzfx4ynpvxtn [44/44]
==> No binary for tutorial-mpileaks-1.0-vzdlgthikoszjm6f2bg7rzfx4ynpvxtn found: installing from source
==> Using cached archive: /home/spack5/spack/var/spack/cache/_source-cache/archive/24/24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9.tar.gz
==> No patches needed for tutorial-mpileaks
==> tutorial-mpileaks: Executing phase: 'autoreconf'
==> tutorial-mpileaks: Executing phase: 'configure'
==> tutorial-mpileaks: Executing phase: 'build'
==> tutorial-mpileaks: Executing phase: 'install'
==> tutorial-mpileaks: Successfully installed tutorial-mpileaks-1.0-vzdlgthikoszjm6f2bg7rzfx4ynpvxtn
Stage: 0.01s. Autoreconf: 4.03s. Configure: 3.19s. Build: 3.20s. Install: 0.27s. Post-install: 0.08s. Total: 11.02s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tutorial-mpileaks-1.0-vzdlgthikoszjm6f2bg7rzfx4ynpvxtn
This is just scratching the surface of testing an installation. We could leverage the examples from this package to add post-install phase tests and/or stand-lone tests. Refer to the links at the bottom for more information on checking an installation.
Querying the Spec Object
As packages evolve and are ported to different systems, build recipes
often need to change as well. This is where the package’s Spec comes
in.
So far we’ve looked at getting the paths for dependencies and values of
variants from the Spec but there is more. The package’s self.spec,
property allows you to query information about the package build, such as:
how a package’s dependencies were built;
what compiler was being used;
what version of a package is being installed; and
what variants were specified (implicitly or explicitly).
Examples of common queries are provided below.
Querying Spec Versions
You can customize the build based on the version of the package, compiler, and dependencies. Examples of each are:
Am I building my package with version
1.1or greater?
if self.spec.satisfies("@1.1:"):
# Do things needed for version 1.1 or newer
Am I building with a
gccversion up to5.0?
if self.spec.satisfies("%gcc@:5.0"):
# Add arguments specific to gcc's up to 5.0
Is my
dyninstdependency at least version8.0?
if self.spec["dyninst"].satisfies("@8.0:"):
# Use newest dyninst options
Querying Spec Names
If the build has to be customized to the concrete version of an abstract
Spec you can use its name property. For example:
Is
openmpithe MPI I’m building with?
if self.spec["mpi"].name == "openmpi":
# Do openmpi things
Querying Variants
Adjusting build options based on enabled variants can be done by querying
the Spec itself, such as:
Am I building with the
debugvariant?
if "+debug" in self.spec:
# Add -g option to configure flags
These are just a few examples of Spec queries. Spack has thousands of
built-in packages that can serve as examples to guide the development
of your package. You can find these packages in
$SPACK_ROOT/var/spack/repos/builtin/packages.
Multiple Build Systems
There are cases where software actively supports two build systems, or changes build systems as it evolves, or needs different build systems on different platforms. Spack allows you to write a single, neat recipe for these cases too. It will only require a slight change in the recipe’s structure compared to what we have seen so far.
Let’s take uncrustify, a source code beautifier, as an example. This software
used to build with Autotools until version 0.63, and then switched build systems
to CMake at version 0.64.
Compared to previous recipes in this tutorial, in this case we need Uncrustify to
inherit from both CMakePackage and AutotoolsPackage. We also need to explicitly
specify the build_system directive, and add conditional dependencies based on
build system:
class Uncrustify(CMakePackage, AutotoolsPackage):
"""Source Code Beautifier for C, C++, C#, ObjectiveC, Java, and others."""
homepage = "http://uncrustify.sourceforge.net/"
git = "https://github.com/uncrustify/uncrustify"
version("0.64", commit="1d7d97")
version("0.63", commit="44ce0f")
build_system(
conditional("cmake", when="@0.64:"),
conditional("autotools", when="@:0.63"),
default="cmake",
)
with when("build_system=cmake"):
depends_on("cmake@3.18:", type="build")
We didn’t mention it so far, but each spec has a build_system variant that specifies
the build system it uses. In most cases that variant has a single allowed value, inherited from the
corresponding base package - so, usually, you don’t have to think about it.
When your package supports more than one build system though, you have to explicitly declare which ones are
allowed and under which conditions. In the example above it’s cmake for version 0.64 and higher and
autotools for version 0.63 and lower.
The build_system variant can also be used to declare other properties which are conditional on the build
system being selected. For instance, above we declare that when using cmake, CMake 3.18+ is required.
The other relevant difference, compared to the previous recipes we have seen so far, is that the code prescribing the installation procedure will live into two separate classes:
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
pass
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
pass
Depending on the spec, and more specifically on the value of the build_system directive, a Builder
object will be instantiated from one of the two classes when an installation is requested from a user.
Cleaning Up
Before leaving this tutorial, let’s ensure what we have done does not interfere with your Spack instance or future sections of the tutorial. Undo the work we’ve done here by entering the following commands:
$ spack uninstall -ay tutorial-mpileaks
==> Successfully uninstalled tutorial-mpileaks@1.0%gcc@11.4.0 build_system=autotools stackstart=0 arch=linux-ubuntu22.04-x86_64_v3/vzdlgth
$ spack repo remove tutorial
==> Removed repository /home/spack5/spack/var/spack/repos/tutorial with namespace 'tutorial'.
$ rm -rf $SPACK_ROOT/var/spack/repos/tutorial/packages/tutorial-mpileaks
More information
This tutorial module only scratches the surface of defining Spack package recipes. The Packaging Guide more thoroughly covers packaging topics.
Additional information on key topics can be found at the links below.
Testing an installation
Checking an installation: for more information on adding tests that run at build-time and against an installation
Using other build systems
Build Systems: for the full list of built-in build systems
Spack Package Build Systems tutorial: for tutorials on common build systems
Multiple Build Systems: for a reference on writing packages with multiple build systems
Package Class Architecture: for more insight on the inner workings of
PackageandBuilderclasses.The GDAL Package: for an example of a complex package which extends Python and supports two build systems.
Making a package externally detectable
Making a package externally discoverable: for making a package discoverable using the
spack external findcommand