Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 522510 - =sys-devel/llvm-3.5.0 - CMake Error at /usr/share/llvm/cmake/LLVMExports.cmake:6 (set_property): set_property could not find TARGET LLVMSupport. Perhaps it has not yet been created.
Summary: =sys-devel/llvm-3.5.0 - CMake Error at /usr/share/llvm/cmake/LLVMExports.cmak...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-10 14:04 UTC by David Hallas
Modified: 2014-09-16 19:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch from upstream (cleaner_fix_llvm_broken_cmake_export.patch,1.53 KB, patch)
2014-09-15 20:01 UTC, David Hallas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Hallas 2014-09-10 14:04:17 UTC
After the upgrade to llvm-3.5.0/clang-3.5.0 the installed cmake files (/usr/share/llvm/cmake/*.cmake) no longer works, I get errors like this:
CMake Error at /usr/share/llvm/cmake/LLVMExports.cmake:6 (set_property):
  set_property could not find TARGET LLVMSupport.  Perhaps it has not yet
  been created.
Call Stack (most recent call first):
  /usr/share/llvm/cmake/LLVMConfig.cmake:50 (include)
  CMakeLists.txt:5 (Find_Package)


CMake Error at /usr/share/llvm/cmake/LLVMExports.cmake:7 (set_property):
  set_property could not find TARGET LLVMMC.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/llvm/cmake/LLVMConfig.cmake:50 (include)
  CMakeLists.txt:5 (Find_Package)

...

When building my clang plugin using a cmake based build system. I even tested with the sample posted on the llvm website:

http://llvm.org/releases/3.5.0/docs/CMake.html#embedding-llvm-in-your-project

and it gives the same result.

After googling I found a Debian report of the same thing:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735592
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749580

and it seems to be that when building llvm using the autotools based build system it doesn't correctly install all the needed cmake files, but it looks like the Debian folks solved it.

Reproducible: Always
Comment 1 David Hallas 2014-09-15 20:01:12 UTC
Upstream has a bug report (and fix): http://llvm.org/bugs/show_bug.cgi?id=20884 and applying the patch mentioned in the bug report fixes the problem for me.
Comment 2 David Hallas 2014-09-15 20:01:59 UTC
Created attachment 384806 [details, diff]
Patch from upstream
Comment 3 Bernard Cafarelli gentoo-dev 2014-09-16 14:33:13 UTC
Thanks for the report and research on this! Hopefully 3.5.1 will work out of the box :)

In the meantime I added the patch to current 3.5.0 ebuild (no revbump as it is still masked)
Comment 4 David Hallas 2014-09-16 19:27:55 UTC
Works like a charm - thanks for you support :)