New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modules: /opt/homebrew should be in list of system paths on macOS - or not? #39046
Comments
I am finally coming back to this - one thought that I had based on our discussion in the spack user meeting a few weeks ago is that we could change the spack logic for appending/prepending to the various |
There is also PR #35737 ("Improve setup/build/run environment") that could consider and solve this problem. |
Can you give more details? There shouldn't be modules for externals, so what's adding this into PATH? |
FWIW, I'd rather see fewer than more system paths. At the end of the day it's a matter of prioritizing Spack prefixes over external prefixes, Spack doesn't have to know what a system path is to do that. |
I talked with @alalazo and @scheibelp about this issue during our weekly Wednesday meetings, it might be more efficient if you have a chat with them. I don't understand "There shouldn't be modules for externals", though. If I ask spack to create modules, |
Hm okay, I thought we excluded those by default. In that case it's a load order issue, which is a bit annoying cause that's determined by the |
Correct, and therefore my (probably naive) thinking that appending for externals and prepending for spack-built packages would work. In our case, not creating modules for any external package would work, but maybe that's not the case for everyone. |
Yeah, that could work too. |
Prepending has issues too (but might be better than the current state?). The fact here is that both system paths and |
;p that's ugly, but should be roughly equivalent to how we partition externals in |
To explain better what I mean by #39046 (comment) Assume that two applications, say |
sure, but that's unsolvable |
I've updated the title and tags to reflect the fact that this is only an issue with generated module files. The environment that Spack sets up for Spack installs generally avoids these types of issues (e.g. making sure that Spack-built prefixes appear first, followed by externals). Perhaps the modules generation could use the same approach. I think that depending on module load order, there might still be an issue. IIRC, one possibility discussed for modules was to always prepend Spack-built prefixes and always append external prefixes, which might resolve that. |
#39046 (comment) this is likely closest, like |
Steps to reproduce
On macOS, specifically on the M1 architecture,
/opt/homebrew
should be in the 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 apython3
in/opt/homebrew/bin
, then suddenly thatpython3
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
General information
spack debug report
and reported the version of Spack/Python/PlatformThe text was updated successfully, but these errors were encountered: