Bug#735592: llvm-3.5-dev: LLVM/Clang CMake package files missing
Ulf Wetzker
ulf.wetzker at eas.iis.fraunhofer.de
Fri Mar 13 16:20:18 UTC 2015
On 06/03/2014 01:49 PM, Sylvestre Ledru wrote:
> The files contain bad internal filenames. For example, if you try to build
> an LLVM pass according to the LLVM instructions
> http://llvm.org/docs/CMake.html#cmake-out-of-source-pass
> it will give the error
>
> CMake Error at /usr/share/llvm-3.5/cmake/LLVMConfig.cmake:43 (include):
> > include could not find load file:
> >
> > /usr/lib/llvm-3.5/share/llvm/cmake/LLVMExports.cmake
> >
>
> where we can see it is looking in the folder
> /usr/lib/llvm-3.5/share/llvm/cmake/, instead of /usr/share/llvm-3.5/cmake/
> where the file LLVMExports.cmake is actually located.
In LLVMConfig.cmake the variable ${LLVM_CMAKE_DIR} is set to
/usr/lib/llvm-3.5/share/llvm/cmake. While trying to include
LLVMExports.cmake from ${LLVM_CMAKE_DIR} this error it thrown since
LLVMConfig.cmake and LLVMExports.cmake are both located in
/usr/share/llvm-3.5/cmake/
I fixed this by looking for the include files relative to the config file.
include("${CMAKE_CURRENT_LIST_DIR}/LLVMExports.cmake")
I think this patch will fix the the error caused by calling
find_package(LLVM REQUIRED CONFIG)
Ulf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVMConfig.patch
Type: text/x-patch
Size: 878 bytes
Desc: LLVMConfig.patch
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20150313/90e1c3f2/attachment.bin>
More information about the Pkg-llvm-team
mailing list