<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Clang tools c-index-test fails to build due to missing header path"
   href="https://bugs.llvm.org/show_bug.cgi?id=46415">46415</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang tools c-index-test fails to build due to missing header path
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>Tooling
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>brad@comstyle.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Trying to build Clang if Libxml2 is installed the build fails. Looking at the
CMakeCache file I see it finds the right header paths but it's not passed on to
the build for c-index-test.

humpty$ xml2-config --cflags
-I/usr/local/include/libxml2 -I/usr/local/include

Only -isystem /usr/local/include/libxml2 is being passed along.

humpty$ cmake --build . --target check-all
[202/4733] Generating VCSRevision.h, .
-- Found Git: /usr/local/bin/git (found version "2.27.0")
[848/4733] Generating VCSVersion.inc
-- Found Git: /usr/local/bin/git (found version "2.27.0")
[4026/4733] Building C object
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.o
FAILED:
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.o
/usr/bin/cc -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/c-index-test
-I/home/brad/llvm-project/clang/tools/c-index-test
-I/home/brad/llvm-project/clang/include -Itools/clang/include -Iinclude
-I/home/brad/llvm-project/llvm/include -isystem /usr/local/include/libxml2
-fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra
-Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic
-Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default
-Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color
-ffunction-sections -fdata-sections -DNDEBUG   -std=gnu89 -MD -MT
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.o -MF
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.o.d
-o tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.o 
 -c /home/brad/llvm-project/clang/tools/c-index-test/c-index-test.c
In file included from
/home/brad/llvm-project/clang/tools/c-index-test/c-index-test.c:15:
In file included from /usr/local/include/libxml2/libxml/parser.h:810:
/usr/local/include/libxml2/libxml/encoding.h:28:10: fatal error: 'iconv.h' file
not found
#include <iconv.h>
         ^~~~~~~~~
1 error generated.
[4031/4733] Building CXX object
tools/llvm-lto/CMakeFiles/llvm-lto.dir/llvm-lto.cpp.o
ninja: build stopped: subcommand failed.</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>