[llvm-bugs] [Bug 26187] New: LLVMConfig.cmake file generated by autoconf build is corrupted

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jan 17 16:44:40 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26187

            Bug ID: 26187
           Summary: LLVMConfig.cmake file generated by autoconf build is
                    corrupted
           Product: Build scripts
           Version: 3.7
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: autoconf
          Assignee: unassignedbugs at nondot.org
          Reporter: flashmozzg at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

When I tried to upgrade llvm 3.6 to llvm 3.7 in my project I encountered an
error on travis ci OSX build:
CMake Error at
/usr/local/opt/llvm37/lib/llvm-3.7/share/llvm/cmake/LLVMConfig.cmake:54
(include):
  include could not find load file:
    /LLVMExports.cmake

After some investigations i found that LLVMConfig.cmake file is at fault.
Look at this:
# Compute the CMake directory from the LLVMConfig.cmake file location.n
get_filename_component(_LLVM_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)n #
Compute the installation prefix from the LLVMConfig.cmake file location.n
get_filename_component(LLVM_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)n
get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)n
get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)n
get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)n
set(_LLVM_LIBRARY_DIR "${LLVM_INSTALL_PREFIX}/lib")

You can see that for some reason newlines ('\n') became just 'n', so it's all
became part of the comment therefore needed vars weren't set.

If I build llvm using cmake it generates correct file. The problem occures only
with autotools build. Tested on travis with:
...
script:
 - ../configure --enable-optimized --disable-bindings --enable-targets=host
--enable-shared --enable-libffi
 - make -j4
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160118/85fbfbd7/attachment.html>


More information about the llvm-bugs mailing list