Steps to reproduce
On macOS, specifically on the M1 architecture, /opt/homebrew should be in the system paths:
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py
index da6832e4dd..8d60f108e8 100644
--- a/lib/spack/spack/util/environment.py
+++ b/lib/spack/spack/util/environment.py
@@ -36,7 +36,7 @@
]
SUFFIXES = []
else:
- SYSTEM_PATHS = ["/", "/usr", "/usr/local"]
+ SYSTEM_PATHS = ["/", "/usr", "/usr/local", "/opt/homebrew"]
SUFFIXES = ["bin", "bin64", "include", "lib", "lib64"]
SYSTEM_DIRS = [os.path.join(p, s) for s in SUFFIXES for p in SYSTEM_PATHS] + SYSTEM_PATHS
The reason is that if you have things like git-lfs, mysql installed there (which are a nightmare to build on macOS in spack), then the current spack develop code puts the path /opt/homebrew/bin in front of other paths when the spack-generated modules are loaded. If one has a python3 in /opt/homebrew/bin, then suddenly that python3 gets found again, even though the spack python3 module was loaded (first). The above change fixes that.
Error message
See description above
Information on your system
* **Spack:** 0.21.0.dev0 (98957cf32aa809e831bee4af2bf642e2bd038c04)
* **Python:** 3.8.9
* **Platform:** darwin-monterey-m1
* **Concretizer:** clingo
General information
Steps to reproduce
On macOS, specifically on the M1 architecture,
/opt/homebrewshould be in the system paths:The reason is that if you have things like
git-lfs,mysqlinstalled there (which are a nightmare to build on macOS in spack), then the current spack develop code puts the path/opt/homebrew/binin front of other paths when the spack-generated modules are loaded. If one has apython3in/opt/homebrew/bin, then suddenly thatpython3gets found again, even though the spack python3 module was loaded (first). The above change fixes that.Error message
See description above
Information on your system
General information
spack debug reportand reported the version of Spack/Python/Platform