[cfe-dev] compiler-rt fails to build with the packages are installed on the system

Richard Smith richard at metafoo.co.uk
Tue Oct 29 14:02:24 PDT 2013


On Tue, Oct 29, 2013 at 1:44 AM, Sylvestre Ledru <sylvestre at debian.org>wrote:

> Hello,
>
> Recently, compiler-rt build started to fail when the package are also
> installed on the system.
>
>   COMPILE:   clang_linux/full-x86_64/x86_64:
>
> /tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/projects/compiler-rt/lib/addvsi3.c
>
> /tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/build-llvm/Release+Asserts/bin/clang
> -fPIC -Wall -Werror -O3 -fomit-frame-pointer -m64
>
> --sysroot=/tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/projects/compiler-rt/SDKs/linux
> -c -o
>
> /tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/build-llvm/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/addvsi3.o
>
> /tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/projects/compiler-rt/lib/addvsi3.c
> /usr/include/clang/3.4/include/module.map:1:8: error:
> /usr/include/clang/3.4/include/module.map:1:8: error: redefinition of
> module '_Builtin_intrinsics'
> redefinition of module '_Builtin_intrinsics'
> module _Builtin_intrinsics [system] {module _Builtin_intrinsics [system] {
>        ^
>
> /tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/build-llvm/Release+Asserts/bin/../lib/clang/3.4/include/module.map:1:8:
> note: previously defined here
> module _Builtin_intrinsics [system] {
>        ^
>
> Any ideas on how to fix that ?


Any particular invocation of Clang should only find the built-in headers
corresponding to that binary; it should look in $(dirname
$argv0)/../lib/clang/3.4/include for those. Can you run the build command
with -v and try to figure out why the include path contains both
/usr/include/clang/3.4/include and .../bin/../lib/clang/3.4/include? (Which
of these corresponds to the clang binary being used, and why is the other
one on the include path?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131029/83e9b121/attachment.html>


More information about the cfe-dev mailing list