<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - libXML2 fails to spot lzma when cross-compiling"
   href="http://llvm.org/bugs/show_bug.cgi?id=17085">17085</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>libXML2 fails to spot lzma when cross-compiling
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>cmake
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>renato.golin@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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
clang/tools/c-index-test/CMakeLists.txt:

  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
absent.)

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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>