ABI Incompatibility of libc++ and libstdc++ and C++ Inline Namespace

I ran into linker errors similar to the screenshot below in November 2021. After some close inspection, I realized this was a result of mixing 2 C++ standard libraries, namely libc++ and libstdc++. I was unkowningly 😱 compiling TVM with libc++’s headers while linking it against LLVM which was compiled with libstdc++’s headers and linked against libstdc++. A Simple Example Here is a simple example illustrating what’s happening. Source Files Given 2 C++ souce files: ...

January 6, 2022 · 張博堯 (Po-Yao Chang)