So, I'm trying to create a toy compiler using LLVM, and I would like to use CMake as my build system. I tried using the CMakeLists.txt sample from the LLVM website, but when cmake started:
CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:178 (include): include could not find load file: /usr/share/llvm/cmake/LLVMExports.cmake Call Stack (most recent call first): CMakeLists.txt:4 (find_package) CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:181 (include): include could not find load file: /usr/share/llvm/cmake/LLVM-Config.cmake Call Stack (most recent call first): CMakeLists.txt:4 (find_package)
When I went to investigate the problem, I found that the path on my system is actually /usr/share/llvm-3.8/ . When I tried to change the path to /usr/share/llvm/ as it expects, I get another error:
CMake Error at /usr/share/llvm/cmake/LLVMExports.cmake:1034 (message): The imported target "LLVMSupport" references the file "/usr/lib/libLLVMSupport.a" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/share/llvm/cmake/LLVMExports.cmake" but not all the files it references.
I'm not very good at how CMake works, so I'm not sure where to go from here. I am running Ubuntu 16.04 and I was trying to install LLVM through various packages with the same results. Is this a problem with the Ubuntu packaging system or something that I can fix?
source share