FS#40732 - [llvm] CMake modules are broken

Attached to Project: Arch Linux
Opened by Dan Liew (delcypher) - Friday, 06 June 2014, 13:49 GMT
Last edited by Evangelos Foutras (foutrelis) - Wednesday, 10 September 2014, 14:59 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I see that the package has back ported some patches to support exporting CMake modules for LLVM. I've just checked and these modules are broken.

If we look at /usr/share/llvm/cmake/LLVMConfig.cmake we see...

1.

set_property( GLOBAL PROPERTY LLVM_LIBS )


LLVM_LIBS should not be empty which leads to llvm_map_components_to_libraries() not working correctly.


2.

set(LLVM_TOOLS_BINARY_DIR @LLVM_TOOLS_BINARY_DIR@)

This is clearly a broken configure expansion.

Additional info:
* 3.4.1-2


Is there a reason for using the configure and makefile build system? I think these problems would go away if the package was just built using CMake and make (or ninja).
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Wednesday, 10 September 2014, 14:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  llvm 3.5.0-2
Comment by Evangelos Foutras (foutrelis) - Sunday, 07 September 2014, 10:01 GMT
llvm 3.5.0-1 (currently in [testing]) should work much better in this regard.

We don't use CMake because it doesn't produce a versioned dynamic library (i.e. libLLVM-3.5.so).
Comment by Dan Liew (delcypher) - Monday, 08 September 2014, 09:46 GMT
> llvm 3.5.0-1 (currently in [testing]) should work much better in this regard.

Okay I'll try this out once its left testing. I've been working on LLVM trunk and have contributed to this feature and it was working fine on Arch using the CMake or Autoconf/Makefile build system so it should work fine :)

> We don't use CMake because it doesn't produce a versioned dynamic library (i.e. libLLVM-3.5.so).

I believe this is going to be worked on (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075444.html)
Comment by Dan Liew (delcypher) - Tuesday, 09 September 2014, 23:01 GMT
  • Field changed: Percent Complete (100% → 0%)
This is still broken in LLVM3.5 but broken in a different way. If --enable-shared is passed to configure the LLVMExport.cmake file isn't generated correctly. The Arch Linux package does this so LLVMExports.cmake is broken.


This is currently being discussed on llvmdev http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076593.html
Comment by Evangelos Foutras (foutrelis) - Wednesday, 10 September 2014, 12:32 GMT
I have included the patch you committed upstream in llvm 3.5.0-2.

Let me know if you notice any more issues with the installed cmake modules.
Comment by Dan Liew (delcypher) - Wednesday, 10 September 2014, 12:53 GMT
@Evangelos - Thanks.

I discovered soon afterwards that this patch breaks running ``make clean``. If you need to run that at you'll need to apply r217490 as well. Your PKGBUILD doesn't seem to use it though so it's probably fine.

https://projects.archlinux.org/svntogit/packages.git/log/trunk?h=packages/llvm doesn't seem to have synced your latest changes yet but when the package becomes available I'll try it out.
Comment by Dan Liew (delcypher) - Wednesday, 10 September 2014, 14:55 GMT
@Evangelos - I just tried using llvm 3.5.0-2. The LLVM CMake modules appear to be working :)

Loading...