flutter cmake issue

hello guys i am facing this issue in building flutter build for linux over snapcraft

[ +1 ms] CMake Error at /snap/flutter/141/usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):
[ +2 ms] The C++ compiler
[ ] “/snap/flutter/current/usr/bin/clang++”
[ ] is not able to compile a simple test program.
[ ] It fails with the following output:
[ ] Change Dir: /root/parts/workstatus/build/build/linux/x64/release/CMakeFiles/CMakeTmp
[ ] Run Build Command(s):/snap/flutter/current/usr/bin/ninja cmTC_60c22 && [1/2] Building CXX object CMakeFiles/cmTC_60c22.dir/testCXXCompiler.cxx.o
[ ] [2/2] Linking CXX executable cmTC_60c22
[ ] FAILED: cmTC_60c22

If you run with --debug-trycompile, you should be able to go into that CMakeTmp directory and see what might be up. CMakeFiles/CMakeError.log is also of interest here.