[llvm-bugs] [Bug 46415] New: Clang tools c-index-test fails to build due to missing header path

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jun 21 16:46:06 PDT 2020


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

            Bug ID: 46415
           Summary: Clang tools c-index-test fails to build due to missing
                    header path
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Tooling
          Assignee: unassignedclangbugs at nondot.org
          Reporter: brad at comstyle.com
                CC: llvm-bugs at lists.llvm.org

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.

-- 
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/20200621/9a2f29b8/attachment.html>


More information about the llvm-bugs mailing list