opened
citibeth
username_0
Re-running `spack compiler find` does not find compilers that have been installed since the last time it was run.  See:

https://groups.google.com/forum/#!topic/spack/9r4CR9jmNjY
Re-running `spack compiler find`...
issue
created
davydden
username_1
so the suggestion is to always update `compilers.yaml` with the new paths, in case Spack find the same compiler/version but in a new location now?
comment
created
adamjstewart
username_2
Just to be more clear, the issue isn't that `spack compiler find` doesn't find new compilers. It's that it doesn't update _existing_ Spack compilers with _newly added_ Fortran compilers. If you run `spack compiler remove gcc` and re-run `spack compiler find`, I suspect it will work as expected.

This is definitely a troublesome bug, and probably happens for a lot of macOS users.
comment
created
tgamblin
username_3
The idea with the current behavior is that it will not update an existing user configuration with a "better" compiler if the user doesn't want one.  I suspect people actually want their Fortran compilers updated when they run `spack compiler find`.

Is it sufficient to notice that some compilers are set to `None` and to update *those* if they are found?
comment
created
adamjstewart
username_2
I think that would be enough. The only thing I want to make sure is that it won't overwrite my `cflags` and friends.
comment
created
citibeth
username_0
`spack compiler find` could root around, find stuff, show it to the user,
and then ask for direction on what to do.
comment
created
davydden
username_1
and then ask for direction on what to do.

that would also do, but I don't think it's necessary for the current problem and is also more complicated to implement. I would not bother asking a user when updating `None` to `something`, jus t confirm to him/her that this happened.
comment
created
citibeth
username_0
I agree, sounds good to me.
comment
created
aprokop
username_4
Got hit by that in #2342 when using a container with only gcc/g++ installed. Updated HEAD which included a newer variant of openmpi (which needs Fortran), installed gfortran, even blew away spack but the problem was only solved by removing `~/.spack/linux/complers.py`
comment
created
alalazo
username_5
Closing as it appears to be solved:
```
$ spack compilers
==> Available compilers
-- clang ubuntu18.04-x86_64 -------------------------------------
clang@9.0.1  clang@8.0.0  clang@7.0.0  clang@6.0.1  clang@5.0.1  clang@4.0.1  clang@3.9.1

-- gcc ubuntu18.04-x86_64 ---------------------------------------
gcc@9.0.1  gcc@8.3.0  gcc@7.4.0  gcc@6.5.0  gcc@5.5.0  gcc@4.8

$ spack compiler remove gcc@5.5.0
==> Removed compiler gcc@5.5.0

$ spack compiler find
==> Added 1 new compiler to /home/culpo/.spack/linux/compilers.yaml
gcc@5.5.0
==> Compilers are defined in the following files:
    /home/culpo/.spack/linux/compilers.yaml
```
comment
closed
alalazo
username_5
issue