[llvm-bugs] [Bug 46617] New: libcxx compile failed occasionally

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 7 01:09:03 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46617

            Bug ID: 46617
           Summary: libcxx compile failed occasionally
           Product: libc++
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: changqing.li at windriver.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

Created attachment 23694
  --> https://bugs.llvm.org/attachment.cgi?id=23694&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200707/f9989659/attachment.html>


More information about the llvm-bugs mailing list