So when building arrayfire on Arch you kind of run into the error below if the default gcc version is more than 6.0.0
Make Error: NVCC does not support GCC version 6.0 or greater.
So here is a hack that might help you fix that particular snag.
-
Make sure you intall an alternate version of gcc that is < 6 but > 4.3 in this case gcc-5
-
Make sure you are in the arrayfire directory
cd path/to/arrayfire
-
Modify the CMake configuration file
nano src/backend/cuda/CMakeLists.txt
-
Add this line
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) FIND_PACKAGE(CUDA 7.0 REQUIRED) set(CMAKE_CXX_COMPILER_VERSION /usr/bin/gcc-5) # this one INCLUDE(CLKernelToH) INCLUDE(FindNVVM) OPTION(USE_LIBDEVICE "Use libdevice for CUDA JIT" ON) SET(CUDA_LIBDEVICE_DIR "${CUDA_NVVM_HOME}/libdevice" CACHE PATH "Path where lib$ MARK_AS_ADVANCED( CUDA_BUILD_CUBIN CUDA_BUILD_EMULATION CUDA_SDK_ROOT_DIR CUDA_VERBOSE_BUILD)
-
So basically what that does is point arrayfire to the right compatible compiler. You should be good to go my flags to cmake were
cmake .. -DCMAKE_BUILD_TYPE=Release BUILD_CUDA=ON