0

I am trying to install cilk++ according to this website and am at the steps in section "Cilk Plus Runtime". When I go to build, I get the following output:

$ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=./install ..
CMake Error at CMakeLists.txt:132 (message):
  CXX compiler must support Cilk.


-- Configuring incomplete, errors occurred!
See also "/Users/anthonymcknight/Documents/cubing/bfs/lab4/cilk/cilkrts-0.1.2/build/CMakeFiles/CMakeOutput.log".
See also "/Users/anthonymcknight/Documents/cubing/bfs/lab4/cilk/cilkrts-0.1.2/build/CMakeFiles/CMakeError.log".

I thought clang and clang++ (which I checked with --version are indeed installed) would be sufficient. Do I need to update clang and clang++? There are no troubleshooting steps on the instructions website, so I'm not sure what I need to do to finally get cilk++ up and running on my laptop.

Thanks in advance,

Anthony

Kevin
  • 16,549
  • 8
  • 60
  • 74
anthony_m
  • 61
  • 1
  • 5
  • 1
    The Cilk GitHub page specifies that your compiler must be a **Cilk-enabled branch** of Clang (see [here](https://github.com/OpenCilk/cilkrts#1-building)). Is this what you are using? – Kevin Feb 11 '20 at 15:58
  • @squareskittles Honestly, I wasn't, but in the process of installing a new compiler I ran into a [new issue](https://stackoverflow.com/questions/60192073/error-during-cmake-build-missing-header-file-that-i-know-the-path-to-mac) – anthony_m Feb 12 '20 at 15:49

1 Answers1

0

Expanding on my comment:

When you configure this Cilk Plus Runtime with CMake, CMake first verifies the compiler by attempting to compile a simple test program (see here). If the compilation fails, CMake prints the error you see:

CMake Error at CMakeLists.txt:132 (message):
  CXX compiler must support Cilk.

On the Intel Cilk Plus runtime Github page (cilkrts), it has some compiler requirements listed for those trying to build this library:

You need the CMake tool and a C/C++ compiler that supports the Cilk language extensions. The requirements for each operating systems are:

  • Common: CMake 3.4.3 or later Make tools such as make
  • Linux: Tapir/LLVM compiler, or GCC* 4.9.2 or later (depracated), or Cilk-enabled branch of Clang*/LLVM* (http://cilkplus.github.io), or Intel(R) C++ Compiler v12.1 or later (depracated)
  • OS X: Tapir/LLVM compiler, or Cilk-enabled branch of Clang*/LLVM* (http://cilkplus.github.io), or Intel C++ Compiler v12.1 or later (depracated)

Since you are using Clang as your compiler, be sure it is a Cilk-enabled branch of Clang, as specified in the requirements. Or, you can try to use the Tapir/LLVM compiler.

Kevin
  • 16,549
  • 8
  • 60
  • 74