-
Notifications
You must be signed in to change notification settings - Fork 21
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
Re-introduce Clang host compiler support #936
base: master
Are you sure you want to change the base?
Conversation
When CUDA dislikes the version of clang (or gcc) used, it emits a compile time error. When CMake attempts to check for a working CUDA compiler, it doesn't output why it failed, just that CUDA could not be found. CUDA 11.0 requires clang < 10, with 9 listed in the linux installation documentation as the selected version (but > 3.2).
This is a bit noisy for our readme, so probably just saying "clang > 9 supported by your NVCC installation", which will also avoid us from having to maintain a list. Clang 9 with CUDA 11.0 is currently failing to compile on my office machine (and presumably the same issue as on CI) due to what looks to be a stdlib mismatch, i.e. as its' linking aginast the gcc stdlib (which is fine) but it is linking against the most recent installed version, which in some combinations is incompatible. I.e. When using clang 9, there will be a maximum compatible libstdc++ version, of which the most recent version is too new. Uninstalling newer To verify if CI is doing the same or not, i'll need to add some extra ci stuff to output the relevant file. |
Updated list of supported clang's per CUDA based on the linux release notes. Pre CUDA 12.2 a single value was listed, which may have been the upper bound, although it differs from my previous table a little. Recent installation guides also state that:
|
Some clang CI builds now in a good state, others not so much for a mix of reasons:
Some of these could also be that although i've matched supported major clang version to the cuda version, a minor clang update has caused an incompatibilty. Recent clang + recent cuda (14 and 12+) seem to behave nicely though. |
CUDA 12+ with clang 11-14 (all that's easily installable on ubuntu 22.04) are all happy enough on CI now for vis and non vis builds. CUDA 11.x is unhappy for a number of reasons, mostly internal compiler issues often reported elsewhere. Rather than put extra effort into adding support for as broad a clang version as possible, going to instead state that clang is partially uspported, but only tested for cuda 12+ and add 2 ci jobs, cuda 12.0 clang 11 and cuda 12.x clang 14. CUDA 11.6 + clang 12 and CUDA 11.2 + clang-9 work for console builds, but not vis builds. Other combinations tried from 11.0 + clang 9 to 11.8 + clang 13 using the cuda supported clang's don't work on ubuntu 20.04/22.04. They may work on other systems with different gcc stdlib's installed, but not going to support that. |
clang 7 does not build, with nvcc reporting it does not understand c++17 (although clang itself claims 5+ does). Clang 8 and clang 9 without vis build on ci ok with cuda 12.0. Vis builds encounter errors during pyflamegpu building
This is although libsdl2-dev is installed and found by CMake. The 20.04 SDL2 Cmake file installed at # sdl2 cmake project-config input for ./configure scripts
set(prefix "/usr")
set(exec_prefix "${prefix}")
set(libdir "${prefix}/lib/x86_64-linux-gnu")
set(SDL2_PREFIX "/usr")
set(SDL2_EXEC_PREFIX "/usr")
set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
set(SDL2_LIBRARIES " -lSDL2")
string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES) While 22.04's version has a significanlty more complex sdl2 config file. Edit - this might actually be an issue in our custom sdl2 handling in the vis branch for older libsdl2, which creates the imported target using |
Add clang to the CI build matrix Add clang-specific warning suppressions
moving a temporary object prevents copy elision [-Wpessimizing-move]
…ed (though this might be one value too high still?
…actually help short term. 20.04 is EOL soon.
… worth trying to fix
Closes #623
CUDA 11.8 lists Clang 14 as the supported version.
CUDA 11.0 lists Clang 9 as the supported version, however CMake reports that CUDA would not build somethign in this case on CI. Need to debug on a local 20.04 box (i.e. the office).
11.1 + clang 9 seems to be compatible (although a warning suppression flag is too new for this)