[LLVMbugs] [Bug 17085] New: libXML2 fails to spot lzma when cross-compiling

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 3 10:18:23 PDT 2013


            Bug ID: 17085
           Summary: libXML2 fails to spot lzma when cross-compiling
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: renato.golin at linaro.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When cross-compiling LLVM to ARM, using CMake+Ninja, I realized that libxml2
depends on lzma, but the dependency is not explicit on the build.ninja file
under the "build bin/c-index-test"'s LINK_LIBRARIES (which is the only one that
cares about it).

Oscar Fuentes proposed the following workarounds / solutions:

A quick and dirty fix is to change this on

  target_link_libraries(c-index-test ${LIBXML2_LIBRARIES} lzma)

That affects that instance only (maybe it is the only one.) And if you
pretend to install that change, first check that XML2 always requires
lzma (to not break the build on systems where it doesn't and libzma is

A more robust fix shall work on llvm/cmake/config-ix.cmake: when XML2 is
detected, add lzma as a dependency. This has the some caveat mentioned
on the previous paragraph.

Finally, the real fix shall be implemented on FindLibXml2.cmake, which
belongs to the CMake project. It should take care of declaring that xml2
libraries depend on lzma, but apparently it doesn't.

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

More information about the llvm-bugs mailing list