/usr/bin/ld: unable to find -lstdc++: No such file or catalog

Hi there. I was trying to build mysql server:

https://github.com/mysql/mysql-server

I have created a folder “build” and tried to run cmake from there:

yantitarenko5@localhost:~/mysql-server/build> cmake ..
– Running cmake version 3.28.3
– Found Git: /usr/bin/git (found version “2.43.0”)
– CMAKE_MODULE_PATH is /home/yantitarenko5/mysql-server/cmake
– MySQL 9.3.0
– The C compiler identification is GNU 10.4.0
– The CXX compiler identification is Clang 17.0.6
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/gcc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - failed
– Check for working CXX compiler: /usr/bin/clang++
– Check for working CXX compiler: /usr/bin/clang++ - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler

"/usr/bin/clang++"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: '/home/yantitarenko5/mysql-server/build/CMakeFiles/CMakeScratch/TryCompile-wbDa82'

Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_d7c79/fast
/usr/bin/gmake  -f CMakeFiles/cmTC_d7c79.dir/build.make CMakeFiles/cmTC_d7c79.dir/build
gmake[1]: вход в каталог «/home/yantitarenko5/mysql-server/build/CMakeFiles/CMakeScratch/TryCompile-wbDa82»
Building CXX object CMakeFiles/cmTC_d7c79.dir/testCXXCompiler.cxx.o
/usr/bin/clang++    -MD -MT CMakeFiles/cmTC_d7c79.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_d7c79.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_d7c79.dir/testCXXCompiler.cxx.o -c /home/yantitarenko5/mysql-server/build/CMakeFiles/CMakeScratch/TryCompile-wbDa82/testCXXCompiler.cxx
Linking CXX executable cmTC_d7c79
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d7c79.dir/link.txt --verbose=1
/usr/bin/clang++ CMakeFiles/cmTC_d7c79.dir/testCXXCompiler.cxx.o -o cmTC_d7c79 
/usr/bin/ld: невозможно найти -lstdc++: Нет такого файла или каталога
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_d7c79.dir/build.make:100: cmTC_d7c79] Ошибка 1
gmake[1]: выход из каталога «/home/yantitarenko5/mysql-server/build/CMakeFiles/CMakeScratch/TryCompile-wbDa82»
gmake: *** [Makefile:127: cmTC_d7c79/fast] Ошибка 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:517 (PROJECT)

– Configuring incomplete, errors occurred!

Please help to resolve the issue. I can’t understand which library is missing.