0

I am working on free and open-source software for the Earth science community, using spack to install the massive list of dependencies needed for some forecast models.

The goal is that scientists all over the world (potentially with little build experience) can correctly install all the software needed to start working with these models.

I am following the instructions here: https://spack-tutorial.readthedocs.io/en/latest/tutorial_basics.html

I am trying to use spack external find to find perl, which is already on my machine. But spack does not find it:

ed@Pooh-Bah:~/spack$ spack external find
==> The following specs have been detected on this system and added to /home/ed/spack/var/spack/environments/e2/spack.yaml
curl@7.81.0  git-lfs@3.0.2  meson@0.61.2  ninja@1.10.1
ed@Pooh-Bah:~/spack$ spack external find perl
==> No new external packages detected
ed@Pooh-Bah:~/spack$ perl --version

This is perl 5, version 34, subversion 0 (v5.34.0) built for x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)

How can I get spack to find the existing installation of perl?

I understand that I can manually add perl to a spack configuration file. But perl is just an example of several packages that spack is not finding that I need.

I want spack to be able to find as much as it can from the user's system. If the user has perl, then use it. If the user has mysql, then use that too.

I expected spack external find to find all such packages. But instead if finds just a few. What would be really helpful to the scientist user out there is if it would find as many as possible. How do I make that happen?

Edward Hartnett
  • 882
  • 7
  • 16

1 Answers1

-1

You can try to manually add the external package to your ~/.spack/packages.yml adding something like

  packages:
    perl:
      externals:
      - spec: perl@5.26.1 %gcc@11.3.0
        prefix: /usr

Source: https://spack-tutorial.readthedocs.io/en/latest/tutorial_configuration.html?highlight=perl#external-packages

Vicente Bolea
  • 1,409
  • 16
  • 39
  • That doesn't answer the question. Why does spack external find perl not find it? – Edward Hartnett Aug 31 '23 at 05:43
  • You can try to run to add the debug flag to `spack external find` such as `spack -d external find` to figure out why it is ignoring perl. If you cannot find which paths are been accessed, you could use strace to see it. – Vicente Bolea Aug 31 '23 at 16:03