Building llvm with the clang use, makes llvm try (and fail) to link against libxml2. Reproducible: Always Steps to Reproduce: 1. Enable clang use for llvm 2. try reemerging llvm Actual Results: llvm compiles, but fails when trying to link to libxml2 Expected Results: llvm compiles, links and merges emerge -pqv '=sys-devel/llvm-3.7.0-r2::gentoo': [ebuild R ] sys-devel/llvm-3.7.0-r2 USE="clang* libffi ncurses static-analyzer -debug -doc -gold -libedit -lldb -multitarget -ocaml -python {-test} -xml" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7 -pypy" VIDEO_CARDS="-radeon" [ebuild N ] sys-devel/clang-3.7.0-r100 USE="static-analyzer -debug -multitarget -python" ABI_X86="(64) -32 (-x32)"
Created attachment 416008 [details] emerge --info '=sys-devel/llvm-3.7.0-r2::gentoo'
Created attachment 416010 [details] build.log
e
Thanks for the report! Try to enable USE=xml on llvm, it should ask for the correct dependency (including libxml2 with 32bit ABI). The root problem is that the build system automatically finds libxml2: find_package(LibXml2) if (LIBXML2_FOUND) set(CLANG_HAVE_LIBXML 1) endif()
That seems to work, thanks. Should I report the problem upstream (CMake enabling libxml2 usage even when the installed libxml2 is for a different architecture)?
Thanks for the confirmation! This is rather related to our multilib build system, I have updated the ebuild to correctly disable libxml2 in clang with USE=-xml (also found that lldb requires xml, this is fixed too) Fixed in current 3.7.0-r2 and 9999: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce0a93f16b2dbab1a635ef41a6178e0590bf028c