However, it can't see certain libs, specifically clang/Lex/Token.h
This was the error produced when running make on the ruby gem source:
>:~/Desktop/ruby/c2ffi/build$ cmake .. -- Found LLVM 5.0.2 -- LLVM installed in /usr/lib/llvm-5.0 -- Using LLVMConfig.cmake in: /usr/lib/llvm-5.0/cmake -- Using llvm libs: LLVMCore;LLVMSupport;LLVMMCParser;LLVMOption;LLVMBitReader;LLVMProfileData -- CMAKE_CXX_FLAGS: -std=c++11 -fno-exceptions -fno-rtti -- CMAKE_EXE_LINKER_FLAGS: -- Configuring done -- Generating done -- Build files have been written to: /home/arjun/Desktop/ruby/c2ffi/build >:~/Desktop/ruby/c2ffi/build$ make Scanning dependencies of target c2ffi [ 7%] Building CXX object CMakeFiles/c2ffi.dir/src/Expr.cpp.o /home/arjun/Desktop/ruby/c2ffi/src/Expr.cpp:22:29: fatal error: clang/Lex/Token.h: No such file or directory compilation terminated. CMakeFiles/c2ffi.dir/build.make:62: recipe for target 'CMakeFiles/c2ffi.dir/src/Expr.cpp.o' failed make: *** [CMakeFiles/c2ffi.dir/src/Expr.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/c2ffi.dir/all' failed make: *** [CMakeFiles/c2ffi.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2
I tried to do
locate */clang/Lex/*, but it did no return anything, which means the guide I followed to install clang was not absolute.
What is the correct way to install clang 5.0 so that all dependencies can be viewed by any source?