Repository: spack/spack

Issue:
Errors installing packages on aarch64?
current main branch (develop) cannot build any packages
(git hash 02931a82fd506a095ab93d6ad1d0dc416caf141d)

### Steps to reproduce the issue

```console
git clone https://github.com/spack/spack.git
. spack/share/spack/setup-env.sh
spack install hdf5
```

### Error Message

```console
==> Warning: CROSS has not been set, however cannot detect scheduler.
==> Error: Command exited with status 1:
'/usr/bin/clang' '-v' '/tmp/spack-implicit-link-infobHKHO2/main.c' '-o' '/tmp/spack-implicit-link-infobHKHO2/output'
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: aarch64-redhat-linux-gnu
Thread model: posix
Selected GCC installation: 
 "/usr/bin/clang" -cc1 -triple aarch64-redhat-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name main.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu generic -target-linker-version 2.27 -v -resource-dir /usr/bin/../lib/clang/3.4.2 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.4.2/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /home/jens -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-slp -o /tmp/main-07f21b.o -x c /tmp/spack-implicit-link-infobHKHO2/main.c
clang -cc1 version 3.4.2 based upon LLVM 3.4.2 default target aarch64-redhat-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/bin/../lib/clang/3.4.2/include
 /usr/include
End of search list.
 "/usr/bin/ld" --hash-style=gnu --no-add-needed --build-id --eh-frame-hdr -m aarch64linux -dynamic-linker /lib/ld-linux-aarch64.so.1 -o /tmp/spack-implicit-link-infobHKHO2/output /lib/../lib64/crt1.o /lib/../lib64/crti.o crtbegin.o -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib /tmp/main-07f21b.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed crtend.o /lib/../lib64/crtn.o
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

### Possible mitigation

```
git checkout v0.12.1
```

### Information on your system

System: ThunderX2 (aarch64)
Linux: CentOS Linux release 7.6.1810
Kernel: 4.14.0-115.10.1.el7a.aarch64


Discussion:

Resolving patch:
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py
--- a/lib/spack/spack/compiler.py
+++ b/lib/spack/spack/compiler.py
@@ -294,6 +294,10 @@ def determine_implicit_rpaths(cls, paths):
                                       output=str, error=str))  # str for py2
 
             return cls.parse_implicit_rpaths(output)
+        except spack.util.executable.ProcessError as pe:
+            tty.debug('ProcessError: Command exited with non-zero status: ' +
+                      pe.long_message)
+            return []
         finally:
             shutil.rmtree(tmpdir, ignore_errors=True)
 


Test patch: