1

I decided I wanted to install gcc@10.2 with spack, so I ran the command spack --insecure install gcc@10.2. This attempts to download https://ftpmirror.gnu.org/gcc/gcc-10.2/gcc-10.2.tar.xz, which no longer exists.

I downloaded gcc-10.2.tar.xz from a valid mirror, and attempted to add a mirror.

I've tried variants of the form

$ spack mirror add local_filesystem gcc-10.2.tar.xz

However, spack install gcc@10.2 still gives the same answer.

I can't figure out how to get spack to use the mirror for installing. What am I missing?

1 Answers1

0

My understanding is that you would first use spack to create the mirror, e.g.:

spack mirror create -d /tmp/mirror gcc@10.2.0 

This will create the directory /tmp/mirror and download a tarball to /tmp/mirror_source_cache, with symbolic link to /tmp/mirror/gcc:

$ ll /tmp/mirror/gcc/gcc-10.2.0.tar.xz 
lrwxrwxrwx. 1 willmore jlse 99 Nov 30 20:32 /tmp/mirror/gcc/gcc-10.2.0.tar.xz -> ../_source-cache/archive/b8/b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c.tar.xz

Even if you aren't able to create the mirror automatically with spack mirror create, you can still put the tarball directly where that symlink is.

Then add the mirror (which is just that directory):

spack mirror add my_mirror file:///tmp/mirror

TLDR: The mirror isn't just the tarball, but it contains the tarball. Also, you may try adding the public mirror:

spack-public    https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/
  • I tried the above steps, then asked spack to install gcc@10.2.0. It went to amazonaws rather than use the tarball I downloaded. So, it seems to be useless. :( – Steven R Brandt Dec 01 '20 at 21:31
  • It will probably check the public mirror first. If you remove that, and if you've added your mirror, it *should* fall back to that. – Frank Willmore Dec 02 '20 at 22:42