<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - libcxx compile failed occasionally"
   href="https://bugs.llvm.org/show_bug.cgi?id=46617">46617</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>libcxx compile failed occasionally
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>changqing.li@windriver.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23694" name="attach_23694" title="compile failed log">attachment 23694</a> <a href="attachment.cgi?id=23694&action=edit" title="compile failed log">[details]</a></span>
compile failed log

Hi,

With the same configure, it can always build successfully,  only met one time
that libcxx compile failed.  please see the log.


here is some configure option:
-DCMAKE_CROSSCOMPILING=ON 
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON 
-DLIBUNWIND_ENABLE_SHARED=OFF 
-DLIBUNWIND_ENABLE_THREADS=OFF 
-DLIBUNWIND_WEAK_PTHREAD_LIB=ON 
-DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON 
-DLIBCXXABI_INCLUDE_TESTS=OFF 
-DLIBCXXABI_ENABLE_SHARED=ON 
-DLIBCXXABI_USE_COMPILER_RT=ON 
-DLIBCXXABI_LIBCXX_INCLUDES=${S}/libcxx/include 
-DLIBCXX_CXX_ABI=libcxxabi 
-DLIBCXX_USE_COMPILER_RT=ON 
-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${S}/libcxxabi/include 
-DLIBCXX_CXX_ABI_LIBRARY_PATH=${B}/lib${LLVM_LIBDIR_SUFFIX} 
-DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} 
-DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${NM} 
-DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} 
-DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi;libunwind' 
-DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX}


>From the log,  build lib/libc++.so.1.0 failed when linking libc++abi.a, 


According to the libcxx/src/CMakelist.txt, 

LIBCXX_ENABLE_SHARED is ON, 
LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY is OFF

so target_link_libraries(cxx_shared PUBLIC "${LIBCXX_CXX_SHARED_ABI_LIBRARY}")

LIBCXX_CXX_SHARED_ABI_LIBRARY is cxxabi


and both libcxxabi.so and libcxxabi.a will be generated under
LIBCXX_CXX_ABI_LIBRARY_PATH.


I guess the failure happened when libcxxabi.a is generated, and libcxxabi.so is
not generated. maybe we need add dependency to .so explicitly? I suspect that
target_link_libraries don't handle dependency well.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>