-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
spack install paraview fails with cmake #3296
Comments
Did you recently install C++ compilers? Like since you first installed Spack? You may have to add them to your |
I didn't, but just to make sure I removed the However I discovered by careful examination of the cmake log (https://gist.github.com/certik/9084b0cb3282420cab745d0dcaf8183c) that spack was using the gcc@6.1.1 compiler and that compiler only had Fortran and C installed, but not C++. I think that's a bug in spack, it should be clever enough to figure out that the C++ compiler is missing and fail earlier with a nice error message. Anyway, the above problem is fixed by doing:
Then it builds cmake just fine and continues all the way to building paraview. So this problem is fixed for me. I am going to keep this issue open if you want to extract the bug about the compiler. Feel free to close it anytime. |
I think one just need to add a check to Paraview to make sure c++ compiler is present. @certik want to create a PR with the fix? Ps. Not all packages need all compilers, so it's allowed to miss some compilers |
In this case the C++ compiler is needed for the cmake package, not the paraview package. How do you check that C++ is present in spack? |
ah, then this should be in
|
There are tons of C++ packages in spack, should all of them have this check? I think perhaps spack itself should handle this, rather than the |
Until we have a way to say that a given package needs certain compilers, i.e. #896, then technically all of the C++ package should be checking it. I would not add it everywhere, though, as this is most likely a temporary solution. But it probably still makes sense to check in the most crucial packages, like @adamjstewart @alalazo @tgamblin ping. |
IMO yes and no. Spack should make it easier for packages to declare which compilers they need to build. But each given package should still be able to build only with those compilers needed and others being |
@certik @davydden: so we've been putting this off for reasons @davydden mentioned, because we would like to make compilers proper dependencies that provide languages and/or features at particular versions. However, thanks to @certik I was thinking about this and I think we could handle the checks we need (if not the compilers themselves) already. Suggestion:
We can consolidate the check logic in this package, AND we can express the language requirements the way we eventually want to, anyway. Example: class Paraview(Package):
...
depends_on('cxx@03:', type='build') Done, in a future proof way, without actually needing to modify the core. Thoughts? @alalazo @davydden @adamjstewart @certik |
@tgamblin this looks reasonable to me. Essentially every DAG which have anywhere I like p.s. i was thinking about moving these checks into |
Yes. It could be a build dependency, so that it's really only there for checking at build time. We could consider making this type of package special so that it wouldn't actually create an install directory.
There are certainly complexities with the versioning and the mapping to compilers. I would like to provide these semantics because I think they're simple and easy to read, and I agree that we can be conservative about when we say a compiler actually provides cxx@11. If we want finer granularity, we can also have this package implement checks for features. e.g. Finally, we don't support it right now but once we have the new concretizer, we could add
I think using the dependency system is better, as it's not another special case and this way would allow us to easily drop the dependency-ized compilers in. Does that sound better? |
If we need to have support for compiler dependencies with some urgency, I think this is the way to go. Otherwise I wouldn't mind waiting for a complete (and more consistent?) rework of compilers.
This can be a rabbit hole... I wouldn't go into that if we are not forced to. For instance
👍 |
Agreed. |
and the
spack-build.out
file contains:But I have C and C++ compilers installed, e.g.:
The
cmake_bootstrap.log
file is available at: https://gist.github.com/certik/9084b0cb3282420cab745d0dcaf8183cThe text was updated successfully, but these errors were encountered: