[llvm-bugs] [Bug 45222] New: building against libxml2 fails when icu includes are not in default location

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 17 00:49:42 PDT 2020


            Bug ID: 45222
           Summary: building against libxml2 fails when icu includes are
                    not in default location
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: magicaltux at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Created attachment 23246
  --> https://bugs.llvm.org/attachment.cgi?id=23246&action=edit
patch against clang 9.0.1 fixing this issue

I am working on a non-FHS-compliant system and includes for various elements
are available in different paths.

clang 9.0.1 c-index-test failed to compile due to a libxml2 header including a
different header from icu. It turns out the CMakeLists.txt file for
c-index-test only used the main libxml2 include path LIBXML2_INCLUDE_DIR, while
libxml2-config.cmake provides a LIBXML2_INCLUDE_DIRS variable which includes
dependencies include paths.

This can be fixed by using LIBXML2_INCLUDE_DIRS rather than
LIBXML2_INCLUDE_DIR, however I am unsure how this would apply to OSX

Either way the attached patch fixes the build on my system and I do not expect
it should break anything for anyone, as it uses a variable defined by libxml2.

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/20200317/9f68643b/attachment.html>

More information about the llvm-bugs mailing list