Dan Liew
2015-Jun-29 15:30 UTC
[LLVMdev] [RFC] Improving the testing of exported LLVM CMake targets
On 29 June 2015 at 07:16, Brad King <brad.king at kitware.com> wrote:> On 06/27/2015 04:17 AM, Dan Liew wrote: >> Second, the LLVM CMake files (LLVMConfig.cmake and LLVMExports.cmake) >> are not relocatable (they contain absolute paths which are based on >> the install prefix). So even if the first issue is fixed we still have >> the problem that a user cannot simply extract the binary tarball to an >> arbitrary location their system and build the toy project against it. > > The files generated by the CMake build are completely relocatable > because they compute everything relative to the LLVMConfig.cmake > file location. The Autoconf/Makefile build system would have to > be taught to do the same thing in the files it generates. Take a > look at the CMake-generated files to see how they achieve it.Yes, sorry I got my install directories confused (I should give them better names!). I'll try to write a patch for the autoconf/Makefile build system. The Debian/Ubuntu packages modify the install location of the LLVM CMake files so (assuming my patch gets accepted) the maintainers will need to do some more patching in the next release in order to avoid breaking the installed CMake files. The toy project that I mentioned in the original e-mail would be useful here because it would let the packagers test their package with minimal effort. The other points that I mention in the original e-mail (broken binary builds, the need for more testing, etc.) still stand though. Thanks, Dan.
Brad King
2015-Jun-29 15:37 UTC
[LLVMdev] [RFC] Improving the testing of exported LLVM CMake targets
On 06/29/2015 11:30 AM, Dan Liew wrote:> I'll try to write a patch for the autoconf/Makefile build system.Great. Please Cc me on proposed patches.> order to avoid breaking the installed CMake files. The toy project > that I mentioned in the original e-mail would be useful here because > it would let the packagers test their package with minimal effort. > > The other points that I mention in the original e-mail (broken binary > builds, the need for more testing, etc.) still stand though.Yes, certainly the LLVM packaging and distribution process could use infrastructure to test building applications against the (relocated) packages. One thing that may help a little bit is Debian may soon be packaging my application that uses CMake to build against LLVM/Clang: https://github.com/CastXML/CastXML http://public.kitware.com/pipermail/castxml/2015-June/000011.html Packaging of the tool may fail if Debian's LLVM package does not provide the CMake files correctly, so that will provide some coverage. Thanks, -Brad
Dan Liew
2015-Jun-29 19:10 UTC
[LLVMdev] [RFC] Improving the testing of exported LLVM CMake targets
On 29 June 2015 at 08:37, Brad King <brad.king at kitware.com> wrote:> On 06/29/2015 11:30 AM, Dan Liew wrote: >> I'll try to write a patch for the autoconf/Makefile build system. > > Great. Please Cc me on proposed patches.I've just proposed a patch ( http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150629/284641.html )