<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 29/10/2013 22:02, Richard Smith
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAOfiQqnmMvnULkqVFeaGNJzTQKqrC9EWcCQpF4JLjJbPVW_jyQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">On Tue, Oct 29, 2013 at 1:44 AM, Sylvestre Ledru <span
          dir="ltr"><<a moz-do-not-send="true"
            href="mailto:sylvestre@debian.org" target="_blank">sylvestre@debian.org</a>></span>
        wrote:<br>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
              <br>
              Recently, compiler-rt build started to fail when the
              package are also<br>
              installed on the system.<br>
              <br>
                COMPILE:   clang_linux/full-x86_64/x86_64:<br>
/tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/projects/compiler-rt/lib/addvsi3.c<br>
/tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/build-llvm/Release+Asserts/bin/clang<br>
              -fPIC -Wall -Werror -O3 -fomit-frame-pointer -m64<br>
--sysroot=/tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/projects/compiler-rt/SDKs/linux<br>
              -c -o<br>
/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<br>
/tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/projects/compiler-rt/lib/addvsi3.c<br>
              /usr/include/clang/3.4/include/module.map:1:8: error:<br>
              /usr/include/clang/3.4/include/module.map:1:8: error:
              redefinition of<br>
              module '_Builtin_intrinsics'<br>
              redefinition of module '_Builtin_intrinsics'<br>
              module _Builtin_intrinsics [system] {module
              _Builtin_intrinsics [system] {<br>
                     ^<br>
/tmp/buildd/llvm-toolchain-snapshot-3.4~svn193538/build-llvm/Release+Asserts/bin/../lib/clang/3.4/include/module.map:1:8:<br>
              note: previously defined here<br>
              module _Builtin_intrinsics [system] {<br>
                     ^<br>
              <br>
              Any ideas on how to fix that ?</blockquote>
            <div><br>
            </div>
            <div>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?)</div>
          </div>
        </div>
      </div>
    </blockquote>
    The Debian clang package is patched to search also in
    /usr/include/clang/3.4/include<br>
    <br>
    Anyway, module.map should not included twice. <br>
    <br>
    Thanks,<br>
    Sylvestre<br>
    Full log:<br>
    Selected GCC installation: <br>
     "/pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/build-llvm/Release/bin/clang"
    -cc1 -triple x86_64-pc-linux-gnu -emit-obj -disable-free
    -disable-llvm-verifier -main-file-name absvdi2.c -mrelocation-model
    pic -pic-level 2 -fmath-errno -masm-verbose -mconstructor-aliases
    -munwind-tables -target-cpu x86-64 -target-linker-version
    2.23.90.20130927 -momit-leaf-frame-pointer -v -coverage-file
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/build-llvm/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/absvdi2.o
    -resource-dir
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/build-llvm/Release/bin/../lib/clang/3.4
    -isysroot
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/projects/compiler-rt/SDKs/linux
    -internal-isystem
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/projects/compiler-rt/SDKs/linux/usr/local/include
    -internal-isystem
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/build-llvm/Release/bin/../lib/clang/3.4/include
    -internal-isystem /usr/include/clang/3.4/include/
    -internal-externc-isystem
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/projects/compiler-rt/SDKs/linux/usr/include/x86_64-linux-gnu
    -internal-externc-isystem
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/projects/compiler-rt/SDKs/linux/usr/include/x86_64-linux-gnu
    -internal-externc-isystem
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/projects/compiler-rt/SDKs/linux/usr/include
    -O3 -Wall -Werror -fdebug-compilation-dir
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/build-llvm/tools/clang/runtime/compiler-rt
    -ferror-limit 19 -fmessage-length 0 -mstackrealign
    -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops
    -vectorize-slp -o
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/build-llvm/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/SubDir.lib/absvdi2.o
    -x c
/pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/projects/compiler-rt/lib/absvdi2.c<br>
    clang -cc1 version 3.4 based upon LLVM 3.4 default target
    x86_64-pc-linux-gnu<br>
    ignoring nonexistent directory
"/pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/projects/compiler-rt/SDKs/linux/usr/local/include"<br>
    ignoring nonexistent directory
"/pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/projects/compiler-rt/SDKs/linux/usr/include/x86_64-linux-gnu"<br>
    ignoring nonexistent directory
"/pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/projects/compiler-rt/SDKs/linux/usr/include/x86_64-linux-gnu"<br>
    #include "..." search starts here:<br>
    #include <...> search starts here:<br>
 /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/build-llvm/Release/bin/../lib/clang/3.4/include<br>
     /usr/include/clang/3.4/include<br>
 /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/projects/compiler-rt/SDKs/linux/usr/include<br>
    End of search list.<br>
    /usr/include/clang/3.4/include/module.map:1:8: error: redefinition
    of module '_Builtin_intrinsics'<br>
    module _Builtin_intrinsics [system] {<br>
           ^<br>
    /pro/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-snapshot-3.4~svn193603/build-llvm/Release/bin/../lib/clang/3.4/include/module.map:1:8:
    note: previously defined here<br>
    module _Builtin_intrinsics [system] {<br>
           ^<br>
    1 error generated.<br>
    <br>
  </body>
</html>