Mariner 2.0 clang didn't work
Summary
I cannot build any c++ sources with clang++ in Mariner 2.0 Docker image.
I think it's because we upgrade clang to v12.0.1 but still leave libstdc++-devel v11.2.0.
How to reproduce
# image id: 9981cdf1c8ec
docker run --net=host --rm -it mcr.microsoft.com/cbl-mariner/base/core:2.0 /bin/bash
tdnf install -y clang
cat > a.cc << EOF
#include <iostream>
int main() {
std::cout << "Hello!" << std::endl;
return 0;
}
EOF
clang++ -std=c++17 -stdlib=libc++ -c a.cc



I think it's introduced by https://github.com/microsoft/CBL-Mariner/pull/1428, @christopherco could you help to take a look?
@hcoona
I managed to get it working by installing build-essential
tdnf install build-essential

Also, IMHO, libstdc++ 11.2.0-2 is shipped by gcc.
Wondering if is related or not.
@mfrw you are right, libstdc++ is not libc++, my fault.
But it still not works for me.
# image id: 9981cdf1c8ec
docker run --net=host --rm -it mcr.microsoft.com/cbl-mariner/base/core:2.0 /bin/bash
tdnf install -y build-essential clang
cat > a.cc << EOF
#include <iostream>
int main() {
std::cout << "Hello!" << std::endl;
return 0;
}
EOF
clang++ -std=c++17 -stdlib=libc++ -c a.cc

libc++ is a new implementation of the C++ standard library, which to the best of my knowledge, we do not ship.
In my opinion, installing clang should not mean we get libc++ also.
/cc @christopherco - Please add/correct me if I am mistaken.
@mfrw is correct here - today we do not ship libc++ which is the new implementation of the C++ standard library from LLVM.org.
In the future, when we do add support libc++, we will likely ship it in a separate package like libc++-<version>.rpm.
OK, thanks for the information. Hope we can add it into schedule. The libc++ has been there at least for 12 years, it's not new. See https://github.com/llvm-mirror/libcxx/commit/bc8d3f97eb5c958007f2713238472e0c1c8fe02c