<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Just to be clear -- I didn't have to do any of that.<div><br></div><div>Just</div><div><br></div><div>1. install clang-9.0</div><div>2. use it to build TOT with the build line you outlined</div><div><br></div><div><blockquote type="cite" class=""><div class=""><div class=""><div class=""><div class="">export CXX=/path/to/clang++-9.0</div></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div class=""><div class=""><div class="">export CC=/path/to/clang-9.0</div></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div class=""><div class=""><div class="">cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$BUILD_DIR/install -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" $SRC_DIR</div><div class="">ninja -j8</div></div></div></div></blockquote><br></div><div>done.</div><div><br></div><div>Ken</div><div><br></div><div><br><div><div>On 2020-06-02, at 11:00 AM, <a href="mailto:llvm@dyatkovskiy.com">llvm@dyatkovskiy.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>+ ldionne@</div><div> </div><div>Ken, Louis,</div><div> </div><div>After all also can confirm similar conditions.</div><div> </div><div>1. It won't built latest Xcode clang I was able to get for 10.13, namely this one:</div><div><div>Apple LLVM version 10.0.0 (clang-1000.10.43.1)</div><div>Target: x86_64-apple-darwin17.7.0</div><div>Thread model: posix</div><div>InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin</div><div> </div><div>2. I was only able to get it pass through with the following bootstrap sequence:</div><div>  2.1. Get TOT llvm</div><div>  Phase 1</div><div>  2.2. Build it with clang enabled and with *static* libcxx and libcxxabi projects enabled. So, following options should be "OFF" in cmake:</div><div>     * LIBCXXABI_ENABLE_SHARED</div><div>     * LIBCXX_ENABLE_SHARED</div><div>     Note, "check-cxx" rule will give you a lot of errors on this step. Just because there are no shared libs.</div><div>  2.3. install it into custom dir</div><div>  Phase 2</div><div>  2.4. Build libcxx and libcxx with CMAKE_C_COMPILER and CMAKE_CXX_COMPILER set to toolchain you get on step 2.3.</div><div>  2.5. Install into desired dir. The result would be working libcxx and libcxxabi (both static and shared).</div><div> </div><div>Conclusions.</div><div>Solutions mentioned in this thread are quite different from standard guidelines. May be we should update them?</div><div> </div></div><div>-Stepan</div><div> </div><div>02.06.2020, 20:20, "Ken Cunningham" <<a href="mailto:ken.cunningham.webuse@gmail.com">ken.cunningham.webuse@gmail.com</a>>:</div><blockquote><div style="word-wrap:break-word"><div><div>We find it builds fine with an Xcode clang > 1001. It does not build with the latest Xcode clang  available on 10.13, but it does build with clang-9.0 on 10.13 (just confirmed it with your build line).</div><div> </div><div>Here's a log from 10.13 successfully building libc++abi.dyib (and the rest of clang) using clang-9 last night.</div><div> </div><div><<a href="https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/85088/steps/install-port/logs/stdio">https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/85088/steps/install-port/logs/stdio</a>>.</div><div> </div><div> </div><div>hope this helps,</div><div> </div><div>K</div></div><div> </div> <div> <blockquote><div>On Jun 2, 2020, at 6:42 AM, Louis Dionne via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org">libcxx-dev@lists.llvm.org</a>> wrote:</div> <div><div style="word-wrap:break-word">Hmm, something like a year old clang should work, so this must be an actual bug. Can you provide a link to a gist containing the full output of the build command? Also, please use `-v` so we can see individual compiler invocations.<div> </div><div>Thanks,</div><div>Louis<div> <blockquote><div>On Jun 2, 2020, at 04:50, <a href="mailto:llvm@dyatkovskiy.com">llvm@dyatkovskiy.com</a> wrote:</div> <div><div>Nope, it fails for TOT as well.</div><div> </div><div><div>commit e70cf280f80c0933dd500ff18c7a17af8057b28c (HEAD -> master, origin/master, origin/HEAD)</div><div>Author: Sam Parker <<a href="mailto:sam.parker@arm.com">sam.parker@arm.com</a>></div><div>Date: Tue Jun 2 09:04:20 2020 +0100</div><div> </div><div>[NFC][ARM][AArch64] Test runs</div><div> </div><div>Add code size tests runs for memory ops for both architectures.</div><div> </div><div>Error message:</div><div><div> </div><div>Undefined symbols for architecture x86_64:</div><div>"__ZTIDu", referenced from:</div><div>-exported_symbol[s_list] command line option</div><div>"__ZTIPDu", referenced from:</div><div>-exported_symbol[s_list] command line option</div><div>"__ZTIPKDu", referenced from:</div><div>-exported_symbol[s_list] command line option</div><div>"__ZTSDu", referenced from:</div><div>-exported_symbol[s_list] command line option</div><div>"__ZTSPDu", referenced from:</div><div>-exported_symbol[s_list] command line option</div><div>"__ZTSPKDu", referenced from:</div><div>-exported_symbol[s_list] command line option</div><div>ld: symbol(s) not found for architecture x86_64</div></div></div><div> </div><div>Thanks!</div><div>Stepan</div><div> </div><div>02.06.2020, 02:50, "via libcxx-dev" <<a href="mailto:libcxx-dev@lists.llvm.org">libcxx-dev@lists.llvm.org</a>>:</div><blockquote>I'm sorry, I reproduced this issue only with clang version which is 4 weeks old. Commit ff4a3ee4.<div>It wasn't yet tested with newer clang versions. I'll check tomorrow and let you know.<div> </div><div>Thanks!</div><div>Stepan<br> <div>02.06.2020, 01:12, "via libcxx-dev" <<a href="mailto:libcxx-dev@lists.llvm.org">libcxx-dev@lists.llvm.org</a>>:</div><blockquote><div><div>Louis,</div><div>how recent clang should be? I have this error for 31th of May version, for this commit 595212569.</div><div> </div><div>Thanks!</div><div> </div><div>01.06.2020, 23:54, "Louis Dionne" <<a href="mailto:ldionne@apple.com">ldionne@apple.com</a>>:</div><blockquote><div style="word-wrap:break-word">Hi,<div> </div><div>I just updated <a href="http://llvm.org/PR43749">http://llvm.org/PR43749</a>, which I wasn't aware of. As I explain in the bug report:</div><div> </div><div><div>    The issue is that the compiler emits type information for fundamental types in libc++abi, and your compiler doesn't know about char8_t yet, so it doesn't emit the type information for those. libc++abi tries to export these symbols and it fails to do so, because they haven't been generated in the dylib by the compiler.</div><div> </div><div>    Getting a linker error is quite nice, because otherwise you'd be producing a libc++abi.dylib that doesn't work properly at runtime (say if you try to use typeid(char8_t) in your program).</div><div> </div><div>I hope that answers your question. The problem should go away if you use a recent Clang. If it doesn't please ping me again.</div><div> </div><div>Thanks,</div><div>Louis</div><div> <blockquote><div>On Jun 1, 2020, at 15:39, <a href="mailto:llvm@dyatkovskiy.com">llvm@dyatkovskiy.com</a> wrote:</div> <div><div>Hi Louis!</div><div> </div><div>I found your commit in llvm-project, libcxxabi, namely this one:</div><div><div> </div><div>commit 223df5b54021cfa4c67d4e09e1dc1b3b9e6a9de7 (refs/bisect/bad)</div><div>Author: Louis Dionne <<a href="mailto:ldionne@apple.com">ldionne@apple.com</a>></div><div>Date: Thu Jun 27 20:17:22 2019 +0000</div><div> </div><div>In this commit you added exported symbols for different platforms for libcxxabi, for apple:</div><div> </div><div>I'm currently trying to build it for Mac OS 10.13.6, x86_64, and bumped into unresolved symbols errors:</div><div> </div><div><div><div>Undefined symbols for architecture x86_64:</div><div>"__ZTIDu", referenced from:</div><div>-exported_symbol[s_list] command line option</div><div>"__ZTIPDu", referenced from:</div><div>-exported_symbol[s_list] command line option</div></div></div><div> </div><div>I noticed that you added itanium-base.exp for APPLE platforms by default (no other conditions):</div><div> </div><div>> if (APPLE)</div><div><div>> target_link_libraries(cxxabi_shared PRIVATE "-Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/itanium-base.exp")</div><div> </div><div>I'm not expert of x86_64 arch, especially for darwin. Are we using Itanium ABI by default on Mac OS 10.13 for x86_64 arch?</div><div>If so, what did I miss, for there are symbols which must be exported, but absent in my compilation. I compile libcxxabi with following commands:</div><div> </div><div>cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$BUILD_DIR/install -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" $SRC_DIR</div><div>ninja -j8</div><div> </div><div>There is also bug, which seems to be related to this commit:</div><div><a href="https://bugs.llvm.org/show_bug.cgi?id=43749">https://bugs.llvm.org/show_bug.cgi?id=43749</a></div><div> </div><div>Thanks!</div><div>Stepan Dyatkovskiy</div><div> </div></div></div></div></blockquote></div></div></div></blockquote></div><div><p>_______________________________________________<br>libcxx-dev mailing list<br><a href="mailto:libcxx-dev@lists.llvm.org">libcxx-dev@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a></p></div></blockquote><div> </div><div> </div><div> </div><div> </div></div></div>,<p>_______________________________________________<br>libcxx-dev mailing list<br><a href="mailto:libcxx-dev@lists.llvm.org">libcxx-dev@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a></p></blockquote></div></blockquote></div></div></div>_______________________________________________<br>libcxx-dev mailing list<br><a href="mailto:libcxx-dev@lists.llvm.org">libcxx-dev@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a></div></blockquote></div></div></blockquote></blockquote></div><br></div></body></html>