Open citibeth opened 6 years ago
I added some Xcode auto-detection stuff in lib/spack/spack/compilers/clang.py
with warning messages if the full Xcode suite is not installed. Perhaps this can be expanded on.
Given the cross-platform nature of spack, the CLT seems like the more important piece.
The more I look into it, it seems as though there's an XCode equivalent for everything that the CLT installs -- the latest example I've run into is OpenGL/GLU:
XCode: -framework OpenGL
CLT: -I/usr/X11R6/include -L/usr/X11R6/lib -lGL -lGLU
Of these, the CLT behave more *nix-like, and are probably easier to work with, but there may be the odd package that requires xcodebuild
, for whatever reason (e.g., Apple's open source libraries sometimes only have XCode build system files, like https://github.com/opensource-apple/dtrace).
All I know is... everyone says you have to have CLT for builds to work. For example, I installed a binary-download of gfortran. It didn't work without CLT installed (and that was a common complaint outside of Spack as well). Once I installed CLT, the problems went away.
Without going too deep, my conclusion is that CLT is required for most anything one would want to build with Spack.
@goxberry You can use -framework
with the CLT as well. Nothing special there (it's just the defaults that tend to be used by Xcode versus autoconf and CMake).
Agreed; I used to do that, but it’s better avoided in spack when possible to reduce the number of conditionals in packages.
On Mon, Feb 5, 2018 at 12:52 Ben Boeckel notifications@github.com wrote:
@goxberry https://github.com/goxberry You can use -framework with the CLT as well. Nothing special there (it's just the defaults that tend to be used by Xcode versus autoconf and CMake).
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/spack/spack/issues/7151#issuecomment-363217475, or mute the thread https://github.com/notifications/unsubscribe-auth/AATnxxmHQghy-Z2dqqiMqxgj_xUymq9fks5tR2n6gaJpZM4R0fm3 .
-- Geoffrey Oxberry, Ph.D., E.I.T. goxberry@gmail.com
When building on Mac (using default compilers), it is necessary to have Xcode and Command Line tools installed. Apple unfortunately doesn't make this easy. If you installed Xcode but not CLT, things will go ahead just fine, but some stuff won't work.
During setup (creating of
compilers.yaml
), Spack should check that Xcode and Command Line Tools are installed; and if not, complain with an error, telling the user how to install the required stuff. This will be the right thing to do on 99% of Macs. For the remaining 1%, maybe there should be an override to ignore the error, or have the user createcompilers.yaml
manually.