Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564804 - sys-devel/llvm[clang,-xml,abi_x86_32]: linker fails to find 32bit libxml2
Summary: sys-devel/llvm[clang,-xml,abi_x86_32]: linker fails to find 32bit libxml2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-03 13:51 UTC by gentoo-user
Modified: 2015-11-12 10:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=sys-devel/llvm-3.7.0-r2::gentoo' (info,17.91 KB, text/plain)
2015-11-03 13:52 UTC, gentoo-user
Details
build.log (build.log.xz,54.70 KB, application/x-xz)
2015-11-03 13:53 UTC, gentoo-user
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gentoo-user 2015-11-03 13:51:31 UTC
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)"
Comment 1 gentoo-user 2015-11-03 13:52:07 UTC
Created attachment 416008 [details]
emerge --info '=sys-devel/llvm-3.7.0-r2::gentoo'
Comment 2 gentoo-user 2015-11-03 13:53:37 UTC
Created attachment 416010 [details]
build.log
Comment 3 Michael Palimaka (kensington) gentoo-dev 2015-11-10 15:35:32 UTC
e
Comment 4 Bernard Cafarelli gentoo-dev 2015-11-11 19:48:20 UTC
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()
Comment 5 gentoo-user 2015-11-11 22:09:05 UTC
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)?
Comment 6 Bernard Cafarelli gentoo-dev 2015-11-12 10:48:56 UTC
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